James Cornell wrote:
> Have you tried to `find / -name libmysqlclient_r.so.15`?
> A change may be needed so it explicitly links with that library.

sysbench worked after I added /usr/mysql/5.0/lib/mysql to 
LD_LIBRARY_PATH.  I forgot to try that before I sent the email.  Thanks 
also to Luojia Chen for suggesting this fix.

>> Configure runs clean, but the build fails with this error:
>> <snip>
>> gcc -D_REENTRANT -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o 
>> sb_logger.o db_driver.o  -lpthread tests/fileio/libsbfileio.a 
>> tests/threads/libsbthreads.a tests/memory/libsbmemory.a 
>> tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a 
>> drivers/mysql/libsbmysql.a -L/usr/mysql/5.0/lib/64/mysql -lmysqlclient_r -lm
>> ld: fatal: file /usr/mysql/5.0/lib/64/mysql/libmysqlclient_r.so: wrong 
>> ELF class: ELFCLASS64

I fixed this error and wanted to share the details in case someone else 
like me (who comes from the Linux world and is very new to OpenSolaris) 
will know how to fix it, should they run into the same issue.  This blog 
posting had the details that I was missing:
http://blogs.sun.com/rie/entry/wrong_elf_class_requires_consistent

I downloaded Sun Studio 11 to try it instead of gcc since I couldn't 
figure out who to use the GNU linker when using gcc and I wanted to keep 
the tool chain consistent.

The critical thing I was missing was this compiler flag, xarch=amd64. 
Once I set that, everything was happy.  Here are the three commands that 
I needed to run to compile 64 bit sysbench with 64 bit mysql5, using sun 
suite 11.

# export PATH=$PATH:/opt/SUNWspro/bin
# export CFLAGS="-xarch=amd64"
# configure --with-mysql-includes=/usr/mysql/5.0/include/mysql 
--with-mysql-libs=/usr/mysql/5.0/lib/64/mysql

Tom
_______________________________________________
indiana-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/indiana-discuss

Reply via email to