Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failures./usr/bin/ld: cannot find -lc++ recipe for target 'cmTC_b4e2d' failed #9

Closed
lyq123180 opened this issue Aug 4, 2017 · 5 comments
Labels

Comments

@lyq123180
Copy link

clang 3.8.0
ubuntu 16.04

I followed the instruction
polly.py --toolchain libcxx --install --reconfig --verbose
But get error

/usr/bin/ld: cannot find -lc++

clang: error: linker command failed with exit code 1 (use -v to see
invocation)

CMakeFiles/cmTC_8bae2.dir/build.make:97: recipe for target 'cmTC_8bae2'
failed

make[1]: *** [cmTC_8bae2] Error 1

@headupinclouds
Copy link
Contributor

I just noticed this issue. This seems like a configuration error. I'll add the same toolchain to travis (Trusty image) and see how that works.

@headupinclouds
Copy link
Contributor

headupinclouds commented Aug 12, 2017

You are most likely missing libc++, try:

apt-get install clang-3.8 libc++-dev libc++abi-dev

With this configuration I notice a build error in cereal:

/home/dhirvonen/.hunter/_Base/75c7e58/6a87f3a/09f3179/Install/include/cereal/details/polymorphic_impl.hpp:235:61: error: chosen constructor is explicit in copy-initialization
          auto & derivedMap = baseMap.insert( lb, {baseKey, {}} )->second;

referenced here: USCiLab/cereal#339

I'm not sure if it is an option, but you could try the tested TOOLCHAIN=gcc-4-8-pic-hid-sections from the current travis setup for now (or any other suitable c++11 toolchain from Travis). I've asked the cereal project authors about the fix.

@headupinclouds
Copy link
Contributor

headupinclouds commented Aug 15, 2017

This has been fixed in the latest cereal develop branch. I've tested this locally in xgboostcpp and it works fine. I will add the required patches for a libcxx toolchain build to the travis configuration.

For the trusty image this requires:

$ apt-get clang-3.8 libc++-dev libc++abi-dev
$ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 380
$ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 380

@headupinclouds
Copy link
Contributor

I've updated travis to test libcxx with clang-3.8 in this pr and it seems to be working fine:

#10

This is using a newer cereal via GIT_SUBMODULE. You can use this one temporarily if needed, but I will update the PR using standard hunter packages once the change has been accepted upstream and will resubmit the PR and merge to master then. Thanks for pointing out the problem before I ran into it. I'll leave the issue open until then.

@headupinclouds
Copy link
Contributor

An ubuntu clang 3.8 + libc++ toolchain test has been added to travis in #14. This PR also replaces the hunter xgoost GIT_SUBMODULE with a standard hunter package, which makes the project cleaner. Please try the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants