Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.82k stars 253 forks source link

Fails to build due to missing `libclang-cpp.so` with "DSO missing from command line" #1415

Open ensc opened 3 years ago

ensc commented 3 years ago

Describe the bug

Build under Fedora 34 fails with

/usr/bin/g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wzero-as-null-pointer-constant -I/usr/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Wall -Wextra -Wpointer-arith -Wnon-virtual-dtor -Wformat -Wshadow -std=c++11 -pthread -Wstrict-aliasing=2 -Wcast-qual -fPIC -fstack-protector-all -Wstack-protector -O2 -g -DNDEBUG -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld CMakeFiles/rdm.dir/rdm.cpp.o -o ../bin/rdm  librtags.a -Wl,--start-group /usr/lib64/libclang.so -Wl,--end-group -lstdc++ -lpthread /usr/lib64/libz.so /usr/lib64/libcrypto.so -ldl -lrt librct.a -lpthread /usr/lib64/libz.so /usr/lib64/libcrypto.so -ldl -lrt 
/usr/bin/ld: RClient.cpp.o (symbol from plugin): undefined reference to symbol '_ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag@@LLVM_12'
/usr/bin/ld: /usr/lib64/libLLVM-12.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/CMakeFiles/rc.dir/build.make:113: bin/rc] Error 1
gmake[2]: Leaving directory '/builddir/build/BUILD/rtags-2.41.90/x86_64-redhat-linux-gnu'
gmake[1]: *** [CMakeFiles/Makefile2:1090: src/CMakeFiles/rc.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: Symbol.cpp.o (symbol from plugin): undefined reference to symbol '_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits@@LLVM_12'
/usr/bin/ld: /usr/lib64/libLLVM-12.so: error adding symbols: DSO missing from command line

On Fedora 34 (clang 12), these symbols are in libclang-cpp.so, not in libclang.so.

Environment (please complete the following information):