OpenSSL CMake problem (Ubuntu server) menu

User Tag List

Results 1 to 5 of 5
  1. #1
    toni's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    OpenSSL CMake problem (Ubuntu server)

    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

    -- 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".
    My commands (both give the same error):

    cmake ../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
    OS: Ubuntu 14.04.1 LTS 32bit
    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}")
    188: REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*"
    Line 188 is apparently making a problem. Because of it $(openssl_version_str) is an empty string.

    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:
    #define OPENSSL_VERSION_NUMBER 0x009080bfL
    new line form opensslv.h:
    # define OPENSSL_VERSION_NUMBER 0x1000200fL
    A new path error showed up after openssl version check passed:
    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)
    OPENSSL_SSL_LIBRARIES-NOTFOUND;OPENSSL_CRYPTO_LIBRARIES-NOTFOUND still persists.
    Attached Thumbnails Attached Thumbnails OpenSSL CMake problem (Ubuntu server)-openssl_lib-jpg   OpenSSL CMake problem (Ubuntu server)-versions-jpg  
    Last edited by toni; 02-08-2015 at 02:17 PM.

    OpenSSL CMake problem (Ubuntu server)
  2. #2
    Vengfull's Avatar War is Coming - Warmonger VPS & Hosting Services
    CoreCoins Purchaser
    Reputation
    782
    Join Date
    Jan 2012
    Posts
    664
    Thanks G/R
    166/80
    Trade Feedback
    8 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /usr/include/openssl is the wrong location on your command by the looks of your screen shots, Its not detecting a version of openSSL during MAKE

    "
    TrinityCore needs OpenSSL version 1.0.0 but found version .."

    "
    -- Found OpenSSL library: OPENSSL_SSL_LIBRARIES-NOTFOUND;OPENSSL_CRYPTO_LIBRARIES-NOTFOUND"

  3. #3
    toni's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am aware that CMake is not detecting openSSL libraries during MAKE, i just don't know why.

    Originally Posted by Vengfull View Post
    /usr/include/openssl is the wrong location on your command by the looks of your screen shots, Its not detecting a version of openSSL during MAKE
    The location is not wrong for headers. The problem is that it is not detecting OpenSSL libraries for some reason.

    It should look like: " Found OpenSSL library: /usr/lib/i386-linux-gnu/libssl.so;/usr/lib/i386-linux-gnu/libcrypto.so "

    Originally Posted by Vengfull View Post
    TrinityCore needs OpenSSL version 1.0.0 but found version .."
    I am using the latest version, don't know why it cant detect it.

    Originally Posted by Vengfull View Post
    -- Found OpenSSL library: OPENSSL_SSL_LIBRARIES-NOTFOUND;OPENSSL_CRYPTO_LIBRARIES-NOTFOUND"
    As I mentioned in the post i am using "-DOPENSSL_LIBRARIES=/usr/lib/i386-linux-gnu/ " so it should find it

    EDIT:
    changed:
    -DOPENSSL_INCLUDE_DIR=/usr/include/openssl
    to
    -DOPENSSL_INCLUDE_DIR=/usr/include/
    First error was resolved:
    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)
    The rest remains the same.
    Last edited by toni; 02-08-2015 at 10:08 AM.

  4. #4
    toni's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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}")
    188: REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*"
    Line 188 is apparently making a problem. Because of it $(openssl_version_str) is an empty string.

    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:
    #define OPENSSL_VERSION_NUMBER 0x009080bfL
    new line form opensslv.h:
    # define OPENSSL_VERSION_NUMBER 0x1000200fL
    A new path error showed up after openssl version check passed:
    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)
    OPENSSL_SSL_LIBRARIES-NOTFOUND;OPENSSL_CRYPTO_LIBRARIES-NOTFOUND still persists.
    Last edited by toni; 02-08-2015 at 02:18 PM.

  5. #5
    Katrina Swales's Avatar Member
    Reputation
    1
    Join Date
    Mar 2015
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe changing line 189 to
    REGEX "^.*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
    Fixes it, as it ignores the space between the # and the define, unlike the old regex

Similar Threads

  1. | PROBLEM | Public Server Ascent / Repacks 2.4.X WHY ?
    By thegame240 in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 04-23-2008, 01:35 PM
  2. Problem with server
    By Functions in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-13-2008, 01:19 AM
  3. problems putting server online ( public)
    By DiFusioN in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 10-13-2007, 06:31 AM
  4. Problems with server after Re-format.
    By KRAZY2K7 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 10-07-2007, 03:14 PM
  5. Problem with server..Please help
    By Evolocity7 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 09-09-2007, 10:49 AM
All times are GMT -5. The time now is 12:07 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search