Opened 10 years ago

Closed 10 years ago

#24637 closed defect (invalid)

libgmp missing during gcc45 build

Reported by: klaas_giesbertz@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: ryandesign (Ryan Schmidt)
Port: gcc45

Description

I have been building gcc45 on a G4 iBook with Xcode 3.1.4 (that's how far it go's with Leopard). However, it didn't find libgmp.dyllib.

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_ pt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build" && /usr/ in/make -j1 bootstrap " returned error 2
Command output: /bin/sh ../../libtool --tag=CC   --mode=link /opt/local/var/macports/build/_op _local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc  B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_port _lang_gcc45/work/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwi 9/lib/ -isystem /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys include    -fexceptions -fasynchronous-unwind-tables -g -O2 -no-undefined   -o libfdlibm.la  d oa.lo e_acos.lo e_asin.lo e_atan2.lo e_cosh.lo e_exp.lo e_fmod.lo e_hypot.lo e_log.lo e_log10. o e_pow.lo e_remainder.lo e_rem_pio2.lo e_scalb.lo e_sinh.lo e_sqrt.lo k_cos.lo k_rem_pio2.lo  _sin.lo k_tan.lo mprec.lo s_atan.lo s_cbrt.lo s_ceil.lo s_copysign.lo s_cos.lo s_expm1.lo s_fa s.lo sf_fabs.lo s_finite.lo s_floor.lo s_log1p.lo sf_rint.lo s_rint.lo s_scalbn.lo s_sin.lo s_ an.lo s_tanh.lo strtod.lo w_acos.lo w_asin.lo w_atan2.lo w_cosh.lo w_exp.lo w_fmod.lo w_hypot. o w_log.lo w_log10.lo w_pow.lo w_remainder.lo w_sinh.lo w_sqrt.lo 
libtool: link: /usr/bin/ar rc .libs/libfdlibm.a .libs/dtoa.o .libs/e_acos.o .libs/e_asin.o .li s/e_atan2.o .libs/e_cosh.o .libs/e_exp.o .libs/e_fmod.o .libs/e_hypot.o .libs/e_log.o .libs/e_ og10.o .libs/e_pow.o .libs/e_remainder.o .libs/e_rem_pio2.o .libs/e_scalb.o .libs/e_sinh.o .li s/e_sqrt.o .libs/k_cos.o .libs/k_rem_pio2.o .libs/k_sin.o .libs/k_tan.o .libs/mprec.o .libs/s_ tan.o .libs/s_cbrt.o .libs/s_ceil.o .libs/s_copysign.o .libs/s_cos.o .libs/s_expm1.o .libs/s_f bs.o .libs/sf_fabs.o .libs/s_finite.o .libs/s_floor.o .libs/s_log1p.o .libs/sf_rint.o .libs/s_ int.o .libs/s_scalbn.o .libs/s_sin.o .libs/s_tan.o .libs/s_tanh.o .libs/strtod.o .libs/w_acos.  .libs/w_asin.o .libs/w_atan2.o .libs/w_cosh.o .libs/w_exp.o .libs/w_fmod.o .libs/w_hypot.o .l bs/w_log.o .libs/w_log10.o .libs/w_pow.o .libs/w_remainder.o .libs/w_sinh.o .libs/w_sqrt.o 
libtool: link: /usr/bin/ranlib -c .libs/libfdlibm.a
libtool: link: ( cd ".libs" && rm -f "libfdlibm.la" && ln -s "../libfdlibm.la" "libfdlibm.la"  
Making all in jni
Making all in classpath
/bin/sh ../../../libtool --tag=CC   --mode=compile /opt/local/var/macports/build/_opt_local_va _macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/loc l/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc 5/work/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -i ystem /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys-include    -DHAVE_CONFIG_H -I. -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/classpath - ../../../include  -I../../../../../../../gcc-4.5.0/libjava/classpath/include -I../../../../../ ./../gcc-4.5.0/libjava/classpath/native/jni/classpath -I../../../../../../../gcc-4.5.0/libjava classpath/native/jni/native-lib  -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-pro otypes -Wno-long-long -Wstrict-prototypes -pedantic -fexceptions -fasynchronous-unwind-tables  g -O2 -MT jcl.lo -MD -MP -MF .deps/jcl.Tpo -c -o jcl.lo ../../../../../../../gcc-4.5.0/libjava classpath/native/jni/classpath/jcl.c
libtool: compile:  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macport .org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/loca /ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -isystem /opt/local/ppc-apple-darw n9/include -isystem /opt/local/ppc-apple-darwin9/sys-include -DHAVE_CONFIG_H -I. -I../../../.. ../../../gcc-4.5.0/libjava/classpath/native/jni/classpath -I../../../include -I../../../../../ ./../gcc-4.5.0/libjava/classpath/include -I../../../../../../../gcc-4.5.0/libjava/classpath/na ive/jni/classpath -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/native-lib -W  Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-proto ypes -pedantic -fexceptions -fasynchronous-unwind-tables -g -O2 -MT jcl.lo -MD -MP -MF .deps/j l.Tpo -c ../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/classpath/jcl.c  -fno-com on -DPIC -o .libs/jcl.o
mv -f .deps/jcl.Tpo .deps/jcl.Plo
/bin/sh ../../../libtool --tag=CC   --mode=compile /opt/local/var/macports/build/_opt_local_va _macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/loc l/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc 5/work/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -i ystem /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys-include    -DHAVE_CONFIG_H -I. -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/classpath - ../../../include  -I../../../../../../../gcc-4.5.0/libjava/classpath/include -I../../../../../ ./../gcc-4.5.0/libjava/classpath/native/jni/classpath -I../../../../../../../gcc-4.5.0/libjava classpath/native/jni/native-lib  -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-pro otypes -Wno-long-long -Wstrict-prototypes -pedantic -fexceptions -fasynchronous-unwind-tables  g -O2 -MT jnilink.lo -MD -MP -MF .deps/jnilink.Tpo -c -o jnilink.lo ../../../../../../../gcc-4 5.0/libjava/classpath/native/jni/classpath/jnilink.c
libtool: compile:  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macport .org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/loca /ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -isystem /opt/local/ppc-apple-darw n9/include -isystem /opt/local/ppc-apple-darwin9/sys-include -DHAVE_CONFIG_H -I. -I../../../.. ../../../gcc-4.5.0/libjava/classpath/native/jni/classpath -I../../../include -I../../../../../ ./../gcc-4.5.0/libjava/classpath/include -I../../../../../../../gcc-4.5.0/libjava/classpath/na ive/jni/classpath -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/native-lib -W  Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-proto ypes -pedantic -fexceptions -fasynchronous-unwind-tables -g -O2 -MT jnilink.lo -MD -MP -MF .de s/jnilink.Tpo -c ../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/classpath/jnilink c  -fno-common -DPIC -o .libs/jnilink.o
mv -f .deps/jnilink.Tpo .deps/jnilink.Plo
/bin/sh ../../../libtool --tag=CC   --mode=link /opt/local/var/macports/build/_opt_local_var_m cports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/ ar/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/ ork/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -isys em /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys-include    -  -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-pro otypes -pedantic -fexceptions -fasynchronous-unwind-tables -g -O2 -no-undefined  -o libclasspa h.la  jcl.lo jnilink.lo  
libtool: link: /usr/bin/ar rc .libs/libclasspath.a .libs/jcl.o .libs/jnilink.o 
libtool: link: /usr/bin/ranlib -c .libs/libclasspath.a
libtool: link: ( cd ".libs" && rm -f "libclasspath.la" && ln -s "../libclasspath.la" "libclass ath.la" )
Making all in java-math
/bin/sh ../../../libtool --tag=CC   --mode=compile /opt/local/var/macports/build/_opt_local_va _macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/loc l/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc 5/work/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -i ystem /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys-include    -DHAVE_CONFIG_H -I. -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/java-math - ../../../include  -I../../../../../../../gcc-4.5.0/libjava/classpath/include -I../../../../../ ./../gcc-4.5.0/libjava/classpath/native/jni/classpath -I../../../../../../../gcc-4.5.0/libjava classpath/native/jni/native-lib  -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-pro otypes -Wno-long-long  -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_ja a_math_GMP.Tpo -c -o gnu_java_math_GMP.lo ../../../../../../../gcc-4.5.0/libjava/classpath/nat ve/jni/java-math/gnu_java_math_GMP.c
libtool: compile:  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macport .org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/loca /ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -isystem /opt/local/ppc-apple-darw n9/include -isystem /opt/local/ppc-apple-darwin9/sys-include -DHAVE_CONFIG_H -I. -I../../../.. ../../../gcc-4.5.0/libjava/classpath/native/jni/java-math -I../../../include -I../../../../../../../gcc-4.5.0/libjava/classpath/include -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/classpath -I../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c ../../../../../../../gcc-4.5.0/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c  -fno-common -DPIC -o .libs/gnu_java_math_GMP.o
mv -f .deps/gnu_java_math_GMP.Tpo .deps/gnu_java_math_GMP.Plo
/bin/sh ../../../libtool --tag=CC   --mode=link /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -isystem /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys-include    -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long  -I/usr/include -g -O2 -version-info 0:0:0 -no-undefined -lgmp -avoid-version  -o libjavamath.la -rpath /opt/local/lib/gcc45/gcj-4.5.0-11 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo 
libtool: link: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/ -isystem /opt/local/ppc-apple-darwin9/include -isystem /opt/local/ppc-apple-darwin9/sys-include    -dynamiclib  -o .libs/libjavamath.dylib  .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o   /usr/local/lib/libgmp.dylib    -install_name  /opt/local/lib/gcc45/gcj-4.5.0-11/libjavamath.dylib  -Wl,-single_module
xgcc: /usr/local/lib/libgmp.dylib: No such file or directory
make[6]: *** [libjavamath.la] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-target-libjava] Error 2
make: *** [bootstrap] Error 2

