← Back to team overview

maria-developers team mailing list archive

Re: building MariaDB 10/trunk with external SSL generates errors/warnings. Docs are inconsistent. What's the right procedure?

 

Hi,

- ./BUILD/SETUP.sh can hardly  be considered documentation, nor in any way
supported tool.  It was not really touched since autotools have gone. Kindly
ignore everything it says.

- WITH_SSL, in version you're currently working on (10.0 trunk), has
exactly 4 valid values:  yes(means system or bundled), no,system, bundled.
There is no accommodation for --with-ssl=path, , for current 10.0 alpha 
. But I believe it is being ported, so feel free to file a bug once a new
version with this support appears, and if it does not work as you expect it
to work.




> -----Original Message-----
> From: Maria-developers [mailto:maria-developers-
> bounces+wlad=montyprogram.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> darx@xxxxxxxx
> Sent: Freitag, 12. Juli 2013 23:56
> To: maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: [Maria-developers] building MariaDB 10/trunk with external SSL
> generates errors/warnings. Docs are inconsistent. What's the right
procedure?
> 
> hi,
> 
> building
> 
> 	cd /usr/local/src/mariadb
> 	bzr log | head -n 5
> 		------------------------------------------------------------
> 		revno: 3766 [merge]
> 		committer: Alexander Barkov <bar@xxxxxxxxxxx>
> 		branch nick: maria-10.0.ms
> 		timestamp: Wed 2013-07-10 18:46:33 +0400
> 
> reading ./BUILD/SETUP.sh
> 
> 		...
> 120             # SSL library to use.--with-ssl will select our bundled
> yaSSL
> 		# implementation of SSL. To use OpenSSL you will need to
> 		specify
> 		# the location of OpenSSL headers and libs on your
> 		system.
> 		# Ex --with-ssl=/usr
> 		<================================= OK, do this
> 		SSL_LIBRARY=--with-ssl
> 		...
> 
> configuring @ `cmake`
> 
> 	cd /usr/local/src/mariadb
> 	rm -rf bld
> 	mkdir bld
> 	cd bld
> 	cmake .. \
> 	 -DWITH_SSL=/usr/local/ssl \
> 	 -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include \
> 	 -DOPENSSL_SSL_LIBRARY=/usr/local/ssl/lib64/libssl.so \
> 	 -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib64/libcrypto.so
> 
> fails, returning,
> 
> 	...
> 	CMake Error at cmake/ssl.cmake:90 (MESSAGE):
> 	  Wrong option for WITH_SSL.  Valid values are : yes, no,
> 	  bundled
> 	Call Stack (most recent call first):
> 	  CMakeLists.txt:260 (MYSQL_CHECK_SSL)
> 	...
> 	-- Configuring incomplete, errors occurred!
> 
> 	vi ../CmakeLists.txt
> 		...
> 		# Add bundled or system zlib.
> 		MYSQL_CHECK_ZLIB_WITH_COMPRESS()
> 		# Optionally add bundled yassl/taocrypt or system
> 		openssl.
> 260             MYSQL_CHECK_SSL()
> 		# Add readline or libedit.
> 		MYSQL_CHECK_READLINE()
> 
> checking
> 
> 	vi cmake/ssl.cmake
> 		...
> 		# MYSQL_CHECK_SSL
> 		#
> 		# Provides the following configure options:
> 		# WITH_SSL=[yes|no|bundled]
> 		MACRO (MYSQL_CHECK_SSL)
> 		  IF(NOT WITH_SSL)
> 		   IF(WIN32)
> 		     CHANGE_SSL_SETTINGS("bundled")
> 		   ELSE()
> 		     CHANGE_SSL_SETTINGS("no")
> 		   ENDIF()
> 		  ENDIF()
> 
> 		  IF(WITH_SSL STREQUAL "bundled")
> 		    MYSQL_USE_BUNDLED_SSL()
> 		  ELSEIF(WITH_SSL STREQUAL "system" OR WITH_SSL
> STREQUAL
> 		  "yes")
> 		    # Check for system library
> 		    SET(OPENSSL_FIND_QUIETLY TRUE)
> 		    INCLUDE(FindOpenSSL)
> 		    FIND_LIBRARY(CRYPTO_LIBRARY crypto)
> 		    MARK_AS_ADVANCED(CRYPTO_LIBRARY)
> 		    INCLUDE(CheckSymbolExists)
> 		    SET(CMAKE_REQUIRED_INCLUDES
> ${OPENSSL_INCLUDE_DIR})
> 		    CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH
> 		    "openssl/sha.h"
> 		                        HAVE_SHA512_DIGEST_LENGTH)
> 		    SET(CMAKE_REQUIRED_INCLUDES)
> 		    IF(OPENSSL_FOUND AND CRYPTO_LIBRARY AND
> 		    HAVE_SHA512_DIGEST_LENGTH)
> 		      SET(SSL_SOURCES "")
> 		      SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES}
> 		      ${CRYPTO_LIBRARY})
> 		      SET(SSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
> 		      SET(SSL_INTERNAL_INCLUDE_DIRS "")
> 		      SET(SSL_DEFINES "-DHAVE_OPENSSL")
> 		      CHANGE_SSL_SETTINGS("system")
> 		    ELSE()
> 		      IF(WITH_SSL STREQUAL "system")
> 		        MESSAGE(SEND_ERROR "Cannot find appropriate
> 		        system libraries for SSL. Use  WITH_SSL=bundled
> 		        to enable SSL su
> 		      ENDIF()
> 		      MYSQL_USE_BUNDLED_SSL()
> 		    ENDIF()
> 		  ELSEIF(NOT WITH_SSL STREQUAL "no")
> 		    MESSAGE(SEND_ERROR "Wrong option for WITH_SSL. Valid
> 		    values are : yes, no, bundled")
> 		  ENDIF()
> 		ENDMACRO()
> 
> there's no accommodation for "--with-ssl=/path/to/ssl/install".
> 
> If I instead
> 
> cmake .. \
>  -DWITH_SSL=yes \
>  -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include \
>  -DOPENSSL_SSL_LIBRARY=/usr/local/ssl/lib64/libssl.so \
>  -DOPENSSL_CRYPTO_LIBRARY=/usr/local/ssl/lib64/libcrypto.so
> 
> it returns,
> 
> 	...
> 	-- Running cmake version 2.8.11.1
> 	-- MariaDB 10.0.3
> 	-- Packaging as: mariadb-10.0.3-Linux-x86_64
> 	-- Found OpenSSL:
> 	/usr/local/ssl/lib64/libssl.so;/usr/local/ssl/lib64/libcrypto.so
> 	(found version "1.0.1e")
> 	...
> 	-- Configuring done
> 
> then a bunch of these messages:
> 
> 	...
> 	CMake Warning at cmake/plugin.cmake:184 (ADD_LIBRARY):
> 	  Cannot generate a safe runtime search path for target feedback
> 	  because
> 	  files in some directories may conflict with libraries in
> 	  implicit
> 	  directories:
> 
> 	    runtime library [libcrypto.so.1.0.0] in /usr/lib64 may be
> 	    hidden by files in:
> 	      /usr/local/ssl/lib64
> 
> 	  Some of these libraries may not be found correctly.
> 	Call Stack (most recent call first):
> 	  plugin/feedback/CMakeLists.txt:20 (MYSQL_ADD_PLUGIN)
> 
> 
> 	CMake Warning at cmake/libutils.cmake:259 (ADD_LIBRARY):
> 	  Cannot generate a safe runtime search path for target libmysql
> 	  because
> 	  files in some directories may conflict with libraries in
> 	  implicit
> 	  directories:
> 
> 	    runtime library [libcrypto.so.1.0.0] in /usr/lib64 may be
> 	    hidden by files in:
> 	      /usr/local/ssl/lib64
> 
> 	  Some of these libraries may not be found correctly.
> 	Call Stack (most recent call first):
> 	  libmysql/CMakeLists.txt:374 (MERGE_LIBRARIES)
> 
> 
> 	CMake Warning at client/CMakeLists.txt:78 (ADD_EXECUTABLE):
> 	  Cannot generate a safe runtime search path for target
> 	  async_example because
> 	  files in some directories may conflict with libraries in
> 	  implicit
> 	  directories:
> 
> 	    runtime library [libcrypto.so.1.0.0] in /usr/lib64 may be
> 	    hidden by files in:
> 	      /usr/local/ssl/lib64
> 
> 	  Some of these libraries may not be found correctly.
> 	...
> 
> 
> What's the right method to find/use external SSL libs/headers in a
> MariaDB build without errors or warnings?
> 
> --darx
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-developers
> Post to     : maria-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-developers
> More help   : https://help.launchpad.net/ListHelp



References