nspr 4.8.9: failed to build on x86_64 board
cover nspr 4.8.9: failed to build on x86_64 board
* The test info, tested on:
-> The hosts are:
Fedora 16 64bit, Ubuntu 10.10 32bit
-> The MACHINEs are:
qemux86, qemux86-64 and qemuarm// Robert
The following changes since commit d3e0beed9eef53018158c9f999cd20b44629aa61:
guile: Deal with hardcoded path issues (2012-03-27 00:29:00 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/nspr
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/nspr
Robert Yang (1):
nspr 4.8.9: failed to build on x86_64 board
.../nspr/files/fix-build-on-x86_64.patch | 51 ++++++++++++++++ .../nspr/files/trickly-fix-build-on-x86_64.patch | 62 ++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.8.9.bb | 4 +- 3 files changed, 116 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-support/nspr/files/fix-build-on-x86_64.patch create mode 100644 meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch
PATCH 1/1 nspr 4.8.9: failed to build on x86_64 board
nspr failed to build on x86_64 board(e.g., qemux86-64):
x86_64-poky-linux-gcc -m64 ... -m32 ...
...
fatal error: gnu/stubs-32.h: No such file or directory
This is because there are both '-m64' and '-m32' in gcc's options, and the later one is used, but what we need is '-m64' since it is x86_64, this is caused by an incorrect logic in configure.in, we should assume that the pkg uses 64bit when target_cpu is x86_64 (it has two options:
--enable-n32 and --enable-64bit, both of them are not set by default), we only can assume that the pkg uses 32bit when USE_N32 is set. But what it did was that assumed 32bit when target_cpu was x86_64 unless --enable-64bit was set, this seems unreasonable and caused the "gcc -m64 -m32" error.
Some had noticed this error before:
https://lists.yoctoproject.org/pipermail/poky/2011-May/005799.html
NOTE:
* Both fix configure and configure.in since we can't run the "autoreconf" for nsrp, please see more explanation in trickly-fix-build-on-x86_64.patch.
* Also fixed powerpc64, this is just fixed by conclusion since we don't suport ppc64.
[YOCTO #2179]
--- .../nspr/files/fix-build-on-x86_64.patch | 51 ++++++++++++++++ .../nspr/files/trickly-fix-build-on-x86_64.patch | 62 ++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.8.9.bb | 4 +- 3 files changed, 116 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-support/nspr/files/fix-build-on-x86_64.patch create mode 100644 meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch
meta/recipes-support/nspr/files/fix-build-on-x86_64.patch new file +51 -0
@@ -0,0 +1,51 @@ +Fix build failure on x86_64 + +When the target_cpu is x86_64, we should assume that the pkg uses 64bit, +only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a +opposite logic before. + +Signed-off-by: Robert Yang <[email protected]> + +Upstream-Status: Pending +--- + configure.in | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure.in b/configure.in +index 39c96a3..99a03ac 100644 +--- a/configure.in ++++ b/configure.in +@@ -1778,24 +1778,24 @@ tools are selected during the Xcode/Developer Tools installation.]) + PR_MD_ASFILES=os_Linux_ia64.s + ;; + x86_64) +- if test -n "$USE_64"; then +- PR_MD_ASFILES=os_Linux_x86_64.s +- else ++ if test -n "$USE_N32"; then + AC_DEFINE(i386) + PR_MD_ASFILES=os_Linux_x86.s + CC="$CC -m32" + CXX="$CXX -m32" ++ else ++ PR_MD_ASFILES=os_Linux_x86_64.s + fi + ;; + ppc|powerpc) + PR_MD_ASFILES=os_Linux_ppc.s + ;; + powerpc64) +- if test -n "$USE_64"; then ++ if test -n "$USE_N32"; then ++ PR_MD_ASFILES=os_Linux_ppc.s ++ else + CC="$CC -m64" + CXX="$CXX -m64" +- else +- PR_MD_ASFILES=os_Linux_ppc.s + fi + ;; + m68k) +-- +1.7.1 +
meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch new file +62 -0
62 lines not on this page · raw message
meta/recipes-support/nspr/nspr_4.8.9.bb +3 -1
@@ -5,10 +5,12 @@ LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=40;md5=99d4d7d68bbc4 file://Makefile.in;beginline=4;endline=38;md5=c2b512182a334e1bfa1edc4d1c84a298 " SECTION = "libs/network" -PR = "r2" +PR = "r3" SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \ file://remove-rpath-from-tests.patch \ + file://fix-build-on-x86_64.patch \ + file://trickly-fix-build-on-x86_64.patch \ " SRC_URI += "file://nspr.pc.in"
Signature · 1 line
1.7.1
Saul Wold
AppliedQuoted 23 lines · Robert Yang
* The test info, tested on:
-> The hosts are: Fedora 16 64bit, Ubuntu 10.10 32bit -> The MACHINEs are: qemux86, qemux86-64 and qemuarm// Robert
The following changes since commit
d3e0beed9eef53018158c9f999cd20b44629aa61:guile: Deal with hardcoded path issues (2012-03-27 00:29:00 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/nspr
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/nsprRobert Yang (1):
nspr 4.8.9: failed to build onx86_64board.../nspr/files/fix-build-on-x86_64.patch | 51 ++++++++++++++++ .../nspr/files/trickly-fix-build-on-x86_64.patch | 62 ++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.8.9.bb | 4 +- 3 files changed, 116 insertions(+), 1 deletions(-)
Quoted 9 lines
create mode 100644
meta/recipes-support/nspr/files/fix-build-on-x86_64.patchcreate mode 100644meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Merged into OE-Core
Thanks
Sau!