Closed michalkielan closed 7 years ago
I cannot reproduce...
➜ MatrixLibs git:(fix31) ✗ clang++ --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin
@michal915 I have no errors, but maybe I didn't triggered CXX as clang?
I've finally reproduced http://stackoverflow.com/a/12843988 System wide C++ change on Ubuntu:
sudo apt-get install clang
sudo update-alternatives --config c++
Will print something like this:
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/g++ 20 auto mode
1 /usr/bin/clang++ 10 manual mode
2 /usr/bin/g++ 20 manual mode
and after pressing '1' and cmake . && make errors just like you described
https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-snapshot/+bug/1254970
I ran into this and my workaround was:
ln -sf /usr/lib/llvm-3.4/lib/LLVMgold.so /usr/lib/LLVMgold.so echo /usr/lib/llvm-3.4/lib >> /etc/ld.so.conf ldconfig
I also had to add -B/usr/lib/gold-ld to my clang options to get it to use /usr/bin/ld.gold instead of /usr/bin/ld.bfd
(-B takes a directory containing ld, not a path to a linker!)
This might be worth trying...
Or also I think this is needed http://llvm.org/docs/GoldPlugin.html I have also tried to do
sudo apt-get install binutils-gold binutils-dev
from here but it didn't work...
Step to reproduce:
Clang version
clang version 3.8.0-2
Current behaviour: Error in linking time, a lot of warnings due to the curly brackets in matrix objects initialization
Expected behaviour: compile without warnings and errors using clang