Problems linking OpenSees with Scientific Linux 4.1

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
kryan
Posts: 6
Joined: Fri Jun 24, 2005 7:42 am
Location: University of Nevada, Reno
Contact:

Problems linking OpenSees with Scientific Linux 4.1

Post by kryan »

Hi,

I have just tried to build OpenSees on Scientific Linux 4.1 (functionally equivalent to Redhat Enterprise Linux 4). I get errors of the following type while linking. OpenSSL is installed on the machine so the libraries should be there. Any suggestions?

/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x34): In function `report_errors':
: undefined reference to `ERR_get_error_line_data'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0xb6): In function `vio_ssl_read':
: undefined reference to `SSL_read'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0xd7): In function `vio_ssl_read':
: undefined reference to `SSL_get_error'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x10b): In function `vio_ssl_write':
: undefined reference to `SSL_write'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x2c5): In function `vio_ssl_close':
: undefined reference to `SSL_shutdown'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x2d5): In function `vio_ssl_close':
: undefined reference to `SSL_free'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x40a): In function `sslaccept':
: undefined reference to `SSL_new'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x46a): In function `sslaccept':
: undefined reference to `SSL_clear'
/usr/lib/mysql/libmysqlclient.a(viossl.o)(.text+0x478): In function `sslaccept':
: undefined reference to `SSL_get_session'
Keri Ryan, PhD
Assistant Professor
Utah State University
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

it's not enough that they are on thye machine .. you have to tell the linker to include those ssl libraries .. you need to add some lines to the Makefile.def ..

MACHINE_LINKLIBS

or MACHINE_SPECIFIC_LIBS
kryan
Posts: 6
Joined: Fri Jun 24, 2005 7:42 am
Location: University of Nevada, Reno
Contact:

Post by kryan »

Of course. Near as I can tell, the ssl library files are located in /lib and/or /usr/lib on my machine,

and are referenced in makefile.def as:

MACHINE_LINKLIBS = -L$(BASE)/lib

where BASE is the root directory, and

MACHINE_SPECIFIC_LIBS = -ldl -lieee -lm -lc -lg2c -Wl,-rpath,/usr/lib \
/usr/lib/mysql/libmysqlclient.a

Any thoughts?

Meanwhile, I have successfully linked by removing -D_MYSQL from C++ flags. Presumably this is no problem as long as I don't try to use the database command?
Keri Ryan, PhD
Assistant Professor
Utah State University
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

your libmysqlclient needs more libraries .. suggest you fgrep around your lib directories to see where SSL_write is actually defined.
Post Reply