On Tue, 13 Jun 2006, Bret Schuhmacher wrote:
I'm having problems loading the mysql module.
Seems to be a linker issue -
the debug says function floor isn't exported. Anything different required to
build or load this module under Solaris10? Do I have to force a 64 bit link
or something? The Makefile has a bunch of 64 bit stuff in it:
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wall -mcpu=ultrasparc
-mtune=ultrasparc -DNAME='"openser"'
-DVERSION='"1.0.1"'
-DARCH='"sparc64"' -DOS='"solaris"'
-DCOMPILER='"gcc 3.4.3"' -D__CPU_sparc64
-D__OS_solaris .....
ldd shows this, but it's not very helpful:
bash-3.00# ldd /usr/local/lib/openser/modules/mysql.so
libz.so => /usr/lib/libz.so
libc.so.1 => /lib/libc.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
It looks like the mysql module isn't linked aginst the mysql client
library (typically libmysqlclient.so). Here is what my mysql module
looks like:
$ ldd /opt/openser/lib/openser/modules/mysql.so
libmysqlclient.so.15 => /opt/mysql/lib/mysql/libmysqlclient.so.15
libz.so.1 => /usr/lib/libz.so.1
libc.so.1 => /usr/lib/libc.so.1
librt.so.1 => /usr/lib/librt.so.1
libcrypt_i.so.1 => /usr/lib/libcrypt_i.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libm.so.2 => /usr/lib/libm.so.2
libgcc_s.so.1 => /usr/sfw/lib/libgcc_s.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libscf.so.1 => /usr/lib/libscf.so.1
libdoor.so.1 => /usr/lib/libdoor.so.1
libuutil.so.1 => /usr/lib/libuutil.so.1
/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
/platform/SUNW,Ultra-5_10/lib/libmd5_psr.so.1
In order to get this to work, I had to adjust the DEFS and LIBS values
in Makefile.defs. Not sure if there is a cleaner way (maybe someone
could adjust the build process to use the values returned from
mysql_config?), but this got things working.
Hope this helps,
- Ryan
--
UNIX Administrator
http://daemons.net/~matty