kakwa / uts-server

Micro RFC 3161 Time-Stamp server written in C.
http://uts-server.readthedocs.org/en/latest/
MIT License
75 stars 21 forks source link

compile failed on CentOS 7 #12

Closed gadh closed 6 years ago

gadh commented 6 years ago

the cmake finds the openssl dirs and libs right, but in the make process the ld says it cannot find the -lssl and -lcrypto, although they are exactly in those dirs it detected using openssl 1.0.2k

kakwa commented 6 years ago

Can you provide more details like compile logs and the cmake flags you used?

I tried unsuccessfully to reproduce the issue with the following environment:

# information about the environment:
[jenkins@centos-7 ~]$ rpm -qa | grep openssl
openssl-devel-1.0.2k-8.el7.x86_64
openssl-libs-1.0.2k-8.el7.x86_64
openssl-1.0.2k-8.el7.x86_64

[jenkins@centos-7 ~]$ cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 

# compilation
[jenkins@centos-7 uts-server]$ cmake . -DBUNDLE_CIVETWEB=ON     
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- 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
-- 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
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.2k") 
-- OpenSSL include dir: /usr/include
-- OpenSSL libraries: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- OpenSSL version: 1.0.2k
-- LibreSSL Detected: FALSE
-- OS Detected: Linux
-- Building Civetweb From: https://github.com/civetweb/civetweb
-- Found Git: /usr/bin/git (found version "1.8.3.1") 
-- Find Header Directory for libcivetweb: /home/jenkins/uts-server/vendor/usr/include
-- Find Dynamic Library for libcivetweb:  /home/jenkins/uts-server/vendor/usr/lib/libcivetweb.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jenkins/uts-server
[jenkins@centos-7 uts-server]$ make
Scanning dependencies of target civetweb
[  8%] Creating directories for 'civetweb'
[ 16%] Performing download step (git clone) for 'civetweb'
Cloning into 'civetweb'...
remote: Counting objects: 19219, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 19219 (delta 42), reused 70 (delta 41), pack-reused 19131
Receiving objects: 100% (19219/19219), 22.56 MiB | 235.00 KiB/s, done.
Resolving deltas: 100% (12276/12276), done.
Note: checking out 'v1.10'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 0f1b435... Release CivetWeb version 1.10
[ 25%] Performing patch step for 'civetweb'
[ 33%] Performing update step for 'civetweb'
[ 41%] Performing configure step for 'civetweb'
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- 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
-- 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
-- Target architecture - x86_64
-- Thread Stack Size - 102400
-- Serve no static files - ON
-- Disable CGI support - ON
-- Disable caching support - ON
-- C++ wrappers - OFF
-- IP Version 6 - ON
-- Websockets support - OFF
-- Server statistics support - OFF
-- Memory Debugging - OFF
-- ASAN in debug mode - ON
-- Force x32 / x64 architecture - OFF
-- Lua CGI support - OFF
-- Executable installation - ON
-- Build if there are warnings - ON
-- Duktape CGI support - OFF
-- SSL support - ON
-- Compile for OpenSSL 1.1 API - OFF
-- Dynamically load SSL libraries - ON
-- SSL Library Name - libssl.so
-- SSL Cryptography Library Name - libcrypto.so
-- Configuring C Compiler
-- Performing Test HAVE_C_FLAG_STD_C11
-- Performing Test HAVE_C_FLAG_STD_C11 - Success
-- Performing Test HAVE_C_FLAG_WALL
-- Performing Test HAVE_C_FLAG_WALL - Success
-- Performing Test HAVE_C_FLAG_WEXTRA
-- Performing Test HAVE_C_FLAG_WEXTRA - Success
-- Performing Test HAVE_C_FLAG_WSHADOW
-- Performing Test HAVE_C_FLAG_WSHADOW - Success
-- Performing Test HAVE_C_FLAG_WCONVERSION
-- Performing Test HAVE_C_FLAG_WCONVERSION - Success
-- Performing Test HAVE_C_FLAG_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_FLAG_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_FLAG_WEVERYTHING
-- Performing Test HAVE_C_FLAG_WEVERYTHING - Failed
-- Performing Test HAVE_C_FLAG_WPARENTHESES
-- Performing Test HAVE_C_FLAG_WPARENTHESES - Success
-- Performing Test HAVE_C_FLAG_W4
-- Performing Test HAVE_C_FLAG_W4 - Failed
-- Performing Test HAVE_C_FLAG_WNO_PADDED
-- Performing Test HAVE_C_FLAG_WNO_PADDED - Success
-- Performing Test HAVE_C_FLAG_WNO_UNUSED_MACROS
-- Performing Test HAVE_C_FLAG_WNO_UNUSED_MACROS - Success
-- Performing Test HAVE_C_FLAG_WNO_RESERVED_ID_MACROS
-- Performing Test HAVE_C_FLAG_WNO_RESERVED_ID_MACROS - Success
-- Performing Test HAVE_C_FLAG_WNO_FORMAT_NONLITERAL
-- Performing Test HAVE_C_FLAG_WNO_FORMAT_NONLITERAL - Success
-- Performing Test HAVE_C_FLAG_WNO_DATE_TIME
-- Performing Test HAVE_C_FLAG_WNO_DATE_TIME - Success
-- Performing Test HAVE_C_FLAG_WNO_CAST_QUAL
-- Performing Test HAVE_C_FLAG_WNO_CAST_QUAL - Success
-- Performing Test HAVE_C_FLAG_WD4820
-- Performing Test HAVE_C_FLAG_WD4820 - Failed
-- Performing Test HAVE_C_FLAG_WX
-- Performing Test HAVE_C_FLAG_WX - Failed
-- Performing Test HAVE_C_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_C_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_C_FLAG_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FLAG_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FLAG_FSTACK_PROTECTOR_STRONG
-- Performing Test HAVE_C_FLAG_FSTACK_PROTECTOR_STRONG - Success
-- Performing Test HAVE_C_FLAG_FLTO
-- Performing Test HAVE_C_FLAG_FLTO - Success
-- Performing Test HAVE_C_FLAG_FSANITIZE_UNDEFINED
-- Performing Test HAVE_C_FLAG_FSANITIZE_UNDEFINED - Failed
-- Performing Test HAVE_C_FLAG_FSANITIZE_ADDRESS
-- Performing Test HAVE_C_FLAG_FSANITIZE_ADDRESS - Failed
-- Performing Test HAVE_C_FLAG_FSTACK_PROTECTOR_ALL
-- Performing Test HAVE_C_FLAG_FSTACK_PROTECTOR_ALL - Success
-- Performing Test HAVE_C_FLAG_COVERAGE
-- Performing Test HAVE_C_FLAG_COVERAGE - Success
-- Could NOT find WinSock (missing:  WINSOCK_LIBRARIES WINSOCK_INCLUDE_DIRS) 
-- Looking for include file pthread.h
-- Looking for include file 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  
-- Found LibRt: /usr/lib64/librt.so  
-- Found LibDl: /usr/lib64/libdl.so  
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    OPENSSL_USE_STATIC_LIBS

