• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Debian]Installing library to compile OTClient - failed

cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARIES=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARY=/usr/local/ssl/lib/libssl.so -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include
Code:
-DUSE_STATIC_LIBS=OFF ..
-- Link to static libraries: OFF
-- Build type: Debug
-- Build commit: devel
-- Build revision: 0
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- LuaJIT: OFF
-- Debug information: ON
-- Crash handler: ON
-- OpenGL ES: OFF
-- Bot protection: OFF
-- Use precompiled header: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/binny/Documents/otclient/build

make
Code:
make
make[2]: *** No rule to make target '/usr/local/ssl/lib/libcrypto.so', needed by 'otclient'.  Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/otclient.dir/all' failed
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
 
I compiled OTClient (debug version) on Debian Stretch with these steps below:

1. First make sure you have compiled physfs (to fix an error later when compiling)

wget https://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2
tar -xjf physfs-2.0.3.tar.bz2 `
cd physfs-2.0.3/ && mkdir build && cd build && cmake .. && make

2. Install and replace libphysfs

make install
cp /usr/local/lib/libphysfs.so.2.0.3 /usr/lib/x86_64-linux-gnu/

3. Create local directories for ssl files

mkdir -p /usr/local/ssl/lib /usr/local/ssl/include

4. Download libssl package:

wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl-dev_1.0.1t-1+deb8u6_amd64.deb

5. Extract files

ar -x libssl-dev_1.0.1t-1+deb8u6_amd64.deb
tar xf data.tar.xz

6. Copy the files to local directory:

cp usr/lib/libcrypto.so /usr/local/ssl/lib/
cp -R usr/include/openssl /usr/local/ssl/include/

7. Copy libssl.so from a older libssl package to the local ssl directory:
(there is no shared library file (libssl.so) included in package from step 5 but I had 1.0.2 installed via apt-get)

cp /usr/lib/x86_64-linux-gnu/libssl.so.1.0.2 /usr/local/ssl/lib/
ln -s /usr/local/ssl/lib/libssl.so.1.0.2 /usr/local/ssl/lib/libssl.so

8. Compile otclient:

cd otclient
rm -R build # if exists
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_ROOT_DIR=/usr/local/ssl -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARIES=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARY=/usr/local/ssl/lib/libssl.so -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include -DUSE_STATIC_LIBS=OFF ..

Did u compile a 0.4 sourcepack on new debian updated?
I'm trying to do and got the same errors then topic authors
 
So what u said is Debian stop to support libssl1.0? And i can not compile without this?
It isn't just:
apt-get install libssl1.0-dev
I upgraded to Stretch today and had this same problem.
What you posted, simply:
Code:
apt-get install libssl1.0-dev
Worked for me.
Simply deleted CMake* in build, cmake again, make, fixed.
 
Last edited:
@e.e Only problem is that when you downgrade an important package like libssl is that you will have a security threat for other applications on your system that use OpenSSL, thus you are open to vulnerabilities that are fixed in newer versions of the OpenSSL library. That is why I think the workarround is to use an older version of OpenSS library only for otclient and not for every other applications on your system, until api changes are fixed in OTClient.
 
Last edited:
@e.e Only problem is that when you downgrade an important package like libssl is that you will have a security threat for other applications on your system that use OpenSSL, thus you are open to vulnerabilities that are fixed in newer versions of the OpenSSL library. That is why I think the workarround is to use an older version of OpenSS library only for otclient and not for every other applications on your system, until api changes are fixed in OTClient.

How to use only to OTClient? Is a parameter when compile?
 
@e.e Only problem is that when you downgrade an important package like libssl is that you will have a security threat for other applications on your system that use OpenSSL, thus you are open to vulnerabilities that are fixed in newer versions of the OpenSSL library. That is why I think the workarround is to use an older version of OpenSS library only for otclient and not for every other applications on your system, until api changes are fixed in OTClient.

So how to use an older version of OpenSS library only for otclient and not for every other applications on the system?
 
How to use only to OTClient? Is a parameter when compile?

Can you use this command and copy & paste the content of output.txt here? I want to know the location of libraries files to see if they can be found.

find / \( -name '*libssl*' -o -name '*libcrypto*' \) > output.txt
 
I had formated my computer to make step by step again, and everything works:
apt-get install build-essential cmake git-core liblua5.1-0-dev libvorbis-dev libopenal-dev libphysfs-dev libz3-dev freeglut3-dev libc6-dev-i386 doxygen libncurses5-dev mercurial libboost-all-dev libglew-dev

wget https://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2
tar -xjf physfs-2.0.3.tar.bz2 `
cd physfs-2.0.3/ && mkdir build && cd build && cmake .. && make
make install
cp /usr/local/lib/libphysfs.so.2.0.3 /usr/lib/x86_64-linux-gnu/

