[llvm-dev] CMake Cache PGO error

42 views
Skip to first unread message

Timo Janssen via llvm-dev

unread,
Mar 15, 2017, 6:09:39 PM3/15/17
to llvm...@lists.llvm.org
I was trying to build llvm + clang with cmake cache PGO.cmake and ninja stage2. I used the 4.0.0 final tag vfrom svn.

This seems to work for me.

I added libcxx, libcxxabi, llld etc.

And now I get the following cmake error.

-- Performing Test LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG
-- Performing Test LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG - Failed
CMake Error at projects/libcxx/CMakeLists.txt:396 (message):
  C++11 or greater is required but the compiler does not support c++11

I don't understand the error. Why shouldn't the cxx11 flag work.

I only use cmake -GNInja -C path/to//PGO.cmake  path/to/llvm.


So my Question is if the cache file are still maintained. And if I shouldn't compile libcxx and the others with this cache file?

Thanks

Vedant Kumar via llvm-dev

unread,
Mar 15, 2017, 7:02:02 PM3/15/17
to Timo Janssen, llvm...@lists.llvm.org
Haven't given the PGO cache file a shot, but I ran into a similar problem today, and solved the issue by making sure that my host compiler had access to a working copy of the profiling runtime.

For me, that's: ninja libclang_rt.profile_osx.a

If that's not your issue, try checking the CMake{Error,Output}.log files, and figure out why exactly the check is failing (most likely it has nothing to do with the "c++11 unsupported" error message).

vedant

> _______________________________________________
> LLVM Developers mailing list
> llvm...@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Brian Cain via llvm-dev

unread,
Mar 16, 2017, 10:40:01 AM3/16/17
to Vedant Kumar, Timo Janssen, llvm-dev
> -----Original Message-----
> From: llvm-dev [mailto:llvm-dev...@lists.llvm.org] On Behalf Of Vedant
> Kumar via llvm-dev
...
> Haven't given the PGO cache file a shot, but I ran into a similar problem today,
> and solved the issue by making sure that my host compiler had access to a
> working copy of the profiling runtime.
>
> For me, that's: ninja libclang_rt.profile_osx.a
>
> If that's not your issue, try checking the CMake{Error,Output}.log files, and
> figure out why exactly the check is failing (most likely it has nothing to do with
> the "c++11 unsupported" error message).

When I build with ASan+sanitizer coverage I get the same error as Timo. For me, it's due to undefined references to pthread_*/dlsym/__dynamic_cast/typeinfo for __cxxabi, etc. I'm using Ubuntu 14.04.

I think I understand that the problem is somehow related to my host compiler but it's not clear to me how to address it.

This bug hints at the fact that the underlying problem might be a need for a static libc++: https://bugs.llvm.org/show_bug.cgi?id=30919

The dynamic_cast test case w/-static-libstdc++ fails for me: https://bugs.llvm.org/show_bug.cgi?id=30919#c3 but my build is after the fix (r 287373). I haven't tried it with LIBCXX_ENABLE_STATIC_ABI_LIBRARY yet, I'll try that next. I suppose that must be applied to my stage0/host compiler first before running my ASan build.

-Brian

Kostya Serebryany via llvm-dev

unread,
Mar 16, 2017, 10:00:45 PM3/16/17
to Brian Cain, llvm-dev
Same trouble here, and I haven't figured out how to fix it (other than by removing llvm/projects/libcxx*). 


Reply all
Reply to author
Forward
0 new messages