[cfe-dev] APFloat.cpp compile error, Solaris10/gcc 3.4.3

Martin Carpenter mcarpenter at free.fr
Thu Jul 19 03:38:52 PDT 2012


Hello,

I checked out trunk from SVN, error compiling APFloat.cpp on Solaris
10/x86 with gcc 3.4.3 (stock install). Solaris10/SPARC/gcc is listed
"known to work" at http://llvm.org/docs/GettingStarted.html.


sol10u9 $ uname -a 
SunOS sol10u9 5.10 Generic_142910-17 i86pc i386 i86pc
$ gcc --version
gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make 
make[1]: Entering directory `/export/home/martin/clang/build/lib/Support'
llvm[1]: Compiling APFloat.cpp for Debug+Asserts build
In file included from /export/home/martin/clang/llvm/include/llvm/ADT/FoldingSet.h:21,
                 from /export/home/martin/clang/llvm/lib/Support/APFloat.cpp:17:
/export/home/martin/clang/llvm/include/llvm/ADT/StringRef.h:343: error: `template<class T> typename llvm::enable_if_c<(! std::numeric_limits<_Tp>::is_signed), bool>::type llvm::StringRef::getAsInteger(unsigned int, T&) const' and `template<class T> typename llvm::enable_if_c< std::numeric_limits<_Tp>::is_signed, bool>::type llvm::StringRef::getAsInteger(unsigned int, T&) const' cannot be overloaded
make[1]: *** [/export/home/martin/clang/build/lib/Support/Debug+Asserts/APFloat.o] Error 1
make[1]: Leaving directory `/export/home/martin/clang/build/lib/Support'
make: *** [all] Error 1
$


I tried Oracle Studio 12.3 (setting CC/CXX) but configure fails:
checking tool compatibility... configure: error: gcc|icc required but not found

The same sources compile fine under Linux/gcc 4.6. So perhaps I need to try
a later gcc under Solaris? Or is this a LLVM/clang bug? 


Thanks,

Martin.




More information about the cfe-dev mailing list