[Pkg-openssl-devel] Bug#782492: FTCBFS for mips* architectures: invokes non-existent $triplet-$triplet-gcc

Helmut Grohne helmut at subdivi.de
Mon Apr 13 04:53:32 UTC 2015


Source: openssl
Version: 1.0.1k-3
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

openssl currently cannot be cross built for mips* architectures, because
it preprends the architecture triplet to the compiler twice. Example
failure:

https://jenkins.debian.net/job/rebootstrap_mips64el_gcc49_nobiarch/129/console
| make -f Makefile all
| make[1]: Entering directory '/tmp/buildd/openssl/openssl-1.0.1k'
| making all in crypto...
| make[2]: Entering directory '/tmp/buildd/openssl/openssl-1.0.1k/crypto'
| /usr/bin/perl ../util/mkbuildinf.pl "-I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall" "debian-mips64el" >buildinf.h
| mips64el-linux-gnuabi64-mips64el-linux-gnuabi64-gcc -I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall   -c -o cryptlib.o cryptlib.c
| make[2]: mips64el-linux-gnuabi64-mips64el-linux-gnuabi64-gcc: Command not found
| <builtin>: recipe for target 'cryptlib.o' failed
| make[2]: *** [cryptlib.o] Error 127
| make[2]: Leaving directory '/tmp/buildd/openssl/openssl-1.0.1k/crypto'
| Makefile:280: recipe for target 'build_crypto' failed
| make[1]: *** [build_crypto] Error 1
| make[1]: Leaving directory '/tmp/buildd/openssl/openssl-1.0.1k'
| debian/rules:49: recipe for target 'build-stamp' failed
| make: *** [build-stamp] Error 2
| dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

mips porters X-Debbugs-Cced, patch attached.

Helmut
-------------- next part --------------
diff -Nru openssl-1.0.1k/debian/changelog openssl-1.0.1k/debian/changelog
--- openssl-1.0.1k/debian/changelog
+++ openssl-1.0.1k/debian/changelog
@@ -1,3 +1,10 @@
+openssl (1.0.1k-3.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix cross compilation for mips architectures. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Wed, 08 Apr 2015 09:45:19 +0200
+
 openssl (1.0.1k-3) unstable; urgency=medium
 
   * Drop patch 0003-Free-up-passed-ASN.1-structure-if-reused.patch, it at
diff -Nru openssl-1.0.1k/debian/patches/mips-cross.patch openssl-1.0.1k/debian/patches/mips-cross.patch
--- openssl-1.0.1k/debian/patches/mips-cross.patch
+++ openssl-1.0.1k/debian/patches/mips-cross.patch
@@ -0,0 +1,26 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Subject: fix cross compilation for mips architectures
+Last-Update: 2015-04-08
+
+openssl prepends $CROSS_COMPILE to the compiler, so it ends up calling
+"$triplet-$triplet-gcc". Thus drop one triplet.
+
+Index: openssl-1.0.1k/Configure
+===================================================================
+--- openssl-1.0.1k.orig/Configure
++++ openssl-1.0.1k/Configure
+@@ -365,10 +365,10 @@
+ "debian-m68k","gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "debian-mips",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "debian-mipsel",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"debian-mipsn32",   "mips64-linux-gnuabin32-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"debian-mipsn32el",   "mips64el-linux-gnuabin32-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"debian-mips64",   "mips64-linux-gnuabi64-gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+-"debian-mips64el",   "mips64el-linux-gnuabi64-gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsn32",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsn32el",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips64",   "gcc:-DB_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips64el",   "gcc:-DL_ENDIAN -DTERMIO ${debian_cflags}::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "debian-netbsd-i386",	"gcc:-DL_ENDIAN -DTERMIOS ${debian_cflags} -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "debian-netbsd-m68k",	"gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags}::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "debian-netbsd-sparc",	"gcc:-DB_ENDIAN -DTERMIOS ${debian_cflags} -mv8::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff -Nru openssl-1.0.1k/debian/patches/series openssl-1.0.1k/debian/patches/series
--- openssl-1.0.1k/debian/patches/series
+++ openssl-1.0.1k/debian/patches/series
@@ -29,3 +29,4 @@
 0001-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
 0001-Check-public-key-is-not-NULL.patch
 0008-Fix-a-failure-to-NULL-a-pointer-freed-on-error.patch
+mips-cross.patch


More information about the Pkg-openssl-devel mailing list