简体   繁体   中英

“DSO missing from command line” when compiling with clang on AWS EC2 instance

I am trying to compile a C++ program on an EC2 instance for use in aws lambda. I am using a make file, and i enter

make -f Makefile

which seems to build the following expression:

clang++ -std=c++11 -stdlib=libc++ -L/usr/lib/opencas -L/usr/lib -lTKBRep -lTKG2d -lTKG3d -lTKGeomBase -lTKMath -lTKMesh -lTKSTEP -lTKSTEP209 -lTKTopAlgo -lTKSTEPAttr -lTKSTEPBase -lTKSTL -lTKXSBase -lTKernel  -o step2stl lib.o main.o

Then I get the following error:

/usr/bin/ld: lib.o: undefined reference to symbol '_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3'
//usr/lib64/libstdc++.so.6: error adding symbols: DSO missing from command line
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [step2stl] Error 1

I've searched around but the only fix i've found was to add libc++ to the expression, but it seems like it is already there.

I've built this same program on Ubuntu without issues, but I had to install libc++-dev and libc++abi-dev

The only thing i can find for yum is libcxx (which i installed). I'm stuck on what to do next...

EDIT #1:

I've installed libcxxabi and libcxxabi-devel packages from RPM here: https://fedora.pkgs.org/30/fedora-x86_64/libcxxabi-8.0.0-1.fc30.x86_64.rpm.html But it still errors...

Try installing libc++abi as well.

_ZTVN10__cxxabiv117__class_type_infoE is the "vtable for __cxxabiv1::__class_type_info".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM