Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find /usr/lib64/libboost_system.a in RHEL9 #672

Open
mogeko opened this issue Mar 24, 2023 · 0 comments
Open

Can't find /usr/lib64/libboost_system.a in RHEL9 #672

mogeko opened this issue Mar 24, 2023 · 0 comments

Comments

@mogeko
Copy link

mogeko commented Mar 24, 2023

I tried to compile trojan on RHEL9, but it failed to find /usr/lib64/libboost_system.a.

The following packages are installed in my system:

https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

clang-devel openssl-devel make cmake mariadb-connector-c-devel

boost1.78-build boost1.78-devel boost1.78-static

I use the following command to compile:

cmake . \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_CXX_COMPILER="clang++" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBoost_USE_STATIC_LIBS=ON \
    -DBoost_LIBRARIES=/usr/lib64/boost1.78 \
    -DBoost_DEBUG=ON \
    -DFORCE_TCP_FASTOPEN=ON
make -j$(nproc) && make install

Since boost1.78-static installed *.a to /usr/lib64/boost1.78, I tried to specify it through Boost_LIBRARIES, but it didn't work. I also tried BOOST_LIBRARYDIR, Boost_LIBRARY_DIRS and Boost_LIBRARIES, both of which are not available.

The following is the complete compilation Log:

-- The CXX compiler identification is Clang 14.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Boost 1.78.0 at /usr/lib64/cmake/Boost-1.78.0
--   Requested configuration: QUIET REQUIRED COMPONENTS system;program_options
-- BoostConfig: find_package(boost_headers 1.78.0 EXACT CONFIG REQUIRED QUIET HINTS /usr/lib64/cmake)
-- Found boost_headers 1.78.0 at /usr/lib64/cmake/boost_headers-1.78.0
-- BoostConfig: find_package(boost_system 1.78.0 EXACT CONFIG REQUIRED QUIET HINTS /usr/lib64/cmake)
-- Found boost_system 1.78.0 at /usr/lib64/cmake/boost_system-1.78.0
-- Boost toolset is clang14 (Clang 14.0.6)
-- Scanning /usr/lib64/cmake/boost_system-1.78.0/libboost_system-variant*.cmake
--   Including /usr/lib64/cmake/boost_system-1.78.0/libboost_system-variant-shared.cmake
--   [ ] libboost_system.so.1.78.0
--   Including /usr/lib64/cmake/boost_system-1.78.0/libboost_system-variant-static.cmake
--   [x] libboost_system.a
-- Adding boost_system dependencies: headers
-- BoostConfig: find_package(boost_program_options 1.78.0 EXACT CONFIG REQUIRED QUIET HINTS /usr/lib64/cmake)
-- Found boost_program_options 1.78.0 at /usr/lib64/cmake/boost_program_options-1.78.0
-- Boost toolset is clang14 (Clang 14.0.6)
-- Scanning /usr/lib64/cmake/boost_program_options-1.78.0/libboost_program_options-variant*.cmake
--   Including /usr/lib64/cmake/boost_program_options-1.78.0/libboost_program_options-variant-shared.cmake
--   [ ] libboost_program_options.so.1.78.0
--   Including /usr/lib64/cmake/boost_program_options-1.78.0/libboost_program_options-variant-static.cmake
--   [x] libboost_program_options.a
-- Adding boost_program_options dependencies: headers
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.66.0") found components: system program_options
-- Found OpenSSL: /usr/lib64/libcrypto.so (found suitable version "3.0.1", minimum required is "1.1.0")
-- Found MySQL: /usr/lib64/libmysqlclient.so
-- Configuring done
-- Generating done
-- Build files have been written to: /
make: Entering directory '/opt/trojan-1.15.0'
make: Leaving directory '/opt/trojan-1.15.0'
make: *** No targets specified and no makefile found.  Stop.
[  5%] Building CXX object CMakeFiles/trojan.dir/src/core/authenticator.cpp.o
[ 11%] Building CXX object CMakeFiles/trojan.dir/src/core/config.cpp.o
[ 16%] Building CXX object CMakeFiles/trojan.dir/src/core/log.cpp.o
[ 22%] Building CXX object CMakeFiles/trojan.dir/src/core/service.cpp.o
[ 27%] Building CXX object CMakeFiles/trojan.dir/src/core/version.cpp.o
[ 33%] Building CXX object CMakeFiles/trojan.dir/src/main.cpp.o
[ 38%] Building CXX object CMakeFiles/trojan.dir/src/proto/socks5address.cpp.o
[ 44%] Building CXX object CMakeFiles/trojan.dir/src/proto/trojanrequest.cpp.o
[ 50%] Building CXX object CMakeFiles/trojan.dir/src/proto/udppacket.cpp.o
[ 55%] Building CXX object CMakeFiles/trojan.dir/src/session/clientsession.cpp.o
[ 61%] Building CXX object CMakeFiles/trojan.dir/src/session/forwardsession.cpp.o
[ 66%] Building CXX object CMakeFiles/trojan.dir/src/session/natsession.cpp.o
[ 72%] Building CXX object CMakeFiles/trojan.dir/src/session/serversession.cpp.o
[ 77%] Building CXX object CMakeFiles/trojan.dir/src/session/session.cpp.o
[ 83%] Building CXX object CMakeFiles/trojan.dir/src/session/udpforwardsession.cpp.o
[ 88%] Building CXX object CMakeFiles/trojan.dir/src/ssl/ssldefaults.cpp.o
[ 94%] Building CXX object CMakeFiles/trojan.dir/src/ssl/sslsession.cpp.o
make[2]: *** No rule to make target 'usr/lib64/libboost_system.a', needed by '//trojan'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/trojan.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
error while running runtime: exit status 2
ERRO[0055] exit status 2
ERRO[0055] exit status 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant