LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MySQL (prolly problems with openSSL?) (https://www.linuxquestions.org/questions/linux-software-2/mysql-prolly-problems-with-openssl-605594/)

GDX^ 12-09-2007 09:49 AM

MySQL (prolly problems with openSSL?)
 
Quote:

/bin/sh ../libtool --preserve-dup-deps --tag=CXX --mode=link g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o mysql mysql.o readline.o sql_string.o completion_hash.o ../cmd-line-utils/libedit/libedit.a -lncurses ../libmysql/libmysqlclient.la -lcrypt -lnsl -lm -lz
g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o ../cmd-line-utils/libedit/libedit.a -lncurses ../libmysql/.libs/libmysqlclient.so -lcrypt -lnsl -lm -lz -Wl,--rpath -Wl,/opt/mysql/lib/mysql
../libmysql/.libs/libmysqlclient.so: undefined reference to `ERR_get_error_line_data'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_set_fd'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_free'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_free'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_shutdown'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_NAME_oneline'
../libmysql/.libs/libmysqlclient.so: undefined reference to `BN_bin2bn'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_STORE_CTX_get_error_depth'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_set_default_verify_paths'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_set_session_id_context'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_get_session'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_read'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_new'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_clear'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_new'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_library_init'
../libmysql/.libs/libmysqlclient.so: undefined reference to `OPENSSL_add_all_algorithms_noconf'
../libmysql/.libs/libmysqlclient.so: undefined reference to `TLSv1_client_method'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_load_verify_locations'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_set_verify'
../libmysql/.libs/libmysqlclient.so: undefined reference to `DH_new'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_load_error_strings'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_set_cipher_list'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CIPHER_get_name'
../libmysql/.libs/libmysqlclient.so: undefined reference to `TLSv1_server_method'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_get_subject_name'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_SESSION_set_timeout'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_accept'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_STORE_CTX_get_current_cert'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_ctrl'
../libmysql/.libs/libmysqlclient.so: undefined reference to `DH_free'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_get_current_cipher'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_use_PrivateKey_file'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_check_private_key'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_STORE_CTX_get_error'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_CTX_use_certificate_file'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_connect'
../libmysql/.libs/libmysqlclient.so: undefined reference to `X509_get_issuer_name'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_free'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_get_peer_certificate'
../libmysql/.libs/libmysqlclient.so: undefined reference to `SSL_write'
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/root/mysql-5.0.45/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/mysql-5.0.45'
make: *** [all] Error 2
On google I found this could be a problem from SSL or from Make or automake.
The above output is without the --with-openssl compile-option. If I configure it with the --with-openssl option, it will give me less errors, but the 5 last lines are the same.
I tried to add this to my makefile:
{LIBS} = {LIBS} -ldl

I'm pretty new to this kind of problems. C-compilers are installed and I'm trying to install MySQL 5.0.45 on a Debian 4.0R0 system.

I hope someone know what I should do,
Wim Mariën

comprookie2000 12-09-2007 11:07 AM

apt-get install mysql-client

GDX^ 12-09-2007 11:13 AM

Ok, that's possible. I'll try.

I only installed the client libraries... (libmysqlclient5, ...)

//edit:
the above output was without the --with-openssl option. This one is after I installed mysql-client, and I added --with-openssl to my configuration line:
Quote:

../libmysql/.libs/libmysqlclient.so: undefined reference to `dlerror'
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlclose'
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlopen'
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[2]: *** [mysqladmin] Error 1
make[2]: Leaving directory `/root/mysql-5.0.45/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/mysql-5.0.45'
make: *** [all] Error 2
Currently I am trying to compile it without the --with-openssl line after installing the mysql-client package

comprookie2000 12-09-2007 11:20 AM

If you want to see what is available;
apt-get update
apt-cache search mysql
if it prints out too much info
apt-cache search mysql | less
if it says less not found
apt-get install less

GDX^ 12-09-2007 11:31 AM

I know that commands, but I want to compile it by myself (I should have MySQL 4 and MySQL 5, it's for a testing box for my opensource game control panel)

David1357 12-09-2007 11:48 AM

Quote:

Originally Posted by GDX^ (Post 2984958)
The above output is with the --with-openssl compile-option. If I configure it with the --with-openssl option, it will give me less errors, but the 5 last lines are the same.

You may not have the "libssl-dev" package installed.

Another problem might be that the OpenSSL libraries are in "/usr/local/lib" instead of "/usr/lib". If so, you need to specify the extra directory when you run configure, as in "LOPTS=-L/usr/local/lib ./configure"

In either case, the output of "configure", which should be in "config.log", will help us to better diagnose the problem.

GDX^ 12-10-2007 08:59 AM

The package libssl-dev wasn't installed, so I installed it, however, I still get the make-error...

This is my config.log: http://s3.lottery-info.eu/config.log

There are no errors in the output of the configure command. I also tried to add the LOPTS=-L/path/to/openssl/lib, but this wasn't working for me...

Thanks alot,
Wim Mariën

David1357 12-10-2007 10:58 AM

Quote:

Originally Posted by GDX^ (Post 2985989)
The package libssl-dev wasn't installed, so I installed it, however, I still get the make-error...

Could you post your most recent make errors here? Are you still getting the messages about "dlopen" and friends?

Quote:

Originally Posted by GDX^ (Post 2985989)

The log looks good. The only thing I can think of that might be causing problems is a misconfigured library path. What are the contents of "/etc/ld.so.conf"?

GDX^ 12-10-2007 11:12 AM

Quote:

# cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
# ls /etc/ld.so.conf.d/
i486-linux-gnu.conf
# cat /etc/ld.so.conf.d/i486-linux-gnu.conf
# Multiarch support
/lib/i486-linux-gnu
/usr/lib/i486-linux-gnu
/lib/i486-linux-gnu is an empty directory
/usr/lib/i486-linux-gnu is an empty directory asswell...

apt-get:

libssl-dev is already the newest version.
libssl0.9.8 is already the newest version.
openssl is already the newest version.

I will try to download openssl from their website and copy the libraries to /lib/i486-linux-gnu. Or do you have another suggestion?

Wim Mariën

//edit:
done that, didn't work out!

Last lines of my make command:
Quote:

Making all in libmysql
make[2]: Entering directory `/root/mysql-5.0.45/libmysql'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/mysql-5.0.45/libmysql'
Making all in client
make[2]: Entering directory `/root/mysql-5.0.45/client'
/bin/sh ../libtool --preserve-dup-deps --tag=CXX --mode=link g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o mysqladmin mysqladmin.o ../libmysql/libmysqlclient.la -lcrypt -lnsl -lm -L/opt/openssl//lib -lssl -lcrypto -lz
g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysqladmin mysqladmin.o ../libmysql/.libs/libmysqlclient.so -L/opt/openssl//lib -lcrypt -lnsl -lm -lssl -lcrypto -lz -Wl,--rpath -Wl,/opt/mysql/lib/mysql
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlerror'
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlclose'
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlopen'
../libmysql/.libs/libmysqlclient.so: undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[2]: *** [mysqladmin] Error 1
make[2]: Leaving directory `/root/mysql-5.0.45/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/mysql-5.0.45'
make: *** [all] Error 2
I'll try to reconfigure & make clean (didn't do that yet!)

