Closed 0x4092 closed 5 years ago
You may try -llog to link the library
@0x4092 I kinda fixed it in the dev
branch (0038b0a), try to pull and build the dev
branch.
Thx! It works! \(^o^)/
$ git clone https://github.com/trojan-gfw/trojan -b dev
(output omitted)
$ cd trojan/
$ cp CMakeLists.txt ../
$ vim CMakeLists.txt
$ diff CMakeLists.txt ../CMakeLists.txt
57d56
< target_link_libraries(trojan atomic)
$ cmake -DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr -DENABLE_MYSQL=OFF .
-- The C compiler identification is Clang 7.0.1
-- The CXX compiler identification is Clang 7.0.1
-- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc
-- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++
-- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Boost version: 1.69.0
-- Found the following Boost libraries:
-- system
-- program_options
-- Found OpenSSL: /data/data/com.termux/files/usr/lib/libcrypto.so (found suitable version "1.1.1b", minimum required is "1.0.2")
-- Configuring done
-- Generating done
-- Build files have been written to: /data/data/com.termux/files/home/sources/trojan-dev/trojan
$ make install
Scanning dependencies of target trojan
[ 5%] Building CXX object CMakeFiles/trojan.dir/src/authenticator.cpp.o
[ 11%] Building CXX object CMakeFiles/trojan.dir/src/clientsession.cpp.o
[ 17%] Building CXX object CMakeFiles/trojan.dir/src/config.cpp.o
[ 23%] Building CXX object CMakeFiles/trojan.dir/src/forwardsession.cpp.o
[ 29%] Building CXX object CMakeFiles/trojan.dir/src/log.cpp.o
[ 35%] Building CXX object CMakeFiles/trojan.dir/src/main.cpp.o
[ 41%] Building CXX object CMakeFiles/trojan.dir/src/serversession.cpp.o
[ 47%] Building CXX object CMakeFiles/trojan.dir/src/service.cpp.o
[ 52%] Building CXX object CMakeFiles/trojan.dir/src/session.cpp.o
[ 58%] Building CXX object CMakeFiles/trojan.dir/src/socks5address.cpp.o
[ 64%] Building CXX object CMakeFiles/trojan.dir/src/ssldefaults.cpp.o
[ 70%] Building CXX object CMakeFiles/trojan.dir/src/sslsession.cpp.o
[ 76%] Building CXX object CMakeFiles/trojan.dir/src/trojanrequest.cpp.o
[ 82%] Building CXX object CMakeFiles/trojan.dir/src/udpforwardsession.cpp.o
[ 88%] Building CXX object CMakeFiles/trojan.dir/src/udppacket.cpp.o
[ 94%] Building CXX object CMakeFiles/trojan.dir/src/version.cpp.o
[100%] Linking CXX executable trojan
[100%] Built target trojan
Install the project...
-- Install configuration: "Release"
-- Installing: /data/data/com.termux/files/usr/bin/trojan
-- Installing: /data/data/com.termux/files/usr/etc/trojan/config.json
-- Installing: /data/data/com.termux/files/usr/share/man/man1/trojan.1
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/README.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/authenticator.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/build.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/config.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/overview.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/protocol.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/usage.md
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/examples
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/examples/client.json-example
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/examples/forward.json-example
-- Installing: /data/data/com.termux/files/usr/share/doc/trojan/examples/server.json-example
$
On termux: