Build failure when cross-compiling with --disable-assembly for some architectures

Brett Neumeier brett at neumeier.us
Thu Oct 1 01:28:43 UTC 2015


Good evening GMP developers!

(I tried to submit this same bug report on Sept 20 from a gmail email
account, but it never went through. If that's because it's awaiting
moderation, that's cool, please just approve one of the duplicate
emails. If it's because your list server is configured to block gmail...
IDK, maybe make a note of that as well as saying that email from China
is blocked?)


(Looking at the "reporting bugs" section of the manual, I think I'm
including all the requested information. If I've missed something,
please let me know!)

GMP version: 6.0.0a

Description:  When cross-compiling GMP, with an x86_64 build server and
a variety of target platforms, the build fails for some target
architectures (ARM, sparc) when GMP is configured with
--disable-assembly. Other architectures (at least MIPS) work fine
regardless of --disable-assembly.

The specific build failure encountered with the ARM --disable-assembly
build is:

-------- make output begins--------
/bin/bash ../libtool --tag=CC   --mode=compile
arm-cbl-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP
-I.. -DOPERATION_`echo div_qr_1n_pi1 | sed 's/_$//'`
-I/tmp/cblwork/sysroot/bootstrap/include -DNO_ASM -c -o div_qr_1n_pi1.lo
div_qr_1n_pi1.c
libtool: compile:  arm-cbl-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I..
-D__GMP_WITHIN_GMP -I.. -DOPERATION_div_qr_1n_pi1
-I/tmp/cblwork/sysroot/bootstrap/include -DNO_ASM -c div_qr_1n_pi1.c
-fPIC -DPIC -o .libs/div_qr_1n_pi1.o
div_qr_1n_pi1.c: In function '__gmpn_div_qr_1n_pi1':
div_qr_1n_pi1.c:140:49: error: expected ':' or ')' before '__CLOBBER_CC'
     : "r" (ah), "rI" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
                                                 ^
div_qr_1n_pi1.c:218:3: note: in expansion of macro 'add_mssaaaa'
   add_mssaaaa (u2, u1, u0, u0, up[n-2], p1, p0);
   ^
div_qr_1n_pi1.c:140:49: error: expected ':' or ')' before '__CLOBBER_CC'
     : "r" (ah), "rI" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
                                                 ^
div_qr_1n_pi1.c:256:7: note: in expansion of macro 'add_mssaaaa'
       add_mssaaaa (u2, u1, u0, u0, up[j], p1, p0);
       ^
Makefile:409: recipe for target 'div_qr_1n_pi1.lo' failed
make[2]: *** [div_qr_1n_pi1.lo] Error 1
make[2]: Leaving directory '/tmp/build/gmp-6.0.0/mpn'
-------- make output ends--------


Configure options:
* ./configure --build=x86_64-unknown-linux-gnu
--host=arm-cbl-linux-gnueabihf --target=arm-cbl-linux-gnueabihf
--enable-cxx --disable-assembly (fails with output above)
* ./configure --build=x86_64-unknown-linux-gnu
--host=arm-cbl-linux-gnueabihf --target=arm-cbl-linux-gnueabihf
--enable-cxx (succeeds)
* ./configure --build=x86_64-unknown-linux-gnu
--host=mipsel-cbl-linux-gnu --target=mipsel-cbl-linux-gnu --enable-cxx
--disable-assembly (succeeds)
* ./configure --build=x86_64-unknown-linux-gnu
--host=mipsel-cbl-linux-gnu --target=mipsel-cbl-linux-gnu --enable-cxx
(succeeds)

I'm attaching the output from the four separate "configure" runs, along
with the output of "make" for the failed build.

"arm-cbl-linux-gnueabihf-gcc -v" reports:
Reading specs from
/tmp/cblwork/cross-tools/lib/gcc/arm-cbl-linux-gnueabihf/5.2.1/specs
COLLECT_GCC=arm-cbl-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/tmp/cblwork/cross-tools/libexec/gcc/arm-cbl-linux-gnueabihf/5.2.1/lto-wrapper
Target: arm-cbl-linux-gnueabihf
Configured with: /tmp/build/gcc-5.2.0/configure
--prefix=/tmp/cblwork/cross-tools --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=arm-cbl-linux-gnueabihf
--with-sysroot=/tmp/cblwork/sysroot
--with-build-sysroot=/tmp/cblwork/sysroot --disable-multilib
--disable-nls --disable-libquadmath --enable-languages=c,c++
--enable-__cxa_atexit --enable-shared --enable-c99 --enable-long-long
--enable-threads=posix --with-native-system-header-dir=/bootstrap/include
Thread model: posix
gcc version 5.2.1 20150901 (GCC)

"mipsel-cbl-linux-gnu-gcc -v" reports:
Reading specs from
/tmp/cblwork/cross-tools/lib/gcc/mipsel-cbl-linux-gnu/5.2.1/specs
COLLECT_GCC=mipsel-cbl-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/tmp/cblwork/cross-tools/libexec/gcc/mipsel-cbl-linux-gnu/5.2.1/lto-wrapper
Target: mipsel-cbl-linux-gnu
Configured with: /tmp/build/gcc-5.2.0/configure
--prefix=/tmp/cblwork/cross-tools --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=mipsel-cbl-linux-gnu
--with-sysroot=/tmp/cblwork/sysroot
--with-build-sysroot=/tmp/cblwork/sysroot --disable-multilib
--disable-nls --disable-libquadmath --enable-languages=c,c++
--enable-__cxa_atexit --enable-shared --enable-c99 --enable-long-long
--enable-threads=posix --with-native-system-header-dir=/bootstrap/include
Thread model: posix
gcc version 5.2.1 20150919 (GCC)

"uname -a" reports:
Linux plugh 3.19.3 #1 SMP PREEMPT Sat Apr 4 15:24:49 CDT 2015 x86_64
x86_64 x86_64 GNU/Linux

"./config.guess" reports:
x86_64-unknown-linux-gnu

"./configfsf.guess" reports:
x86_64-unknown-linux-gnu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-enableassembly.out.bz2
Type: application/x-bzip
Size: 4531 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20150930/841fba34/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-disableassembly.out.bz2
Type: application/x-bzip
Size: 4272 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20150930/841fba34/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-arm-disableassembly.out.bz2
Type: application/x-bzip
Size: 4132 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20150930/841fba34/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-enableassembly.out.bz2
Type: application/x-bzip
Size: 4612 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20150930/841fba34/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-disableassembly.out.bz2
Type: application/x-bzip
Size: 4292 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20150930/841fba34/attachment-0009.bin>


More information about the gmp-bugs mailing list