Strangely enough, it was searching in /usr/local/lib instead of opt/local/lib where the library was available. Therefore, I simple put a symbolic link in the /usr/local/lib directory to the /opt/local/lib/libgmp/dylyb. Now gcc 4.5 installs. However, this doesn't seem to me the proper way how things should work things in MacPorts, so could anyone commend on what went wrong in the normal setup?

Attachments (1)

gmp45-build.log (193.0 KB) - added by danmichaelo+macports@… 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to mww@…

Please remember to cc the maintainer.

comment:2 Changed 10 years ago by danmichaelo+macports@…

In my case, I have an existing file there, but it's apparently not compatible. My build fails with

ld: pointer in read-only segment not allowed in slidable image, used in ___gmpn_divexact_1 from /usr/local/lib/libgmp.a(dive_1.o)
collect2: ld returned 1 exit status

How can I make MacPorts search for libgmp.a in /opt/local/lib/ before it searches in /usr/local/lib ?

comment:3 in reply to:  2 Changed 10 years ago by danmichaelo+macports@…

I should perhaps add in that my build fails at exactly the same place as the ticket reporter's build failed; upon building java-math:

Making all in java-math
/bin/sh ../../../libtool --tag=CC   --mode=link /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-darwin10/sys-include    -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long  -I/usr/include -g -O2 -version-info 0:0:0 -no-undefined -lgmp -avoid-version  -o libjavamath.la -rpath /opt/local/lib/gcc45/gcj-4.5.0-11 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo 
libtool: link: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-darwin10/sys-include    -dynamiclib  -o .libs/libjavamath.dylib  .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o   /usr/local/lib/libgmp.a    -install_name  /opt/local/lib/gcc45/gcj-4.5.0-11/libjavamath.dylib  -Wl,-single_module
ld: pointer in read-only segment not allowed in slidable image, used in ___gmpn_divexact_1 from /usr/local/lib/libgmp.a(dive_1.o)
collect2: ld returned 1 exit status

I'm on a Intel mac with 10.6.3 and XCode 3.2.2

Changed 10 years ago by danmichaelo+macports@…

Attachment: gmp45-build.log added

comment:4 Changed 10 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added
Resolution: invalid
Status: newclosed

It is not supported to have anything in /usr/local while using MacPorts because it can cause conflicts like this.

Remove what you have in /usr/local (or rename /usr/local to e.g. /usr/local-off) and in the future, don't install anything there; instead, use MacPorts to install any software you need.

After removing /usr/local, clean the affected port (sudo port clean gcc45) before trying again.

Note: See TracTickets for help on using tickets.