Martin J. O'Riordan via llvm-dev
2016-Jul-06 07:46 UTC
[llvm-dev] GCC prerequisites for building LLVM head?
Is there is minimum required version for GCC to build LLVM from the head revision? I have GCC v4.9.3, but 'Tools/sancov/sancov.cc' won't build because 'std::to_string' does not exist. When running CMake it did not flag GCC v4.9.3 as too old, and it is passing the '-std=gnu++11' option, but apparently this version of GCC is not fully C++ 11 compliant, or at least its C++ library isn't. Everything else builds. Thanks, MartinO -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160706/5a571304/attachment.html>
Renato Golin via llvm-dev
2016-Jul-06 09:12 UTC
[llvm-dev] GCC prerequisites for building LLVM head?
On 6 July 2016 at 08:46, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Is there is minimum required version for GCC to build LLVM from the head > revision?Last I checked it was 4.7. The CMake files also tell me that's correct: modules/CheckCompilerVersion.cmake: # Check if the host compiler is new enough. LLVM requires at least GCC 4.7,> I have GCC v4.9.3, but ‘Tools/sancov/sancov.cc’ won’t build because > ‘std::to_string’ does not exist. When running CMake it did not flag GCC > v4.9.3 as too old, and it is passing the ‘-std=gnu++11’ option, but > apparently this version of GCC is not fully C++ 11 compliant, or at least > its C++ library isn’t.This sounds odd. I have buildbots with 4.8.2 and 4.9.2 working perfectly. Could this be a problem in your setup? cheers, --renato
Martin J. O'Riordan via llvm-dev
2016-Jul-06 10:04 UTC
[llvm-dev] GCC prerequisites for building LLVM head?
I just checked with '-E' and I am picking up '<string>' from: /usr/lib/gcc/i686-pc/cygwin/4.9.3/include/c++/string all other C++ headers are coming from the same place. The 'std::to_string' functions are not present in '<string>', but they are located in '<bits/basic_string.h>' - which is included. Perhaps it is a broken Cygwin v4.9.3 package, but this is odd since the source should be identical for the Cygwin versus Linux distros? I can't try this on Linux until tomorrow as I am working from home and don't have a Linux setup that uses v4.9.3. The 'std::to_string' functions are provided in a block that is conditionally included as follows (line #2847 in my copy): #if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) #include <ext/string_conversions.h> namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION The test '__cplusplus >= 201103L' evaluates true in all previous cases, so it would appear that '_GLIBCXX_USE_C99' is not being defined - I can add this explicitly when I am configuring LLVM with CMake, but it seems a bit strange that I need to. Thanks, MartinO -----Original Message----- From: Renato Golin [mailto:renato.golin at linaro.org] Sent: 06 July 2016 10:12 To: Martin.ORiordan at movidius.com Cc: LLVM Developers <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] GCC prerequisites for building LLVM head? On 6 July 2016 at 08:46, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Is there is minimum required version for GCC to build LLVM from the > head revision?Last I checked it was 4.7. The CMake files also tell me that's correct: modules/CheckCompilerVersion.cmake: # Check if the host compiler is new enough. LLVM requires at least GCC 4.7,> I have GCC v4.9.3, but ‘Tools/sancov/sancov.cc’ won’t build because > ‘std::to_string’ does not exist. When running CMake it did not flag > GCC > v4.9.3 as too old, and it is passing the ‘-std=gnu++11’ option, but > apparently this version of GCC is not fully C++ 11 compliant, or at > least its C++ library isn’t.This sounds odd. I have buildbots with 4.8.2 and 4.9.2 working perfectly. Could this be a problem in your setup? cheers, --renato
Mehdi Amini via llvm-dev
2016-Jul-06 18:42 UTC
[llvm-dev] GCC prerequisites for building LLVM head?
> On Jul 6, 2016, at 12:46 AM, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Is there is minimum required version for GCC to build LLVM from the head revision? > > I have GCC v4.9.3, but ‘Tools/sancov/sancov.cc <http://sancov.cc/>’ won’t build because ‘std::to_string’ does not exist.We usually avoid using std::to_string AFAIK because not supported on every platform we support. Twine or llvm::utostr are good replacements for that, see r267829 or r257857 for instance. — Mehdi> When running CMake it did not flag GCC v4.9.3 as too old, and it is passing the ‘-std=gnu++11’ option, but apparently this version of GCC is not fully C++ 11 compliant, or at least its C++ library isn’t. > > Everything else builds. > > Thanks, > > MartinO > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160706/b8f4572b/attachment.html>