[MacPorts] #31663: llvm-gcc42 doesn't compile
#31663: llvm-gcc42 doesn't compile ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Hi, running "sudo port install llvm-gcc4" results in the following error (excerpt from the log file, which is attached): {{{ :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_lang_llvm-gcc42/llvm-gcc42/work/build" && /usr/bin/make -j2 -w bootstrap BOOT_CFLAGS="-O2 -g -D_FORTIFY_SOURCE=0" STAGE1_CFLAGS="-O2 -fkeep-inline-functions -D_FORTIFY_SOURCE=0" " returned error 2 }}} When running the second part of that shell command (make) by hand, the following error appears (full output attached): {{{ /Developer/usr/bin/clang -c -O2 -fkeep-inline-functions -D_FORTIFY_SOURCE=0 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict- prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic- macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format- attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -I. -I. -I ../../llvm-gcc-4.2-2.9.source/gcc -I../../llvm-gcc-4.2-2.9.source/gcc/. -I ../../llvm-gcc-4.2-2.9.source/gcc/../include -I../../llvm- gcc-4.2-2.9.source/gcc/../libcpp/include -I/opt/local/include -I/opt/local/include -I../../llvm-gcc-4.2-2.9.source/gcc/../libdecnumber -I../libdecnumber -I/opt/local/include -DENABLE_LLVM -I/opt/local/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS ../../llvm-gcc-4.2-2.9.source/gcc/passes.c -o passes.o ... ... ... ../../llvm-gcc-4.2-2.9.source/gcc/toplev.c:577:1: error: redefinition of a 'extern inline' function 'floor_log2' is not supported in C99 mode floor_log2 (unsigned HOST_WIDE_INT x) ^ ../../llvm-gcc-4.2-2.9.source/gcc/toplev.h:180:1: note: previous definition is here floor_log2 (unsigned HOST_WIDE_INT x) ^ ../../llvm-gcc-4.2-2.9.source/gcc/toplev.c:612:1: error: redefinition of a 'extern inline' function 'exact_log2' is not supported in C99 mode exact_log2 (unsigned HOST_WIDE_INT x) ^ ../../llvm-gcc-4.2-2.9.source/gcc/toplev.h:186:1: note: previous definition is here exact_log2 (unsigned HOST_WIDE_INT x) ^ 5 warnings and 2 errors generated. make[3]: *** [toplev.o] Error 1 }}} My system: MacOS 10.7.2, XCode 4.2, MacPorts 2.0.3 Any help appreciated (and as always I hope that the bug is not me...) Regards, planck -- Ticket URL: <https://trac.macports.org/ticket/31663> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Changes (by ryandesign@…): * cc: tobias.noebauer@… (removed) * cc: mfeiri@… (added) * owner: macports-tickets@… => erickt@… Comment: Out of curiosity, why do you want to compile the llvm-gcc42 port? Apple already includes a version of llvm-gcc-4.2 in Xcode. -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Comment(by tobias.noebauer@…): Ummm, because... I didn't know that, and for some reason it was not on the path (which was probably my fault). Thanks for the hint! -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Comment(by larry.velazquez@…): I tried using Apple's GCC to build {{{llvm-gcc42}}}, and it worked. {{{ sudo port install llvm-gcc42 # Installed dependencies, but failed on llvm-gcc itself sudo port install apple-gcc sudo port clean --all llvm-gcc42 sudo port install llvm-gcc42 configure.compiler=apple-gcc-4.2 }}} -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Comment(by larry.velazquez@…): To be clear, {{{llvm-gcc42}}} itself was the only port that was built using the compiler override. Whatever dependencies were installed had worked fine with the default. I am also on OS X 10.7.2, with Xcode 4.2 (4D199) and MacPorts 2.0.3. -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: clang | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Changes (by ryandesign@…): * cc: Sam.Halliday@… (added) * keywords: => clang Comment: Has duplicate #32117. Larry, thank you for finding out that llvm-gcc42 works when compiled with apple-gcc-4.2. However, we would rather compile with llvm-gcc-4.2, if that would work. See ProblemHotlist#compiler. Can you or someone try that? -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: clang | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Comment(by larry.velazquez@…): Replying to [comment:7 ryandesign@…]:
However, we would rather compile with llvm-gcc-4.2, if that would work. See ProblemHotlist#compiler. Can you or someone try that?
Building {{{llvm-gcc42}}} using llvm-gcc-4.2 works fine for me. I'm pretty sure all dependencies had been built using their default compilers. -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: clang | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Comment(by mmuurr@…): i encountered the same error, OS 10.7.2, Xcode 4.2.1, MacPorts 2.0.3 (fresh install, first command after selfupdate was "sudo port install R-framework"... all other dependencies up until llvm-gcc42 compiled/built fine). i, too, only got around it by switching compiler to apple-gcc-4.2. -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: clang | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Changes (by jmr@…): * cc: jeremyhu@… (added) Comment: Workaround of not using clang was added in r88057. Does it work with clang if -std=gnu89 is added to BOOT_CFLAGS/STAGE1_CFLAGS? -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang ---------------------------------------+------------------------------------ Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: clang | Port: llvm-gcc42 ---------------------------------------+------------------------------------ Comment(by jeremyhu@…): I'm sure I tried that. I don't remember why it didn't work, though. FWIW, if you really want llvm and gcc, you're best bet is using dragonegg-3.1 instead of llvm-gcc -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang --------------------------------+---------------------- Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: clang Port: llvm-gcc42 | --------------------------------+---------------------- Changes (by larryv@…): * cc: larry.velazquez@… (removed) * cc: larryv@… (added) -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang --------------------------------+---------------------- Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: clang Port: llvm-gcc42 | --------------------------------+---------------------- Changes (by mfeiri@…): * cc: mfeiri@… (removed) -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#31663: llvm-gcc42 doesn't compile with clang --------------------------------+---------------------- Reporter: tobias.noebauer@… | Owner: erickt@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: clang Port: llvm-gcc42 | --------------------------------+---------------------- Changes (by larryv@…): * status: new => closed * resolution: => fixed Comment: Indirectly fixed in r101497. Version 2336.11 builds fine with Clang. -- Ticket URL: <https://trac.macports.org/ticket/31663#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts