#22359 closed defect (invalid)
g95 make failure on Snow Leopard (/usr/bin/libtool: internal link edit command failed)
Reported by: | adrean304@… | Owned by: | tenomoto (Takeshi Enomoto) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | snowleopard | Cc: | dershow, mjhsieh@…, ge.ffw.d@… |
Port: | g95 |
Description
Hi,
g95 failed during configuration on Snow Leopard. Here is the output:
~$ sudo port install g95 ---> Computing dependencies for g95 ---> Fetching g95 ---> Attempting to fetch g95_source.tgz from http://distfiles.macports.org/gcc40 ---> Verifying checksum(s) for g95 ---> Extracting g95 ---> Applying patches to g95 ---> Configuring g95 Error: Target org.macports.configure returned: shell command "unset CPPFLAGS; unset LDFLAGS; export CPPFLAGS=-I/opt/local/include; cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_g95/work/gcc-4.0.4/g95; ../configure --prefix=/opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4 --with-libiconv-prefix=/opt/local/include --enable-languages=c --with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-nm=/usr/bin/nm --with-included-gettext; make" returned error 2 Command output: cat ../../gcc/libgcc-std.ver \ | sed -e '/^[ ]*#/d' \ -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \ | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_g95/work/gcc-4.0.4/g95/gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_g95/work/gcc-4.0.4/g95/gcc/ -B/opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/bin/ -B/opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/lib/ -isystem /opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/include -isystem /opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include -E -xassembler-with-cpp -; \ } | awk -f ../../gcc/mkmap-flat.awk -v leading_underscore=1 > libgcc/./tmp-libgcc.map mv 'libgcc/./tmp-libgcc.map' libgcc/./libgcc.map /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_g95/work/gcc-4.0.4/g95/gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_g95/work/gcc-4.0.4/g95/gcc/ -B/opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/bin/ -B/opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/lib/ -isystem /opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/include -isystem /opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/i386-apple-darwin10.0.0/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -dynamiclib -nodefaultlibs -Wl,-install_name,/opt/local/lib/gcc-lib/i386-apple-darwin10.0.0/4.0.4/lib/libgcc_s.1.0.dylib -Wl,-flat_namespace -o ./libgcc_s.1.0.dylib.tmp -Wl,-exported_symbols_list,libgcc/./libgcc.map -compatibility_version 1 -current_version 1.0 libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_floatdidf_s.o libgcc/./_floatdisf_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-darwin_s.o libgcc/./unwind-sjlj_s.o libgcc/./unwind-c_s.o -lc && rm -f ./libgcc_s.dylib && if [ -f ./libgcc_s.1.0.dylib ]; then mv -f ./libgcc_s.1.0.dylib ./libgcc_s.1.0.dylib.backup; else true; fi && mv ./libgcc_s.1.0.dylib.tmp ./libgcc_s.1.0.dylib && ln -s libgcc_s.1.0.dylib ./libgcc_s.dylib Undefined symbols: "___builtin_object_size", referenced from: _uw_frame_state_for in unwind-dw2_s.o _uw_frame_state_for in unwind-dw2_s.o ___frame_state_for in unwind-dw2_s.o ___frame_state_for in unwind-dw2_s.o _uw_install_context_1 in unwind-dw2_s.o _uw_install_context_1 in unwind-dw2_s.o _uw_install_context_1 in unwind-dw2_s.o _uw_init_context_1 in unwind-dw2_s.o _uw_init_context_1 in unwind-dw2_s.o "___builtin___memcpy_chk", referenced from: _uw_install_context_1 in unwind-dw2_s.o _uw_install_context_1 in unwind-dw2_s.o "___builtin___memset_chk", referenced from: _uw_frame_state_for in unwind-dw2_s.o ___frame_state_for in unwind-dw2_s.o _uw_init_context_1 in unwind-dw2_s.o ld: symbol(s) not found /usr/bin/libtool: internal link edit command failed make[2]: *** [libgcc_s.dylib] Error 1 make[1]: *** [libgcc.a] Error 2 make: *** [all-gcc] Error 2 Error: Status 1 encountered during processing.
Attachments (4)
Change History (19)
comment:1 Changed 15 years ago by mf2k (Frank Schima)
Keywords: | make fail failure removed |
---|---|
Owner: | changed from macports-tickets@… to takeshi@… |
comment:2 Changed 15 years ago by tenomoto (Takeshi Enomoto)
Changed 15 years ago by tenomoto (Takeshi Enomoto)
Attachment: | g95.tar.bz2 added |
---|
comment:7 Changed 15 years ago by mjhsieh@…
It would be nice if someone could test the attached Portfile and patches.
I successfully built a g95 with the attached Portfile and patches. I successfully built some tools from http://ambermd.org using this g95.
comment:8 Changed 15 years ago by blb@…
Cc: | ge.ffw.d@… added |
---|---|
Keywords: | snowleopard added |
Cc reporter of dup #22382.
Changed 15 years ago by tenomoto (Takeshi Enomoto)
Attachment: | g95-20091106.tar.bz2 added |
---|
comment:9 Changed 15 years ago by mjhsieh@…
This 20091106 new attachment only works on +gcc42 variant, the checksum record should include the data from default variant (gcc4.04).
comment:10 Changed 15 years ago by tenomoto (Takeshi Enomoto)
comment:11 Changed 15 years ago by tenomoto (Takeshi Enomoto)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Changed 14 years ago by jabronson@…
Attachment: | g95-error.txt added |
---|
comment:12 Changed 14 years ago by jabronson@…
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I just tried installing g95 with the gcc42 variant disabled and am getting the error I just attached.
comment:13 Changed 14 years ago by tenomoto (Takeshi Enomoto)
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
I cannot build g95 with 4.0.4 either. That is why gcc42 is the default variant for Snow Leopard (comment 2 above).
Changed 14 years ago by jmroot (Joshua Root)
Attachment: | g95-error-no-gcc42.diff added |
---|
error out early if +gcc42 is needed but not set
comment:14 Changed 14 years ago by jmroot (Joshua Root)
How about doing something like the attached patch, just to make this completely clear?
I have been aware of the problem since the launch of Snow Leopard and have been trying hard to address it. I was not able to find a way to build gcc-4.0.4 and gcc-4.1.4 for x86_64. I was able to compile Apple modified gcc-5465 and g95 but failed at the link time due to many undefined symbols. I was able to link against gcc-4.3.4 with a numbers of twists but a produced executables did not work.
Finally I found that g95 can be linked against gcc-4.2.4 with a few patches. Simple programs like "hello, world" are compiled and executed without any problems. I was able to build g95 on Mac Book (Core Duo, i386) running Snow Leopard, Mac Book Pro (Core 2 Duo) running Tiger, Leopard (i386) and Snow Leopard (x86_64) and Power Mac G5 running Leopard (powerpc). I tried to change build_arch to x86_64 Mac Book Pro running Leopard but failed with pp5-locale-gettext (#19381). For x86_64, g95 produces x86_64 binaries ;-)
I would like to commit updates by weekend. In the meantime I will test the revised g95 with real world source code. It would be nice if someone could test the attached Portfile and patches.