← Back to team overview

maria-discuss team mailing list archive

Re: mariadb 10 build/link ignores specified linker path to specified lib (pcre). correct method?


On Wed, Dec 10, 2014, at 10:38 AM, Quanah Gibson-Mount wrote:
> I don't know if this will help, but this is what I had to do to get MariaDB 
> to link to Zimbra's OpenSSL in /opt/zimbra:


There are SSL-specific flags in the MariaDB cmake build.

This is the method, from a colleague, for rpath-linking SSL libs in MariaDB, with openssl in /usr/local/ssl/,

cmake ..  \
 -G "Unix Makefiles" \
 -DWITH_MYSQLD_LDFLAGS="-L/usr/local/ssl/lib64 -Wl,-rpath,/usr/local/ssl/lib64 -lssl -lcrypto
" \
 -DWITH_SSL=/usr/local/ssl \
 -DOPENSSL_ROOT_DIR=/usr/local/ssl \
 -DOPENSSL_INCLUDE_DIR=/usr/local/ssl/include \
 -DOPENSSL_LIBRARIES=/usr/local/ssl/lib64/libssl.so \
 -DCRYPTO_LIBRARY=/usr/local/ssl/lib64/libcrypto.so \

It works here as expected; and has survived all builds in 10-branch.

  ldd sql/mysqld | egrep -i "ssl|crypto|pcre"
    libssl.so.1.0.0 => /usr/local/ssl/lib64/libssl.so.1.0.0 (0x00007f616673d000)
    libcrypto.so.1.0.0 => /usr/local/ssl/lib64/libcrypto.so.1.0.0 (0x00007f6166343000)

Afaict, there are NOT pcre-specific flags available.

I'll try a variant of your approach above for pcre ...

Follow ups