我想从x86交叉编译到aarch64。我正在使用工具链文件来指定交叉编译器。我正在使用CMAKE GUI。我正在尝试设置CMAKE标志以包括我需要的库。但是,当我执行make verbose时,compile命令在命令末尾不包含所需的库。这导致它们不包括在内。 (我发现包含库的位置必须在编译命令的末尾。)
有人知道什么需要设置CMAKE标志以及如何设置它们以使命令末尾包含库吗?
下面是正在执行的编译命令。 (我正在通过将make
与verbose
运行来查看此命令。)似乎缺少的库以粗体显示。
/usr/bin/aarch64-linux-gnu-g++ --sysroot=/home/rishabh/nvidia/nvidia_sdk/JetsonCopy \
-I/home/rishabh/nvidia/nvidia_sdk/JetsonCopy \
-I/home/rishabh/nvidia/nvidia_sdk/JetsonCopy/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi \
-I/home/rishabh/nvidia/nvidia_sdk/JetsonCopy/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent \
-I/home/rishabh/nvidia/nvidia_sdk/JetsonCopy/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include \
-I/home/rishabh/nvidia/nvidia_sdk/JetsonCopy/usr/lib/aarch64-linux-gnu/openmpi/include \
-L/home/rishabh/nvidia/nvidia_sdk/JetsonCopy/usr/lib \
-L/home/rishabh/nvidia/nvidia_sdk/JetsonCopy/usr/lib/aarch64-linux-gnu/openmpi/lib \
**-lmpi_cxx -lmpi** -Wall -Wno-long-long -Wno-unknown-pragmas -fpermissive -pthread \
-Wall -Wno-long-long -Wno-unknown-pragmas -fpermissive -pthread -O3 -DNDEBUG \
-rdynamic CMakeFiles/PipelineManagerService-904832-Ubuntu18-aarch64.dir/Cpp/PipelineManagerServiceBase.cpp.o \
CMakeFiles/PipelineManagerService-904832-Ubuntu18-aarch64.dir/Cpp/PipelineManagerServiceMain.cpp.o \
CMakeFiles/PipelineManagerService-904832-Ubuntu18-aarch64.dir/Cpp/LinuxSupport/ExternalCommands.cpp.o \
-o ../../../../../Services/PipelineManagerService/Targets/PipelineManagerService-904832-Ubuntu18-aarch64/RunFiles/PipelineManagerService-904832-Ubuntu18-aarch64 \
-L/home/rishabh/SDK_JetsonDev_new_fromSys/Applications/BasicSendAndReceive/Libraries/HPCEFramework/Targets/HPCEFramework-903600-Ubuntu18-aarch64/RunFiles \
-Wl,-rpath,/home/rishabh/SDK_JetsonDev_new_fromSys/Applications/BasicSendAndReceive/Libraries/HPCEFramework/Targets/HPCEFramework-903600-Ubuntu18-aarch64/RunFiles \
../../../../../Libraries/HPCEFramework/Targets/HPCEFramework-903600-Ubuntu18-aarch64/RunFiles/libHPCEFramework-903600-Ubuntu18-aarch64.a -licuuc
以下是错误消息,这些错误消息使我相信未包含这些库。
../../../../../Libraries/HPCEFramework/Targets/HPCEFramework-903600-Ubuntu18-aarch64/RunFiles/libHPCEFramework-903600-Ubuntu18-aarch64.a(ComputeNode.cpp.o):
In function HPCE::ComputeNode::NodeInformationExchange()':
ComputeNode.cpp:(.text+0x31cc): undefined reference to `ompi_mpi_comm_world'
ComputeNode.cpp:(.text+0x31dc): undefined reference to `ompi_mpi_comm_world'
ComputeNode.cpp:(.text+0x31f4): undefined reference to `MPI_Comm_size'
ComputeNode.cpp:(.text+0x3218): undefined reference to `ompi_mpi_byte'
ComputeNode.cpp:(.text+0x3230): undefined reference to `ompi_mpi_byte'
ComputeNode.cpp:(.text+0x3254): undefined reference to `ompi_mpi_comm_world'
ComputeNode.cpp:(.text+0x3268): undefined reference to `MPI_Bcast'
ComputeNode.cpp:(.text+0x32f4): undefined reference to `ompi_mpi_comm_world'
ComputeNode.cpp:(.text+0x3308): undefined reference to `MPI_Bcast'