#46801 closed defect (fixed)
ld64-127 causes build failures with Leopard/ppc (G4)
Reported by: | zzanderr | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | PPC G4 Leopard | Cc: | mojca (Mojca Miklavec), kencu (Ken) |
Port: | ld64 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
The default choice for OS X 10.5.8, at least on 32-bit G4's, is ld64 +ld64_127. Out of the box, libgcc @4.9.2_1 will not build using this variant.
You might try adjusting the defaults for various particular platforms and OS versions (for all I know, ld64 +ld64_127 may work on a 64-bit G5).
While posting to an open ticket for libgcc, I noticed other people are having the same problem: #46557 and #45174. These failures might also be confounded with a recurring libgcc bootstrap regression issue (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63703).
NB: I am in the middle of rebuilding MacPorts from scratch after the registry became corrupted, prior to the failure of my PowerBook's DC-power logic board, for which I waited two weeks for a replacement. After the libgcc @4.9.2_1 build failed, I tried compiling libgcc @4.9.1_1, which worked back in November--again, failure. Then, following a vague suspicion that the root lay in the new division of ld64, I installed ld64 +ld64_97 and tried a third time--finally success. The failed attempts both boinked near the end of the build--over 6 hours on a PowerBook G4 @1.67 GHz. So I enjoyed an entire day of head-scratching and teeth-gnashing, all with little hope of success.
(Sorry, I needed to vent.) I realize you are a volunteer, and I sincerely thank you for your effort.
ld64_97's log unfortunately clobbered ld64-127's log, which consisted mostly of warnings, even though ld64-127 installed without so much as a burp. So below are logs of libgcc's failed and successful builds. I will also post them here: #46557.
Attachments (3)
Change History (19)
Changed 10 years ago by zzanderr
Attachment: | libgcc-4.9.2_1-BAD_main.log added |
---|
Changed 10 years ago by zzanderr
Attachment: | libgcc-4.9.2_1-GOOD_main.log added |
---|
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | libgcc removed |
Owner: | changed from macports-tickets@… to jeremyhu@… |
comment:2 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Status: | new → assigned |
---|
comment:3 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Summary: | ld64 @2 +ld64_127 : Wrong default for G4 Leopard → ld64-127 causes build failures with Leopard/ppc (G4) |
---|
comment:4 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
:info:build ld: 32-bit absolute address out of range (0x140D68FBC max is 4GB): from vtable for (anonymous namespace)::pass_branch_target_load_optimize2 + 0x0000001C
comment:5 follow-up: 6 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Would you be able to figure out the exact invocation of the failing command (run the failing gcc command with -v -Wl,-v to get verbose details) and send me a tarball containing all the the object files and libraries involved, so I can try reproducing this?
comment:6 Changed 10 years ago by zzanderr
Replying to jeremyhu@…:
Would you be able to figure out the exact invocation of the failing command (run the failing gcc command with -v -Wl,-v to get verbose details) and send me a tarball containing all the the object files and libraries involved, so I can try reproducing this?
Could you clarify this? I'm not sure I understand.
comment:7 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
This is the failing command:
/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/./prev-gcc/xg++ -B/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/./prev-gcc/ -B/mp2/local/ppc-apple-darwin9/bin/ -nostdinc++ -B/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-ppc-apple-darwin9/libstdc++-v3/src/.libs -B/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-ppc-apple-darwin9/libstdc++-v3/libsupc++/.libs -I/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-ppc-apple-darwin9/libstdc++-v3/include/ppc-apple-darwin9 -I/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-ppc-apple-darwin9/libstdc++-v3/include -I/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.2/libstdc++-v3/libsupc++ -L/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-ppc-apple-darwin9/libstdc++-v3/src/.libs -L/mp2/local/var/macports/build/_mp2_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-ppc-apple-darwin9/libstdc++-v3/libsupc++/.libs -g -O2 -mdynamic-no-pic -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-array-notation.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o darwin-c.o rs6000-c.o cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/mp2/local/lib -lcloog-isl -L/mp2/local/lib -lisl -L/mp2/local/lib -L/mp2/local/lib -L/mp2/local/lib -lmpc -lmpfr -lgmp -lz
Run that at the appropriate location with the additional args: '-v -Wl,-v' that will show more verbose information, including the command line to ld.
Send me all of the relvant files (all the .o and .a files as well as libmpc, libmpfr, libgmp, and libz) and the command line to ld, so I can reproduce the problem.
comment:8 follow-up: 10 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
I suspect a subtraction is being done, similar to the comment here:
comment:9 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Yeah, I see the problem. I'll get a fix in soon.
comment:10 Changed 10 years ago by zzanderr
Replying to jeremyhu@…:
I suspect a subtraction is being done, similar to the comment here:
Just deactivated libgcc, ld64 and ld64-97, then reinstalled ld64-127 to get a log.
I can try to rebuild libgcc with ld-127--unless you have solved it already...
Changed 10 years ago by zzanderr
Attachment: | ld64-127_debug.log added |
---|
comment:11 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 Changed 10 years ago by zzanderr
Great! I'll try it out tomorrow night. Thanks for the quick work.
comment:13 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Thanks for testing. If you run into the issue again (or something similar), grab the relevant files, so I can reproduce it.
comment:15 Changed 3 years ago by kencu (Ken)
Cc: | kencu added |
---|
comment:16 Changed 2 years ago by barracuda156
Quite surprisingly, I have got an error with gcc48 now towards the very end of the build: turned out, ld64-97 +llvm5 was responsible. Activated +llvm33, and the build proceeded through completion. I have had a similar case when ld64-127 failed building some other gcc version.
(This is just for the record, no fixes needed.)
Thanks for the detailed report. It is very much expected that ld64-127 should work with Leopard/ppc. Indeed, we're trying to also get it to work with Tiger, so we can eventually drop the ancient ld64-97 port.