tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

'./build.sh tools' failed on earm



Hi!


On my earm machine, build.sh became an error and I am already in trouble
for a long time.
I understood this problem at last.

===> build.sh command:    ./build.sh -O obj tools
===> build.sh started:    Wed Jun 11 22:44:02 JST 2014
===> NetBSD version:      6.99.43
===> MACHINE:             evbarm
===> MACHINE_ARCH:        arm
===> Build platform:      NetBSD 6.99.41 evbarm
 :
 <snip>
 :
dependall-gcc ===> .
dependall ===> gcc
 :
 <snip>
 :
checking for the correct version of the gmp/mpfr/mpc libraries... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.
 :
 <snip>
 :


----------------

obj/tools/gcc/build/config.log:
 <snip>
 :
configure:5650: cc -o conftest -O 
-I/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/include 
-I/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/include 
-I/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/include    conftest.c  
-L/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib 
-L/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib 
-L/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib -lmpc -lmpfr -lgmp >&5
/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib/libgmp.a(powm_ui.o): In function 
`__gmpz_powm_ui':
powm_ui.c:(.text+0x4dc): undefined reference to `__gmpn_invert_limb'
/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib/libgmp.a(divrem_1.o): In 
function `__gmpn_divrem_1':
divrem_1.c:(.text+0xb8): undefined reference to `__gmpn_invert_limb'
divrem_1.c:(.text+0x2c0): undefined reference to `__gmpn_invert_limb'
/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib/libgmp.a(divrem_2.o): In 
function `__gmpn_divrem_2':
divrem_2.c:(.text+0x6c): undefined reference to `__gmpn_invert_limb'
/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib/libgmp.a(div_q.o): In function 
`__gmpn_div_q':
div_q.c:(.text+0x1d4): undefined reference to `__gmpn_invert_limb'
/usr/src/obj/tooldir.NetBSD-6.99.41-evbarm/lib/libgmp.a(div_q.o):div_q.c:(.text+0x540):
 more undefined references to `__gmpn_invert_limb' follow
configure:5650: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <mpc.h>
| int
| main ()
| {
| 
|     mpfr_t n;
|     mpfr_t x;
|     mpc_t c;
|     int t;
|     mpfr_init (n);
|     mpfr_init (x);
|     mpfr_atan2 (n, n, x, GMP_RNDN);
|     mpfr_erfc (n, x, GMP_RNDN);
|     mpfr_subnormalize (x, t, GMP_RNDN);
|     mpfr_clear(n);
|     mpfr_clear(x);
|     mpc_init2 (c, 53);
|     mpc_set_ui_ui (c, 1, 1, MPC_RNDNN);
|     mpc_cosh (c, c, MPC_RNDNN);
|     mpc_pow (c, c, c, MPC_RNDNN);
|     mpc_acosh (c, c, MPC_RNDNN);
|     mpc_clear (c);
| 
|   ;
|   return 0;
| }
configure:5654: result: no
configure:5675: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 
0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
 :
 <snip>

----------------

hmm... :-<
I look.

  $ nm obj/tooldir.NetBSD-6.99.41-evbarm/lib/libgmp.a | grep __gmpn_invert_limb 
| sort -u
         U __gmpn_invert_limb


I found invert_limb.asm in under arm directory.

  $ find external/lgpl3/gmp/dist/mpn/arm -name invert_limb\*
  external/lgpl3/gmp/dist/mpn/arm/invert_limb.asm

But I not found link to that in obj directory.  X-<

  $ ls obj/tools/gmp/build/mpn/*asm
  ls: No match.


I understood that the link to the asm file of MD could not be created
in earm.  In earm, I think that the same processing as arm is required.

Index: configure
===================================================================
RCS file: /cvsroot/src/external/lgpl3/gmp/dist/configure,v
retrieving revision 1.3
diff -u -r1.3 configure
--- configure   29 Nov 2013 07:57:10 -0000      1.3
+++ configure   11 Jun 2014 13:36:32 -0000
@@ -4142,7 +4142,7 @@
     ;;
 
 
-  arm*-*-*)
+  arm*-*-* | earm*-*-*)
     gcc_cflags="$gcc_cflags $fomit_frame_pointer"
     gcc_cflags_optlist="arch tune"
     gcc_cflags_maybe="-marm"


I was able to do building of tools in this fix.
I do not understand in better method with this fix.
For an earm user, I ask you for more better fix.

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index