libmysqlclient_r.so.16: open failed: No such file or directory

This is a discussion on libmysqlclient_r.so.16: open failed: No such file or directory within the MySQL Database forums, part of the Database Forums category; Hello, I am a fairly new to MySQL, but am trying to create a simple test program that uses Pthreads ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-08-2008
mitchmcc@yahoo.com
 
Posts: n/a
Default libmysqlclient_r.so.16: open failed: No such file or directory

Hello,

I am a fairly new to MySQL, but am trying to create a simple test
program that uses Pthreads with MySQL (this is on Solaris 10).

I started building my test app using the linker line

LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -lmysqlclient
-lsocket -lnsl -lrt -lpthread

but changed over to

LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -
lmysqlclient_r -lsocket -lnsl -lrt -lpthread

to try and make my application "thread safe".

When I run, I am getting an error on the console:

ld.so.1: mysql_thread_example: fatal: libmysqlclient_r.so.16: open
failed: No such file or directory
Killed

It is really not even getting into 'main'.

Here is my complete Makefile:

PROGRAM = pthreads.c
OBJS = $(CSRCS:.c=.o)
CSRCS = pthreads.c

CC = gcc
LINKER = gcc
CFLAGS = -Wall -m64 -O3 -mtune=k8 -g
LDFLAGS = -m64
LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -lpthread -
lmysqlclient_r -lsocket -lnsl -lrt

all: $(PROGRAM)

$(PROGRAM): $(OBJS)
$(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)

$(OBJS):

%.o: %.c %.h
$(CC) -c $(CFLAGS) $*.c

clean:
rm -f $(OBJS) $(PROGRAM)


Finally, I tried this with the sample program posted in the MySQL
docs (28.2.16) "How to Make a Threaded Client", and it dies the same
way.

Any help or advice would be greatly appreciated.

Mitch

Is it possible that this is a 64-bit vs. 32-bit issue?

If so, do I need to get a different binary? Recompile?
Reply With Quote
  #2 (permalink)  
Old 07-08-2008
jimp@specsol.spam.sux.com
 
Posts: n/a
Default Re: libmysqlclient_r.so.16: open failed: No such file or directory

mitchmcc@yahoo.com <mitchmcc@yahoo.com> wrote:
> Hello,


> I am a fairly new to MySQL, but am trying to create a simple test
> program that uses Pthreads with MySQL (this is on Solaris 10).


> I started building my test app using the linker line


> LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -lmysqlclient
> -lsocket -lnsl -lrt -lpthread


> but changed over to


> LIBS = -I/opt/mysql/mysql/include -L/opt/mysql/mysql/lib -
> lmysqlclient_r -lsocket -lnsl -lrt -lpthread


> to try and make my application "thread safe".


> When I run, I am getting an error on the console:


> ld.so.1: mysql_thread_example: fatal: libmysqlclient_r.so.16: open
> failed: No such file or directory
> Killed


That normally means the program can't find libmysqlclient_r.so.16.

If you do ldd -v on the executable you will most likely get a not
found error on it.

Add -R/opt/mysql/mysql/lib to the LIBS line so the executable knows
how to find it.


--
Jim Pennino

Remove .spam.sux to reply.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0