On Fri, Sep 16, 2016 at 10:18 PM, Teresa Johnson <tejohnson at google.com> wrote:> > Cc'ing llvm-dev again in case someone knows what is going on. > > That error is coming from a polly configure script, which I don't > have cloned into my own tree. Not sure why polly would behave > differently when configuring for ThinLTO. Does polly configure ok > when configuring the same way, but for regular LTO?Yes it does, and I don't remember when I've added it, meaning it's been working when bootstrapping llvm with the host gcc toolchain, for a long time.> On Fri, Sep 16, 2016 at 12:36 PM, Carsten Mattner <carstenmattner at gmail.com> wrote: > > > > Hi Teresa, > > > > I've just attempted a THIN_LTO build again, and the > > error I ran into is as follows, and happens during > > cmake. I'm explicitly telling cmake to us llvm-ar and llvm-ranlib > > as suggested. > > > > [...] > > -- Performing Test COMPILER_RT_HAS_STATIC_FLAG - Success > > -- Performing Test COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD > > -- Performing Test COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD - Success > > -- Builtin supported architectures: > > -- ISL version: isl-0.17.1-164-gcbba1b6 > > -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT > > -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT - Failed > > -- Performing Test HAVE___ATTRIBUTE__ > > -- Performing Test HAVE___ATTRIBUTE__ - Failed > > -- Performing Test HAVE_DECL_FFS > > -- Performing Test HAVE_DECL_FFS - Failed > > -- Performing Test HAVE_DECL___BUILTIN_FFS > > -- Performing Test HAVE_DECL___BUILTIN_FFS - Failed > > -- Performing Test HAVE_DECL__BITSCANFORWARD > > -- Performing Test HAVE_DECL__BITSCANFORWARD - Failed > > CMake Error at tools/polly/lib/External/CMakeLists.txt:90 (message): > > No ffs implementation found > > [...]
> On Sep 16, 2016, at 1:48 PM, Carsten Mattner via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On Fri, Sep 16, 2016 at 10:18 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Cc'ing llvm-dev again in case someone knows what is going on. >> >> That error is coming from a polly configure script, which I don't >> have cloned into my own tree. Not sure why polly would behave >> differently when configuring for ThinLTO. Does polly configure ok >> when configuring the same way, but for regular LTO? > > Yes it does, and I don't remember when I've added it, meaning it's > been working when bootstrapping llvm with the host gcc toolchain, for > a long time. >Can you look for the specific errors in the CMake log and error files? CMake is very good at not presenting the real issue… Here it is trying to build very simple programs to check features availability. Like: #include <strings.h> int main() { ffs(0); return 0; } — Mehdi>> On Fri, Sep 16, 2016 at 12:36 PM, Carsten Mattner <carstenmattner at gmail.com> wrote: >>> >>> Hi Teresa, >>> >>> I've just attempted a THIN_LTO build again, and the >>> error I ran into is as follows, and happens during >>> cmake. I'm explicitly telling cmake to us llvm-ar and llvm-ranlib >>> as suggested. >>> >>> [...] >>> -- Performing Test COMPILER_RT_HAS_STATIC_FLAG - Success >>> -- Performing Test COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD >>> -- Performing Test COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD - Success >>> -- Builtin supported architectures: >>> -- ISL version: isl-0.17.1-164-gcbba1b6 >>> -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT >>> -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT - Failed >>> -- Performing Test HAVE___ATTRIBUTE__ >>> -- Performing Test HAVE___ATTRIBUTE__ - Failed >>> -- Performing Test HAVE_DECL_FFS >>> -- Performing Test HAVE_DECL_FFS - Failed >>> -- Performing Test HAVE_DECL___BUILTIN_FFS >>> -- Performing Test HAVE_DECL___BUILTIN_FFS - Failed >>> -- Performing Test HAVE_DECL__BITSCANFORWARD >>> -- Performing Test HAVE_DECL__BITSCANFORWARD - Failed >>> CMake Error at tools/polly/lib/External/CMakeLists.txt:90 (message): >>> No ffs implementation found >>> [...] > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
On Fri, Sep 16, 2016 at 1:48 PM, Carsten Mattner <carstenmattner at gmail.com> wrote:> On Fri, Sep 16, 2016 at 10:18 PM, Teresa Johnson <tejohnson at google.com> > wrote: > > > > Cc'ing llvm-dev again in case someone knows what is going on. > > > > That error is coming from a polly configure script, which I don't > > have cloned into my own tree. Not sure why polly would behave > > differently when configuring for ThinLTO. Does polly configure ok > > when configuring the same way, but for regular LTO? > > Yes it does, and I don't remember when I've added it, meaning it's > been working when bootstrapping llvm with the host gcc toolchain, for > a long time. >You mentioned in your original email:> I first tried to rebuild llvm with llvm-3.9, which has ThinLTO, by > providing -DLLVM_ENABLE_LTO=Thin, but that failed very quickly, so I > fell back to building with -DLLVM_ENABLE_LTO=On and using the system > CC/CXX (gcc 6.1).I assume this error when you try to bootstrap using llvm-3.9 and ThinLTO then? What about bootstrapping with llvm-3.9 and -DLLVM_ENABLE_LTO=On? If the latter works, I'll have to clone polly and see if I can reproduce it and see what is different between a -DLLVM_ENABLE_LTO=Thin and -DLLVM_ENABLE_LTO=On build then. Teresa> > On Fri, Sep 16, 2016 at 12:36 PM, Carsten Mattner < > carstenmattner at gmail.com> wrote: > > > > > > Hi Teresa, > > > > > > I've just attempted a THIN_LTO build again, and the > > > error I ran into is as follows, and happens during > > > cmake. I'm explicitly telling cmake to us llvm-ar and llvm-ranlib > > > as suggested. > > > > > > [...] > > > -- Performing Test COMPILER_RT_HAS_STATIC_FLAG - Success > > > -- Performing Test COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD > > > -- Performing Test COMPILER_RT_SUPPORTS_ATOMIC_KEYWORD - Success > > > -- Builtin supported architectures: > > > -- ISL version: isl-0.17.1-164-gcbba1b6 > > > -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT > > > -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT - Failed > > > -- Performing Test HAVE___ATTRIBUTE__ > > > -- Performing Test HAVE___ATTRIBUTE__ - Failed > > > -- Performing Test HAVE_DECL_FFS > > > -- Performing Test HAVE_DECL_FFS - Failed > > > -- Performing Test HAVE_DECL___BUILTIN_FFS > > > -- Performing Test HAVE_DECL___BUILTIN_FFS - Failed > > > -- Performing Test HAVE_DECL__BITSCANFORWARD > > > -- Performing Test HAVE_DECL__BITSCANFORWARD - Failed > > > CMake Error at tools/polly/lib/External/CMakeLists.txt:90 (message): > > > No ffs implementation found > > > [...] >-- Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160916/45e7a41b/attachment-0001.html>
On Fri, Sep 16, 2016 at 10:54 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:> Can you look for the specific errors in the CMake log and error files? > > CMake is very good at not presenting the real issue… > Here it is trying to build very simple programs to check features > availability. Like: > > #include <strings.h> > int main() { ffs(0); return 0; }In CMakeError.log there are errors like: CheckIncludeFile.c:1:10: fatal error: 'malloc/malloc.h' file not found #include <malloc/malloc.h> ... CheckIncludeFile.c:1:10: fatal error: 'ndir.h' file not found #include <ndir.h> ... CheckIncludeFile.c:1:10: fatal error: 'sys/ndir.h' file not found #include <sys/ndir.h> ... fatal error: 'intrin.h' file not found These seem like tests that are expected to fail. ... The interesting test int main() { __builtin_ffs(0); return 0; } fails like this: /usr/bin/ld[...]llvm/bin/../lib/LLVMgold.so: cannot open shared object file: No such file[...] I have two questions here: Is there anything I might have missed when configuring the gcc-built llvm install for it to be incomplete in the linker department? I mean, the system linker is used (not lld) and that via CC=clang is looking for the gold linker plugin, which seems to be missing. Probably something got lost in my transition from autoconf to cmake? Anything else to pass to cmake so that it, in addition to llvm-ar and llvm-ranlib, also used lld? Or isn't that a requirement for building with ThinLTO?
On Fri, Sep 16, 2016 at 10:57 PM, Teresa Johnson <tejohnson at google.com> wrote:> > On Fri, Sep 16, 2016 at 1:48 PM, Carsten Mattner <carstenmattner at gmail.com> wrote: >> >> On Fri, Sep 16, 2016 at 10:18 PM, Teresa Johnson <tejohnson at google.com> wrote: >> > >> > Cc'ing llvm-dev again in case someone knows what is going on. >> > >> > That error is coming from a polly configure script, which I don't >> > have cloned into my own tree. Not sure why polly would behave >> > differently when configuring for ThinLTO. Does polly configure ok >> > when configuring the same way, but for regular LTO? >> >> Yes it does, and I don't remember when I've added it, meaning it's >> been working when bootstrapping llvm with the host gcc toolchain, for >> a long time. > > > You mentioned in your original email: > > I first tried to rebuild llvm with llvm-3.9, which has ThinLTO, by > > providing -DLLVM_ENABLE_LTO=Thin, but that failed very quickly, so I > > fell back to building with -DLLVM_ENABLE_LTO=On and using the system > > CC/CXX (gcc 6.1). > > I assume this error when you try to bootstrap using llvm-3.9 and ThinLTO then? > What about bootstrapping with llvm-3.9 and -DLLVM_ENABLE_LTO=On? > > If the latter works, I'll have to clone polly and see if I can reproduce it and > see what is different between a -DLLVM_ENABLE_LTO=Thin and > -DLLVM_ENABLE_LTO=On build then.Same error, and as mentioned in reply to Mehdi, I'll have to verify it there isn't an underlying issue of my local llvm install. However, I would certainly welcome a success report and binary size info.