mkdir -p /usr/local/ssl/lib /usr/local/ssl/include
wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl-dev_1.0.1t-1+deb8u6_amd64.deb
ar -x libssl-dev_1.0.1t-1+deb8u6_amd64.deb
tar xf data.tar.xz

Until this:
cp usr/lib/libcrypto.so /usr/local/ssl/lib/

Show me this errors, but folder is not there, look:
Code:
root@brabbt:/home/binny# wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl-dev_1.0.1t-1+deb8u6_amd64.deb
--2017-09-29 12:03:33--  http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl-dev_1.0.1t-1+deb8u6_amd64.deb
Resolving ftp.us.debian.org (ftp.us.debian.org)... 128.61.240.89, 208.80.154.15, 128.30.2.26, ...
Connecting to ftp.us.debian.org (ftp.us.debian.org)|128.61.240.89|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1283384 (1.2M) [application/octet-stream]
Saving to: ‘libssl-dev_1.0.1t-1+deb8u6_amd64.deb.2’

libssl-dev_1.0.1t-1 100%[===================>]   1.22M   324KB/s    in 4.0s   

2017-09-29 12:03:37 (313 KB/s) - ‘libssl-dev_1.0.1t-1+deb8u6_amd64.deb.2’ saved [1283384/1283384]

root@brabbt:/home/binny# ar -x libssl-dev_1.0.1t-1+deb8u6_amd64.deb
root@brabbt:/home/binny# tar xf data.tar.xz
root@brabbt:/home/binny# cp usr/lib/libcrypto.so /usr/local/ssl/lib/
cp: cannot stat 'usr/lib/libcrypto.so': No such file or directory
root@brabbt:/home/binny# ls
control.tar.gz                 libssl-dev_1.0.1t-1+deb8u6_amd64.deb.1
data.tar.xz                 libssl-dev_1.0.1t-1+deb8u6_amd64.deb.2
debian-binary                 Music
Desktop                     physfs-2.0.3
Documents                 physfs-2.0.3.tar.bz2
Downloads                 Pictures
GTA San Andreas User Files         PlayOnLinux's virtual drives
kodi_crashlog-20170926_182036.log     Public
kodi_crashlog-20170926_182053.log     sublime-text_build-3083_amd64.deb
kodi_crashlog-20170926_182149.log     Templates
kodi_crashlog-20170926_182312.log     usr
kodi_crashlog-20170926_182324.log     Videos
libssl-dev_1.0.1t-1+deb8u6_amd64.deb
root@brabbt:/home/binny#
 
you need to copy from /home/binny with:

cp usr/lib/x86_64-linux-gnu/libcrypto.so /usr/local/ssl/lib

and:

cp /usr/lib/x86_64-linux-gnu/libssl.so.1.0* /usr/local/ssl/lib
 
you need to copy from /home/binny with:

cp usr/lib/x86_64-linux-gnu/libcrypto.so /usr/local/ssl/lib

and:

cp /usr/lib/x86_64-linux-gnu/libssl.so.1.0* /usr/local/ssl/lib

But i awalys got this problem when i try to cp usr/lib/x86_64-linux-gnu/libcrypto.so /usr/local/ssl/lib
Code:
root@brabbt:/home/binny# cp usr/lib/x86_64-linux-gnu/libcrypto.so /usr/local/ssl/lib
cp: cannot stat 'usr/lib/x86_64-linux-gnu/libcrypto.so': No such file or directory
root@brabbt:/home/binny# cp /usr/lib/x86_64-linux-gnu/libssl.so.1.0* /usr/local/ssl/lib
root@brabbt:/home/binny#

Code:
root@brabbt:/home/binny# ls
control.tar.gz                 libssl-dev_1.0.1t-1+deb8u6_amd64.deb.1
data.tar.xz                 libssl-dev_1.0.1t-1+deb8u6_amd64.deb.2
debian-binary                 Music
Desktop                     physfs-2.0.3
Documents                 physfs-2.0.3.tar.bz2
Downloads                 Pictures
GTA San Andreas User Files         PlayOnLinux's virtual drives
kodi_crashlog-20170926_182036.log     Public
kodi_crashlog-20170926_182053.log     sublime-text_build-3083_amd64.deb
kodi_crashlog-20170926_182149.log     Templates
kodi_crashlog-20170926_182312.log     usr
kodi_crashlog-20170926_182324.log     Videos
libssl-dev_1.0.1t-1+deb8u6_amd64.deb
root@brabbt:/home/binny#
 
You can also just try:

cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0* /usr/local/ssl/lib

Then try to compile. If it shows errors try to rename the build options so that the names correspond with the file names in /usr/local/ssl/lib e.g. libssl.so and libcrypto.so
 
Last edited:
You can also just try:

cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0* /usr/local/ssl/lib

Then try to compile. If it shows errors try to rename the build options so that the names correspond with the file names in /usr/local/ssl/lib e.g. libssl.so and libcrypto.so

Do i doing something wrong?
Code:
root@brabbt:/home/binny/Documents/otclient# rm  -r build
root@brabbt:/home/binny/Documents/otclient# mkdir build && cd build
root@brabbt:/home/binny/Documents/otclient/build# cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARIES=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARY=/usr/local/ssl/lib/libssl.so -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include
CMake Error: The source directory "/home/binny/Documents/otclient/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
root@brabbt:/home/binny/Documents/otclient/build#
 
You need to add 2 periods on the end of the command like this: cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARIES=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARY=/usr/local/ssl/lib/libssl.so -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include ..
 
Code:
root@brabbt:/home/binny/Documents/otclient# rm -r build
root@brabbt:/home/binny/Documents/otclient# mkdir build && cd build
root@brabbt:/home/binny/Documents/otclient/build# cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARIES=/usr/local/ssl/lib/libcrypto.so -DOPENSSL_LIBRARY=/usr/local/ssl/lib/libssl.so -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_KNOWS_CXX11
-- Performing Test COMPILER_KNOWS_CXX11 - Success
-- Performing Test COMPILER_KNOWS_STDLIB
-- Performing Test COMPILER_KNOWS_STDLIB - Failed
-- Link to static libraries: ON
-- Build type: Debug
-- Build commit: devel
-- Build revision: 0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.1.a  
-- LuaJIT: OFF
-- Found PHYSFS: /usr/local/lib/libphysfs.a  
-- Found OPENSSL: /usr/local/ssl/lib/libssl.so;/usr/local/ssl/lib/libcrypto.so  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.a  
-- Debug information: ON
-- Crash handler: ON
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Found GLEW: /usr/lib/x86_64-linux-gnu/libGLEW.so  
-- OpenGL ES: OFF
-- Found OPENAL: /usr/lib/x86_64-linux-gnu/libopenal.so  
-- Found VORBISFILE: /usr/lib/x86_64-linux-gnu/libvorbisfile.a  
-- Found VORBIS: /usr/lib/x86_64-linux-gnu/libvorbis.a  
-- Found OGG: /usr/lib/x86_64-linux-gnu/libogg.a  
-- Bot protection: OFF
-- Use precompiled header: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/binny/Documents/otclient/build

make:
hastebin
 
I upgraded to Stretch today and had this same problem.
What you posted, simply:
Code:
apt-get install libssl1.0-dev
Worked for me.
Simply deleted CMake* in build, cmake again, make, fixed.

Are u still using libssl1.0-dev?
 
@binny You need to check if the names of the library files in /usr/local/ssl/lib are the same name you use in the cmake command. The file should be called something like /usr/local/ssl/lib/libssl.so.1.0.1. If the name is different then the one in the cmake command you need to change the command so that the name of the file is correct for libssl.so 1.0.1 and libcrypto.so 1.0.1

when you get the same errors after trying again than you probably copied the wrong libraries and you need to make sure that you got the right versions. (it should be lower than version 1.1)
 
Last edited:
What are u mean? Do i need to change my cmake paramets as my libs on ssl folder?
Code:
binny@brabbt:/usr/local/ssl/lib$ ls
libcrypto.so.1.0.2  libssl.so  libssl.so.1.0.2
binny@brabbt:/usr/local/ssl/lib$

How?
 
Back
Top