简体   繁体   English

在 AWS EC2 实例上使用 clang 编译时“命令行中缺少 DSO”

[英]“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.我正在尝试在 EC2 实例上编译 C++ 程序以用于 aws lambda。 I am using a make file, and i enter我正在使用make文件,然后输入

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.我四处搜索,但我发现的唯一解决方法是将 libc++ 添加到表达式中,但它似乎已经存在。

I've built this same program on Ubuntu without issues, but I had to install libc++-dev and libc++abi-dev我在 Ubuntu 上构建了同样的程序没有问题,但我必须安装libc++-devlibc++abi-dev

The only thing i can find for yum is libcxx (which i installed).我唯一能找到的 yum 是libcxx (我安装的)。 I'm stuck on what to do next...我被困在下一步该怎么做...

EDIT #1:编辑#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...我已经从 RPM 安装了libcxxabilibcxxabi-devel软件包: https://fedora.pkgs.org/30/fedora-x86_64/libcxxabi-8.0.0-1.fc30.x86_64.rpm.ZFC35FDC70D5FC69D2368 ..

Try installing libc++abi as well.也尝试安装 libc++abi。

_ZTVN10__cxxabiv117__class_type_infoE is the "vtable for __cxxabiv1::__class_type_info". _ZTVN10__cxxabiv117__class_type_infoE是“__cxxabiv1::__class_type_info 的 vtable”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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