Regarding cross compilation of libtorrent #7721
Unanswered
Xiaoluopro
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi arvdin, I am trying to cross compile libtorrent. Before that, I learned that it depends on boost and openssl, so I cross compiled boost 1.85.0 and openssl 3.2.2 and passed them. But I encountered the following problem of not being able to find the header file. What should I do ?My cross compilation chain is aarch64-linux-gnu -. Looking forward to your reply.
I encountered the following problem during running "make" :
[ 1%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/alert.cpp.o
[ 1%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/alert_manager.cpp.o
[ 2%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bandwidth_limit.cpp.o
[ 2%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/assert.cpp.o
[ 3%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bandwidth_manager.cpp.o
[ 3%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bandwidth_queue_entry.cpp.o
[ 4%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bdecode.cpp.o
[ 4%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bitfield.cpp.o
[ 5%] Building CXX object CMakeFiles/torrent-rasterbar.dir/src/bloom_filter.cpp.o
In file included from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/tracker_manager.hpp:69:0,
from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/alert_types.hpp:69,
from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/aux_/alert_manager.hpp:42,
from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/src/alert_manager.cpp:37:
/devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/ssl.hpp:56:60: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h> // for OPENSSL_VERSION_NUMBER
^
compilation terminated.
make[2]: *** [CMakeFiles/torrent-rasterbar.dir/src/alert_manager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/tracker_manager.hpp:69:0,
from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/alert_types.hpp:69,
from /devdata/workspace/ls/libtorrent-rasterbar-2.0.10/src/alert.cpp:51:
/devdata/workspace/ls/libtorrent-rasterbar-2.0.10/include/libtorrent/ssl.hpp:56:60: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h> // for OPENSSL_VERSION_NUMBER
^
compilation terminated.
make[2]: *** [CMakeFiles/torrent-rasterbar.dir/src/alert.cpp.o] Error 1
make[1]: *** [CMakeFiles/torrent-rasterbar.dir/all] Error 2
make: *** [all] Error 2
My cmake command is as follows:
cmake ../ -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake
My toolchain.cmake is as follows:
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_FIND_ROOT_PATH /opt/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin)
set(Boost_NO_SYSTEM_PATHS TRUE)
set(Boost_NO_BOOST_CMAKE TRUE)
set(Boost_DIR "/opt/aarch64_boost")
set(OpenSSL_ROOT_DIR "/opt/openssl")
set(OPENSSL_CRYPTO_LIBRARY "${OpenSSL_ROOT_DIR}/lib64/libcrypto.a")
set(OPENSSL_SSL_LIBRARY "${OpenSSL_ROOT_DIR}/lib64/libssl.a")
Beta Was this translation helpful? Give feedback.
All reactions