//edit2:
It failed again. I'll try to reinstall the mysql-client-files, maybe some files where corrupt... (cause libmysqlclient.so will ALWAYS give an error!)

David1357 12-10-2007 11:28 AM

Quote:

Originally Posted by GDX^ (Post 2986110)
/lib/i486-linux-gnu is an empty directory
/usr/lib/i486-linux-gnu is an empty directory asswell...

That is not surprising. ld.so.conf is going the way of the dinosaur on newer systems.

Quote:

Originally Posted by GDX^ (Post 2986110)
I will try to download openssl from their website and copy the libraries to /lib/i486-linux-gnu.

Do not do that. You will most likely break your library setup.

Quote:

Originally Posted by GDX^ (Post 2986110)
I'll try to reconfigure & make clean (didn't do that yet!)

I think you should run "make distclean" and then re-run "configure". That will remove any hidden crud that might be breaking your build. Apparently, your "libmysqlclient.so" got built without "libdl". So when make executes this command

g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysqladmin mysqladmin.o ../libmysql/.libs/libmysqlclient.so -L/opt/openssl//lib -lcrypt -lnsl -lm -lssl -lcrypto -lz -Wl,--rpath -Wl,/opt/mysql/lib/mysql
it fails. This command would succeed if it had "-ldl" in it, but you do not want to hack around to get that working. The best solution is to run "make distclean" and re-run "configure".

GDX^ 12-10-2007 12:51 PM

it failed again :(

Quote:

g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o mysqlmanager command.o mysqlmanager.o manager.o log.o thread_registry.o listener.o protocol.o mysql_connection.o user_map.o messages.o commands.o instance.o instance_map.o instance_options.o buffer.o parse.o guardian.o parse_output.o ./.libs/liboptions.a -lpthread -lpthread -lpthread -lpthread libnet.a ../../vio/libvio.a ../../mysys/libmysys.a ../../strings/libmystrings.a ../../dbug/libdbug.a -lz -lpthread -lcrypt -lnsl -lm -lpthread
make[3]: Leaving directory `/root/mysql-5.0.45/server-tools/instance-manager'
make[3]: Entering directory `/root/mysql-5.0.45/server-tools'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/root/mysql-5.0.45/server-tools'
make[2]: Leaving directory `/root/mysql-5.0.45/server-tools'
make[1]: Leaving directory `/root/mysql-5.0.45
-rw-r--r-- 1 root root 33676 2007-12-10 19:27 Makefile

Maybe I should search in it with dreamweaver (or another editor with a good search function), since it's only 30KiB? Or am I wrong?

David1357 12-10-2007 02:38 PM

Quote:

Originally Posted by GDX^ (Post 2986218)
it failed again :(

I do not see an error message in your post. It looks like it succeeded.

GDX^ 12-11-2007 04:21 AM

huh? I don't know why I was telliing you it wasn't working.... It compiled indeed.... Prolly due my exams that I was confused or so, no Idea.

If you ever need a database David, just give me a call :-)
Thanks for your help, you solved my problem :-)

David1357 12-11-2007 09:17 AM

Quote:

Originally Posted by GDX^ (Post 2986939)
If you ever need a database David, just give me a call :-)
Thanks for your help, you solved my problem :-)

I'm glad you got it sorted out. Have fun normalizing your tables... ;)


All times are GMT -5. The time now is 02:32 AM.