-- Build files have been written to: /home/jenkins/uts-server/civetweb-prefix/src/civetweb-build
[ 50%] Performing build step for 'civetweb'
Scanning dependencies of target c-library
[ 50%] Building C object src/CMakeFiles/c-library.dir/civetweb.c.o
Linking C static library libcivetweb.a
[ 50%] Built target c-library
Scanning dependencies of target c-executable
[100%] Building C object src/CMakeFiles/c-executable.dir/main.c.o
Linking C executable civetweb
[100%] Built target c-executable
[ 58%] Performing install step for 'civetweb'
[ 50%] Built target c-library
[100%] Built target c-executable
Install the project...
-- Install configuration: ""
-- Installing: /home/jenkins/uts-server/vendor/usr/lib/libcivetweb.a
-- Installing: /home/jenkins/uts-server/vendor/usr/include/civetweb.h
-- Installing: /home/jenkins/uts-server/vendor/usr/bin/civetweb
[ 66%] Completed 'civetweb'
[ 66%] Built target civetweb
Scanning dependencies of target uts-server
[ 75%] Building C object CMakeFiles/uts-server.dir/src/cmd/uts-server.c.o
[ 83%] Building C object CMakeFiles/uts-server.dir/src/lib/rfc3161.c.o
[ 91%] Building C object CMakeFiles/uts-server.dir/src/lib/http.c.o
[100%] Building C object CMakeFiles/uts-server.dir/src/lib/utils.c.o
Linking C executable uts-server
[100%] Built target uts-server