[LLVMbugs] [Bug 6926] New: llvm build fails due to __func__ conflicts in gcc 4.5.1 on Darwin 10.6.2

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 24 13:31:22 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6926

           Summary: llvm build fails due to __func__ conflicts in gcc
                    4.5.1 on Darwin 10.6.2
           Product: new-bugs
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: vlad at demoninsight.com
                CC: llvmbugs at cs.uiuc.edu


Steps to reproduce:

1. build current gcc 4.5 branch (gcc 4.5.1 prerelease) on Darwin using gcc
prerequisite libraries as installed by Fink. (NOTE: this is NOT stock gcc 4.2.x
provided by Apple)

Using built-in specs.
COLLECT_GCC=gcc-4.5
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.5.branch/libexec/gcc/x86_64-apple-darwin10/4.5.1/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../src/configure --enable-checking=release
--prefix=/sw/lib/gcc4.5.branch --mandir=/sw/share/man --infodir=/sw/share/info
--enable-languages=c,c++,fortran --with-gmp=/sw --with-mpfr=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--disable-libjava-multilib --build=x86_64-apple-darwin10
--host=x86_64-apple-darwin10 --target=x86_64-apple-darwin10
Thread model: posix
gcc version 4.5.1 20100424 (prerelease) (GCC) 


2. do an SVN checkout of LLVM trunk (I reproduced this on Apr 24 2010) followed
by SVN checkout of clang trunk into <llvm dir>/tools/clang

3. export CC=... and export CXX=... as needed to set gcc 4.5 as the compiler to
be used by llvm build

4. export REQUIRES_RTTI=1

5. cd into <llvm prj dir> and do

./configure --prefix=<...> --{build,host,target}=x86_64-apple-darwin10
--enable-optimized --enable-jit --disable-expensive-checks
--enable-targets=host-only

6. subsequent make eventually fails as follows:

llvm[1]: Compiling Alarm.cpp for Release build
llvm[1]: Compiling Atomic.cpp for Release build
llvm[1]: Compiling Disassembler.cpp for Release build
llvm[1]: Compiling DynamicLibrary.cpp for Release build
...
llvm[2]: Compiling AsmMatcherEmitter.cpp for Release build
/var/folders/48/48Y65YT7FUutmsSTniSHTE+++TI/-Tmp-//ccLAMmeg.s:26321:FATAL:Symbol
__ZZN4llvm25SmallVectorTemplateCommonINS_9StringRefEEixEPvS3_jE8__func__
already defined.
make[2]: *** [/Users/.../LLVM/utils/TableGen/Release/AsmMatcherEmitter.o] Error
1
make[1]: *** [TableGen/.makeall] Error 2
make: *** [all] Error 1


NOTE: the same steps above produce valid llvm and clang libs and binaries if
used with

(a) Apple gcc 4.2.1

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5659~1/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5659)

or

(b) gcc 4.4.2 as installed by Fink:

Using built-in specs.
Target: x86_64-apple-darwin10
Configured with: ../gcc-4.4.2/configure --prefix=/sw --prefix=/sw/lib/gcc4.4
--mandir=/sw/share/man --infodir=/sw/share/info
--enable-languages=c,c++,fortran,objc,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--disable-libjava-multilib --build=x86_64-apple-darwin10
--host=x86_64-apple-darwin10 --target=x86_64-apple-darwin10
Thread model: posix
gcc version 4.4.2 (GCC) 

Thanks,
Vlad

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list