[MacPorts] #47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 ----------------------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: Symbol not found: _strncmp | Port: llvm-gcc42 ----------------------------------------+-------------------------------- While updating {{{llvm-gcc42}}} from {{{2336.11_1}}} to {{{2336.11_2}}} on 10.6.8 I was surprised to run into trouble like {{{dyld: lazy symbol binding failed: Symbol not found: _strncmp}}}. BTW, I am wondering that {{{llvm-gcc42}}} itself is being automatically selected for building. Below is the most relevant excerpt. I am hesitating to directly report to [http://developer.apple.com/bugreporter] {{{ ... :info:build /usr/bin/llvm-gcc-4.2 -pipe -std=gnu89 -c -g -std=gnu89 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mdynamic-no-pic -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/opt/local/var/macports/build /_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/src/gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/src/gcc/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm- gcc42/work/objroot/src/gcc/../include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm- gcc42/work/objroot/src/gcc/../libcpp/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm- gcc42/work/objroot/src/gcc/../libdecnumber -I../libdecnumber -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/dst- llvmCore/Developer/usr/local/include -DENABLE_LLVM -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/dst- llvmCore/Developer/usr/local/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"2336.11"' -DBUILD_LLVM_APPLE_STYLE -o build/gencondmd.o build/gencondmd.c :info:build dyld: lazy symbol binding failed: Symbol not found: _strncmp :info:build Referenced from: /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686 -apple-darwin10/4.2.1/cc1 :info:build Expected in: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/obj- x86_64-x86_64/./gcc/libllvmgcc.dylib :info:build :info:build dyld: Symbol not found: _strncmp :info:build Referenced from: /usr/llvm-gcc-4.2/bin/../libexec/gcc/i686 -apple-darwin10/4.2.1/cc1 :info:build Expected in: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/obj- x86_64-x86_64/./gcc/libllvmgcc.dylib :info:build :info:build Stack dump: :info:build 0. Program arguments: /usr/llvm- gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/cc1 -quiet -I. -Ibuild -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/src/gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/src/gcc/build -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm- gcc42/work/objroot/src/gcc/../include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm- gcc42/work/objroot/src/gcc/../libcpp/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm- gcc42/work/objroot/src/gcc/../libdecnumber -I../libdecnumber -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/dst- llvmCore/Developer/usr/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/objroot/dst- llvmCore/Developer/usr/local/include -imultilib x86_64 -iprefix /usr/llvm- gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/ -D__DYNAMIC__ -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE -DENABLE_LLVM -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO="2336.11" -DBUILD_LLVM_APPLE_STYLE build/gencondmd.c -feliminate-unused-debug-symbols -quiet -dumpbase gencondmd.c -mmacosx- version-min=10.6 -mdynamic-no-pic -m64 -mtune=core2 -auxbase-strip build/gencondmd.o -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -std=gnu89 -std=gnu89 -o - :info:build i686-apple-darwin10-llvm-gcc-4.2: Internal error: Segmentation fault (program cc1) :info:build Please submit a full bug report. :info:build See <URL:http://developer.apple.com/bugreporter> for instructions. :info:build make[5]: *** [build/gencondmd.o] Error 1 :info:build rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod :info:build make[4]: *** [all-stage1-gcc] Error 2 :info:build make[3]: *** [stage1-bubble] Error 2 :info:build make[2]: *** [all] Error 2 :info:build + exit 1 :info:build make[1]: *** [llvmgcc42] Error 1 ... }}} -- Ticket URL: <https://trac.macports.org/ticket/47929> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: Symbol not found: _strncmp => * cc: ryandesign@… (added) Comment: Replying to [ticket:47929 braumann@…]:
While updating {{{llvm-gcc42}}} from {{{2336.11_1}}} to {{{2336.11_2}}} on 10.6.8 I was surprised to run into trouble like {{{dyld: lazy symbol binding failed: Symbol not found: _strncmp}}}.
Hmm. Yesterday's update of llvm-gcc42 was done for the benefit of Yosemite, on which llvm-gcc42 couldn't be built until now. It's certainly possible this has introduced problems for earlier platforms, though this was not intended.
BTW, I am wondering that {{{llvm-gcc42}}} itself is being automatically selected for building.
Well, the llvm-gcc42 port will not build using a compiler installed by an already-installed llvm-gcc42 port. What you're seeing in the log is that the llvm-gcc42 port is being compiled using the version of the llvm-gcc42 compiler that came with Xcode. Theoretically, that should work. However, on my Snow Leopard system, Xcode gcc42 is used, not llvm-gcc42, and I don't see anything in the llvm-gcc42 portfile that would explain why Xcode llvm-gcc42 was selected instead on your system. Do you really need MacPorts llvm-gcc42? Is the version provided by Xcode not sufficient for your needs? It is true that the MacPorts version is ever so slightly newer than the version provided by Xcode, but there are only a few small differences.
Below is the most relevant excerpt. I am hesitating to directly report to [http://developer.apple.com/bugreporter]
You're probably right not to report this to Apple; they've moved on from llvm-gcc. We keep it around mainly for the benefit of very old software that has not yet been fixed to compile properly with clang on newer systems. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by ryandesign@…): Looking more closely at the error, it is wrong (and surely the cause of the error message) that Xcode llvm-gcc42 is trying to load a library that was just built for MacPorts llvm-gcc42, but that can probably be explained by the build system setting `DYLD_LIBRARY_PATH` to its own build directory. I see in the log that the configure script determined that `DYLD_LIBRARY_PATH` could be used, and setting it to a build directory will have the effect of any program using the libraries in that directory instead of wherever the program was configured to look for them normally. We could simply blacklist Xcode llvm-gcc42 as well, and MacPorts will move on to the next-best compiler. As to why MacPorts didn't use Xcode gcc42 on your system as it did on mine: the only explanation I can come up with is that you might be using Xcode 4.2, which does not include gcc42. Is that the case? -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by braumann@…): Indeed, I have installed Xcode 4.2 some time ago. Originally, I had Xcode 3.2.6. Xcode 4.2 is the highest Xcode version running on 10.6.8. I was not aware that installing Xcode 4.2 influences preferences for compiler selection inside MP. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by ryandesign@…): Yes, it does. With Xcode 3.1.x and 3.2.x on Snow Leopard, the default compiler is Apple gcc42. In Xcode 4.x, the default compiler is llvm-gcc42. In Xcode 4.2, Apple removed gcc42. Because Xcode 4 on Snow Leopard was paid software, much fewer users use it, so problems like this come up much more often, which is why we recommend using Xcode 3.2.6 on Snow Leopard, unless you have some other reason to need Xcode 4.2. But I do intend to fix this. My Snow Leopard machine is currently busy building llvm-gcc42 with Xcode gcc42 to verify that works. Then I'll retry with Xcode llvm-gcc42 to verify that fails. Then I'll retry after blacklisting Xcode llvm-gcc42 to see what compiler it picks and if it builds ok. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by ryandesign@…): I was not able to reproduce the issue on my Snow Leopard machine. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by jeremyhu@…): Reproducing with DYLD_PRINT_ENV=1 DYLD_PRINT_LIBRARIES=1 in the environment might give some helpful information to see what's going on. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by jeremyhu@…): Also note that '/usr/llvm-gcc-4.2/libexec/gcc/i686-apple- darwin10/4.2.1/cc1' is from CLTools and not in Xcode proper. Please report the output of: {{{ otool -l /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/cc1 | grep uuid }}} As that will help identifiy which version of CLTools you have installed. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by braumann@…): {{{ $ otool -l /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/cc1 | grep uuid uuid F108C664-F90E-3B30-AEF9-A31D0C17F292 }}} I will activate the two environment variables and than will post the main.log again. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by jeremyhu@…): And what version of CLTools do you think that is from? What's the output of '/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/cc1 --version' ? -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by braumann@…): {{{ $ /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/cc1 --version GNU C version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) (i686-apple-darwin10) compiled by GNU C version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00). GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=65536 }}} -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by braumann@…): Setting {{{DYLD_PRINT_ENV=1}}} and {{{DYLD_PRINT_LIBRARIES=1}}}, though making my console verbose, apparently had no effect on main.log or the console during my build attempts using the XCode 4.2 shipped llvm-gcc-42 to build macports-llvm-gcc-4.2. I always end up with the problem I have pasted above. For the moment I give up an simply build macports-llvm-gcc-42 (i.e. {{{llvm-gcc42 @2336.11_2}}}) using gcc-42 from XCode 3.2.6: {{{ $ sudo port install llvm-gcc42 configure.compiler=gcc-4.2 }}} -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by jeremyhu@…): How did you set the envvar? You need to set those envvars in the environment that spawns /usr/bin/llvm-gcc-4.2. I'd suggest setting it in build.env. Is that what failed?
though making my console verbose, apparently had no effect on main.log or the console
Those statements are contradictory. You say it had no effect on the console and that it made the console output more verbose. Which is it? Did it makes the output more verbose? If so, please show me the requested output from the failed execution. -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:13> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by braumann@…): Sorry for the confusion, I put the {{{ export DYLD_PRINT_ENV=1 export DYLD_PRINT_LIBRARIES=1 }}} into {{{.bashrc}}}, but as I got aware just now, these settings have no effect since I call {{{port}}} as {{{sudo port}}}. Could you please advice me how to set {{{build.env}}}? -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:14> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by larryv@…): Run this and add the new variables at the appropriate place (somewhere between lines 129 and 145 in the current portfile): {{{ sudo -e $(port file llvm-gcc42) }}} -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:15> MacPorts <https://www.macports.org/> Ports system for OS X
#47929: llvm-gcc42 @2336.11_2 fails building on 10.6.8 -------------------------+-------------------------------- Reporter: braumann@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: llvm-gcc42 | -------------------------+-------------------------------- Comment (by braumann@…): Thanks, I have added the two variables in the Portfile {{{ ... 145 OTOOL64=${prefix}/bin/otool \ 146 DYLD_PRINT_ENV=1 \ 147 DYLD_PRINT_LIBRARIES=1 ... }}} Please see main_DYLD.log.gz, my impression is that a different problem occurs now, but have a look by yourself. Thanks! -- Ticket URL: <https://trac.macports.org/ticket/47929#comment:16> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts