I would appreciate some help with this CMake Errors. The information is from a machine that runs Ubuntu server.
Core: TrinityCore 4.3.4
Problems: EnsureVersion.cmake and FindOpenSSL.cmake
My commands (both give the same error):-- Detected 32-bit platform
-- UNIX: Using jemalloc
-- UNIX: Using default configuration directory
-- UNIX: Using default library directory
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/bin/cc
-- Found OpenSSL library: OPENSSL_SSL_LIBRARIES-NOTFOUND;OPENSSL_CRYPTO_LIBRARIES-NOTFOUND
-- Found OpenSSL headers: /usr/include/openssl
CMake Error at cmake/macros/FindOpenSSL.cmake:188 (file):
file STRINGS file "/usr/include/openssl/openssl/opensslv.h" cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:200 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:201 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:202 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:203 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:210 (math):
math cannot parse the expression: " + 96": syntax error, unexpected
exp_PLUS, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:214 (string):
string Character with code does not exist.
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/EnsureVersion.cmake:76 (MATH):
math cannot parse the expression: "..*10000 + ..*100 + 0": syntax error,
unexpected exp_TIMES, expecting exp_OPENPARENT or exp_NUMBER (3)
Call Stack (most recent call first):
cmake/macros/EnsureVersion.cmake:95 (NORMALIZE_VERSION)
cmake/macros/FindOpenSSL.cmake:221 (ENSURE_VERSION)
CMakeLists.txt:57 (find_package)
CMake Error at cmake/macros/FindOpenSSL.cmake:223 (message):
TrinityCore needs OpenSSL version 1.0.0 but found version ..
Call Stack (most recent call first):
CMakeLists.txt:57 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/wowserver/build/CMakeFiles/CMakeOutput.log".
See also "/home/wowserver/build/CMakeFiles/CMakeError.log".
OS: Ubuntu 14.04.1 LTS 32bitcmake ../TrinityCore-4.3.4/ -DPREFIX=/home/wowserver/trinity -DOPENSSL_LIBRARIES=/usr/lib/i386-linux-gnu/ -DOPENSSL_INCLUDE_DIR=/usr/include/openssl
or
cmake ../TrinityCore-4.3.4/ -DPREFIX=/home/wowserver/trinity
OpenSSL 1.0.2
CMake 3.1.2
GCC 4.8.2
(screenshot in the attachment)
CMakeError.log: pastebin.com/ZvBiCR9K
CMakeOutput.log: pastebin.com/7NqHfRwL
Latest OpenSSL installed form: ftp://ftp.debian.org/debian/pool/main/o/openssl/
libssl1.0.0_1.0.2-1_i386.deb
libssl-dev_1.0.2-1_i386.deb
openssl_1.0.2-1_i386.deb
All requirements from Requirements - TrinityCore - TrinityCore Collaboration Platform are installed.
Screenshot of OpenSSL libraries in the attachment.
--> UPDATE 01 <--
I have opened FindOpenSSL.cmake and checked lines 188,200-203
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]).*$"
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)
message("* Debug : ${OPENSSL_VERSION_FIX}")
string(REGEX REPLACE "^0(.)" "\\1" OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_MINOR}")
string(REGEX REPLACE "^0(.)" "\\1" OPENSSL_VERSION_FIX "${OPENSSL_VERSION_FIX}")Line 188 is apparently making a problem. Because of it $(openssl_version_str) is an empty string.188: REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*"
After I removed that line, OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR, OPENSSL_VERSION_FIX had the correct version nubmers. That resolved most of the errors.
My theory at the moment is that there is a string parsing problem when OpenSSL changed form version 0.9.8 to 1.0.2
old line from opensslv.h:
new line form opensslv.h:#define OPENSSL_VERSION_NUMBER 0x009080bfL
A new path error showed up after openssl version check passed:# define OPENSSL_VERSION_NUMBER 0x1000200fL
OPENSSL_SSL_LIBRARIES-NOTFOUND;OPENSSL_CRYPTO_LIBRARIES-NOTFOUND still persists.CMake Error at cmake/macros/FindZMQ.cmake:72 (message):
Could not find ZMQ libraries/headers! Please install ZMQ with libraries and
headers
Call Stack (most recent call first):
CMakeLists.txt:59 (find_package)