[Pkg-openssl-devel] Bug#736581: openssl FTBFS on alpha: alphacpuid.pl is compiled to an empty object file

Michael Cree mcree at orcon.net.nz
Sat Jan 25 09:54:04 UTC 2014


Source: openssl
Version: 1.0.1f-1
Severity: important
User: debian-alpha at lists.debian.org
Usertags: alpha
Justification: Fails to build from source but built in the past.

Openssl FTBFS on Alpha with undefined references to OPENSSL_cleanse and
other symbols during linking.  Full build log is at:

http://buildd.debian-ports.org/status/fetch.php?pkg=openssl&arch=alpha&ver=1.0.1f-1&stamp=1389050471

The symbol OPENSSL_cleanse is defined in crypto/alphacpuid.pl however this
file gets compiled to an empty object file, thus when used to link the apps
cannot provide the symbols OPENSSL_cleanse, etc.

In crypto/Makefile is the following:

alphacpuid.s:   alphacpuid.pl
        (preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \
        $(PERL) alphacpuid.pl > $$preproc && \
        $(CC) -E $$preproc > $@ && rm $$preproc)

The last line expands to "gcc -E ..." however it appears that gcc only
produces output from an assembler file if it has the extension '.S'.  If
the extension the of input assembler file ends in  '.s' then "gcc -E"
produces nothing.

And that is the problem here, as the line "preproc=/tmp/$$$$.$@" defines
preproc to be a filename ending in ".s".  This problem was introduced
by commit d1cf23ac86c0 upstream, apparently an attempt to get the alpha
code to compile under OSF/Tru64 Unix.  With that change upstream have
slaughtered compilation under gcc.

Assuming that the above described behaviour of gcc is correct (and indeed
the gcc manual lists ".S" as the extension of an assembler file that
requires preprocessing), then the macro preproc needs to be defined to be
a filename ending in ".S".

The same fix is also required in other Makefiles too, notably:

crypto/bn/Makefile
crypto/modes/Makefile
crypto/sha/Makefile

Cheers
Michael.



More information about the Pkg-openssl-devel mailing list