Closed luckypoem closed 6 years ago
You need to specify the OpenSSL include directory
// Path to a file.
OPENSSL_INCLUDE_DIR:PATH=OPENSSL_INCLUDE_DIR-NOTFOUND
@antonchen 不太明白。怎么指定OpenSSL include 目录?在哪里指定? 能把具体命令写出来吗
cmake .. -DOPENSSL_ROOT_DIR=/usr/local/ssl/
Make sure to clean up the build directory before you rerun cmake.
@GreaterFire this time "cmake .." encounter no error,but then "make" encounter error: root@yms:~/trojan/build# ls CMakeCache.txt cmake_install.cmake Makefile trojan.service CMakeFiles CTestTestfile.cmake trojan.json root@yms:~/trojan/build# make ... collect2: error: ld returned 1 exit status CMakeFiles/trojan.dir/build.make:335: recipe for target 'trojan' failed make[2]: [trojan] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/trojan.dir/all' failed make[1]: [CMakeFiles/trojan.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 root@yms:~/trojan/build#
how to fix it? tks
Please provide full compilation log.
P.S. Try to delete all the files in the build directory by rm -rf *
and then cmake & make again.
@GreaterFire "delete all the files in the build directory by rm -rf * and then cmake & make again", the same result. very strange. i update openssl as per this article- https://sb.sb/centos-upgrade-openssl/ , isn't the method of updating openssl correct?
@GreaterFire
and can u pls also provide binary file on linux vps of https://github.com/trojan-gfw/trojan/releases/tag/v0.6.0?
@GreaterFire 我换了一台vps,它里面的openssl的版本已经是1.0.2,这样就能顺利make了
git clone https://github.com/trojan-gfw/trojan cd trojan/ git checkout stable mkdir build cd build/ cmake ..
after running "cmake .." ,i encounter error as follows: ... CMake Error at /usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR: Found unsuitable version "1.0.1t", but required is at least "1.0.2" (found /usr/lib/x86_64-linux-gnu/libcrypto.so) Call Stack (most recent call first): /usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.10/Modules/FindOpenSSL.cmake:379 (find_package_handle_standard_args) CMakeLists.txt:12 (find_package) -- Configuring incomplete, errors occurred! See also "/root/trojan/build/CMakeFiles/CMakeOutput.log". See also "/root/trojan/build/CMakeFiles/CMakeError.log". root@yms:~/trojan/build#
i already uprade openssl to version1.0.2: root@yms:~# which openssl /usr/local/ssl/bin/openssl root@yms:~# openssl version OpenSSL 1.0.2n 7 Dec 2017
how to fix it? thank you