store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Tue May 21, 2013 9:06 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 3 posts ] 
Author Message
 Post subject: ld can't find mysqlclient
Unread postPosted: Sat Sep 19, 2009 11:04 am 
Offline
Forum User
Forum User

Joined: Mon Sep 15, 2008 12:45 pm
Posts: 17
Hi All,

I wrote a daemon in c. The last time I successfully compiled it was in June of 09.

Now I want to make a change, but the program will not compile. I get the following error:

gcc -O3 -ftree-vectorize -W -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wundef -o mydaemon `mysql_config --cflags` mydaemon.c sha1.c `mysql_config --libs` `curl-config --libs`
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [mydaemon] Error 1

I use yum to keep updated and subscribe to Atomic Rocket Turtle for the latest updates. Somehow, one of these updates is causing this issue. I have tried re-installing mysql and mysql-devel, checking /etc/ld.conf and running ldconfig. I have tried various path changes, but no luck.

Here is some info about my system:
uname -a
Linux s15249052.onlinehome-server.com 2.6.9-023stab048.6-smp #1 SMP Mon Nov 17 18:41:14 MSK 2008 x86_64 x86_64 x86_64 GNU/Linux

yum list mysql*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www3.atomicorp.com
atomic | 951 B 00:00
base | 1.1 kB 00:00
updates | 951 B 00:00
asl-2.0 | 951 B 00:00
addons | 951 B 00:00
extras | 1.1 kB 00:00
Installed Packages
mysql.i386 5.0.84-1.el5.art installed
mysql.x86_64 5.0.84-1.el5.art installed
mysql-devel.i386 5.0.84-1.el5.art installed
mysql-libs.i386 5.0.84-1.el5.art installed
mysql-libs.x86_64 5.0.84-1.el5.art installed
mysql-server.i386 5.0.84-1.el5.art installed
mysql-server.x86_64 5.0.84-1.el5.art installed
Available Packages
MySQL-python.x86_64 1.2.1-1 base
mysql-bench.i386 5.0.84-1.el5.art atomic
mysql-bench.x86_64 5.0.84-1.el5.art atomic
mysql-cluster.i386 5.0.84-1.el5.art atomic
mysql-cluster.x86_64 5.0.84-1.el5.art atomic
mysql-connector-odbc.x86_64 3.51.12-2.2 base
mysql-devel.x86_64 5.0.84-1.el5.art atomic
mysql-test.i386 5.0.84-1.el5.art atomic
mysql-test.x86_64 5.0.84-1.el5.art atomic
mysqltuner.noarch 1.0.0-1.el5.art atomic

Here is what mysql_config comes up with:
mysql_config --libs
-rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto

I have searched the web for 2 days now and have not been able to solve this problem yet. It is very important to me to be able to update my daemon, since it is broken in it's current form. It is part of my new website, and I really need it to work.

Any suggestions would be HIGHLY appreciated and I will try to return the favor.

best regards,
Bill Clark


Top
 Profile  
 
 Post subject: Re: ld can't find mysqlclient
Unread postPosted: Sat Sep 19, 2009 11:57 am 
Offline
Forum User
Forum User

Joined: Mon Sep 15, 2008 12:45 pm
Posts: 17
I notice one thing. I am trying to install the 32 bit msyql-devel, but there is a conflict with the 64 bit version. I thought that maybe this will allow my program to complile. Any ideas?

Parsing package install arguments
Package mysql-5.0.84-1.el5.art.x86_64 already installed and latest version
Package mysql-5.0.84-1.el5.art.i386 already installed and latest version
Package mysql-server-5.0.84-1.el5.art.x86_64 already installed and latest version
Package mysql-server-5.0.84-1.el5.art.i386 already installed and latest version
Package mysql-libs-5.0.84-1.el5.art.x86_64 already installed and latest version
Package mysql-libs-5.0.84-1.el5.art.i386 already installed and latest version
Package mysql-devel-5.0.84-1.el5.art.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.0.84-1.el5.art set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
Installing:
mysql-devel x86_64 5.0.84-1.el5.art atomic 3.0 M

Transaction Summary
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test

Transaction Check Error:
file /usr/include/mysql/ndb/ndb_types.h from install of mysql-devel-5.0.84-1.el5.art.x86_64 conflicts with file from package mysql-devel-5.0.84-1.el5.art.i386

Error Summary


Top
 Profile  
 
 Post subject: Re: ld can't find mysqlclient SOLVED
Unread postPosted: Sun Sep 20, 2009 1:54 pm 
Offline
Forum User
Forum User

Joined: Mon Sep 15, 2008 12:45 pm
Posts: 17
Hi All,

I had to remove mysql-devel.i386 and then install mysql-devel.x86_64.

And now I can compile my c daemon. NICE!

Thanks to markkuk at the centos forums.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 3 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group