I am looking for alternative of install_name_tool of MAC in CentOS. Exactly I want to build MySQL on non default location. Also the shared libraries of the mysql binary should be on non default location and properly linked.
I wasnt able to link shared libraries libssl & libcrypto to the mysqld binary.
[user@localhost mysql]$ ldd /usr/local/mysql/bin/mysqld linux-gate.so.1 => (0x00186000) libpthread.so.0 => /lib/libpthread.so.0 (0x008e2000) libz.so.1 => /lib/libz.so.1 (0x0097f000) librt.so.1 => /lib/librt.so.1 (0x00912000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00c70000) libdl.so.2 => /lib/libdl.so.2 (0x00727000) libssl.so.1.0.0 => not found libcrypto.so.1.0.0 => not found libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00a7e000) libm.so.6 => /lib/libm.so.6 (0x008b0000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00a70000) libc.so.6 => /lib/libc.so.6 (0x00755000) /lib/ld-linux.so.2 (0x00731000)
I am sure that openssl is installed in /usr/local/extra directory as i also installed apache perfectly, which is currently working, my configure command is :
cmake . -LH -DCMAKE_INCLUDE_PATH=/usr/local/extra/include -DCMAKE_LIBRARY_PATH=/usr/local/extra/lib -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/var -DSYSCONFDIR=/usr/local/mysql/etc -DMYSQL_UNIX_ADDR=/usr/local/mysql/tmp/mysql.sock -DCURSES_LIBRARY=/usr/local/extra/lib/libncurses.so.5 -DCURSES_INCLUDE_PATH=/usr/local/extra/include -DWITH_SSL=yes -DWITH_ZLIB=system
While configuring it also shows :
-- checking for module 'openssl' -- found openssl, version 0.9.8e-rhel5 -- Found OpenSSL: /usr/local/extra/lib/libssl.so;/usr/local/extra/lib/libcrypto.so (found version "1..")
Can any one suggest me a tool to link shared libraries to the binary.