Hello, I get the following error while trying to configure an llvm build on Solaris 10-SPARC: CMake Error at projects/libcxx/CMakeLists.txt:268 (message): C++11 is required but the compiler does not support -std=c++11 However, the error is about a missing header file (llvm/Support/Solaris.h) as reported in build/CMakeFiles/CMakeError.log: Performing C++ SOURCE FILE Test LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG failed with the following output: Change Dir: /export/home/netrac_fam/gtk3/src/bllvm/build/CMakeFiles/CMakeTmpRun Build Command:"/usr/sfw/bin/gmake" "cmTC_67861/fast" /usr/sfw/bin/gmake -f CMakeFiles/cmTC_67861.dir/build.make CMakeFiles/cmTC_67861.dir/build gmake[1]: Entering directory `/export/home/netrac_fam/gtk3/src/bllvm/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_67861.dir/src.cxx.o /export/home/netrac_fam/gtk3/bin/g++ -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strin gs -Wcast-qual -Wno-missing-field-initializers -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -fdata-sections -include llvm/Support/Solaris.h -DLIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG -s td=c++11 -o CMakeFiles/cmTC_67861.dir/src.cxx.o -c /export/home/netrac_fam/gtk3/src/bllvm/build/CMakeFiles/CMakeT mp/src.cxx cc1plus: fatal error: llvm/Support/Solaris.h: No such file or directory compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_67861.dir/src.cxx.o] Error 1 gmake[1]: Leaving directory `/export/home/netrac_fam/gtk3/src/bllvm/build/CMakeFiles/CMakeTmp' gmake: *** [cmTC_67861/fast] Error 2Source file was: int main() { return 0; } What would be the proper way to add an include path, something like "-I/src" so that g++ can find llvm/Solaris.h whose full path would be /src/llvm/Solaris.h? Thanks,Oscar. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160707/cec373f4/attachment.html>
Stefan Teleman via llvm-dev
2016-Jul-07 20:52 UTC
[llvm-dev] Configure error on Solaris 10
On Thu, Jul 7, 2016 at 1:36 PM, Oscar Guido via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Hello, > I get the following error while trying to configure an llvm build on > Solaris 10-SPARC: > > CMake Error at projects/libcxx/CMakeLists.txt:268 (message): > C++11 is required but the compiler does not support -std=c++11 > > However, the error is about a missing header file (llvm/Support/Solaris.h) > as reported in build/CMakeFiles/CMakeError.log:> cc1plus: fatal error: llvm/Support/Solaris.h: No such file or directory > compilation terminated. > gmake[1]: *** [CMakeFiles/cmTC_67861.dir/src.cxx.o] Error 1I am not sure that clang/llvm will build out-of-the-box on Solaris 10. At least not without some major interventions. Which version of GCC is this? -- Stefan Teleman KDE e.V. stefan.teleman at gmail.com
On Fri, Jul 8, 2016 at 4:52 AM, Stefan Teleman via llvm-dev < llvm-dev at lists.llvm.org> wrote:> On Thu, Jul 7, 2016 at 1:36 PM, Oscar Guido via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Hello, > > I get the following error while trying to configure an llvm build on > > Solaris 10-SPARC: > > > > CMake Error at projects/libcxx/CMakeLists.txt:268 (message): > > C++11 is required but the compiler does not support -std=c++11 > > > > However, the error is about a missing header file > (llvm/Support/Solaris.h) > > as reported in build/CMakeFiles/CMakeError.log: > > > cc1plus: fatal error: llvm/Support/Solaris.h: No such file or directory > > compilation terminated. > > gmake[1]: *** [CMakeFiles/cmTC_67861.dir/src.cxx.o] Error 1 > > I am not sure that clang/llvm will build out-of-the-box on Solaris 10. > At least not without some major interventions. > > Which version of GCC is this? >Solaris 11 shouldn't be that much work, if any, except for that the OP mentioned SPARC. Even if using a gcc which supports c++11, libc++ may be an obstacle because it needs some stuff (libc/system headers) which wasn't added until Solaris 11. (I can look in my notes for exactly what if needed) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160708/ab901cb5/attachment.html>
Oscar Guido via llvm-dev
2016-Jul-07 21:29 UTC
[llvm-dev] Fw: Configure error on Solaris 10
Hi Stefan, Yes, it does not build out of the box on Solaris 10. It's GCC 5.4.0. I made it past cmake with this command line: LD_LIBRARY_PATH=/export/home/netrac_fam/gtk3/lib:$LD_LIBRARY_PATH cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX=/export/home/netrac_fam/gtk3 -DCMAKE_CXX_COMPILER=/export/home/netrac_fam/gtk3/bin/g++ -DCMAKE_C_COMPILER=/export/home/netrac_fam/gtk3/bin/gcc -DCMAKE_C_FLAGS='-mcpu=v9 -I/export/home/netrac_fam/gtk3/include' -DCMAKE_CXX_FLAGS='-mcpu=v9 -I/export/home/netrac_fam/gtk3/include -I/export/home/netrac_fam/gtk3/src/llvm/include' -DCMAKE_EXE_LINKER_FLAGS='-L/export/home/netrac_fam/gtk3/lib -R/export/home/netrac_fam/gtk3/lib' /export/home/netrac_fam/gtk3/src/llvm Then, I did a quick and dirty replacement because of incompatible ld flags: find ./ -name link.txt -exec perl -pi -e 's/-Wl,-z -Wl,discard-unused=sections/-Wl,-z,ignore/g' {} \; Now, gmake gets stuck with this error (missing xlocale.h): [ 13%] Linking CXX executable ../../bin/not gmake[2]: *** [projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/support/solaris/xlocale.c.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... [ 13%] Built target obj.clang-tblgen [ 13%] Linking CXX static library ../libLLVMMC.a In file included from /export/home/netrac_fam/gtk3/src/llvm/projects/libcxx/include/ios:216:0, from /export/home/netrac_fam/gtk3/src/llvm/projects/libcxx/include/ostream:138, from /export/home/netrac_fam/gtk3/src/llvm/projects/libcxx/include/__std_stream:15, from /export/home/netrac_fam/gtk3/src/llvm/projects/libcxx/src/iostream.cpp:10: /export/home/netrac_fam/gtk3/src/llvm/projects/libcxx/include/__locale:33:22: fatal error: xlocale.h: No such file or directory g++ is able to find the xlocale.h under projects/libcxx/projects/include, but it seems that another xlocale.h is required as well (maybe one that ships with Solaris 11?) Thanks,Oscar. From: Stefan Teleman <stefan.teleman at gmail.com> To: Oscar Guido <osc_gui at yahoo.com> Cc: "llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org> Sent: Thursday, July 7, 2016 4:52 PM Subject: Re: [llvm-dev] Configure error on Solaris 10 On Thu, Jul 7, 2016 at 1:36 PM, Oscar Guido via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Hello, > I get the following error while trying to configure an llvm build on > Solaris 10-SPARC: > > CMake Error at projects/libcxx/CMakeLists.txt:268 (message): > C++11 is required but the compiler does not support -std=c++11 > > However, the error is about a missing header file (llvm/Support/Solaris.h) > as reported in build/CMakeFiles/CMakeError.log:> cc1plus: fatal error: llvm/Support/Solaris.h: No such file or directory > compilation terminated. > gmake[1]: *** [CMakeFiles/cmTC_67861.dir/src.cxx.o] Error 1I am not sure that clang/llvm will build out-of-the-box on Solaris 10. At least not without some major interventions. Which version of GCC is this? -- Stefan Teleman KDE e.V. stefan.teleman at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160707/93bccd37/attachment.html>