[ts-gen] /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient

R P Herrold herrold at owlriver.com
Mon Dec 24 11:34:25 EST 2007


Ron's post was held by the anti-spam part of the mailing 
list's configuration, as he was not subscribed; I just noticed 
and released it.

On Wed, 19 Dec 2007, Ron Hinchley wrote:

> Hi, anyone encounter this error? The mysql is running OK.
>
> [ibtrader at murphy shim-071214]$ make shim
    ...
> g++ -Wall -g -I/usr/include/mysql  -c -o leaf.o src/leaf.c
> g++ -Wall -g -I/usr/include/mysql  -c -o atom.o src/atom.c
> src/atom.c: In constructor
> âTradingShimDaemon1_0::TuplesAttributes::Event::Event(const
> MinimalModeMultiParadigm::SimpleEfficientAllocator::Pool&, const
> TradingShimDaemon1_0::NestedStructures::Arguments&, const
> TradingShimDaemon1_0::ObjectTypeSystem::Compound&)â:
> src/atom.c:71: warning: format â%dâ expects type âintâ, but argument 3
> has type âMinimalModeMultiParadigm::natâ
> src/atom.c:71: warning: format â%dâ expects type âintâ, but argument 4
> has type âMinimalModeMultiParadigm::natâ
> src/atom.c:71: warning: format â%dâ expects type âintâ, but argument 5
> has type âMinimalModeMultiParadigm::natâ
    .... [these warnings are harmless, and gone in the current
    version; there is one remaining one relates to 32 v 64 bit
    headers, but again it is harmless]
> g++ -Wall -g -I/usr/include/mysql  -c -o term.o src/term.c
    ...
> g++ -Wall -g -I/usr/include/mysql  -c -o unit.o src/unit.c
> date;   g++ -g -o shim once.o bind.o mode.o data.o type.o tabs.o rule.o
> dfsa.o syms.o help.o talk.o init.o link.o load.o bulk.o shim.o wait.o
> time.o read.o flow.o exec.o feed.o send.o post.o echo.o calc.o name.o
> leaf.o atom.o term.o tilt.o pool.o hash.o text.o wrap.o inet.o fork.o
> boot.o else.o unit.o -L/usr/lib/mysql -lmysqlclient -lm
> Wed Dec 19 20:40:45 PST 2007
> /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when
> searching for -lmysqlclient

This 'skipping incompatible /usr/lib/mysql/libmysqlclient.so' 
message is usually a symptom that you are on a 64 bit (x86_64) 
rather than 32 bit platform (i386).  The MySQL header it seeks 
on a Red Hat derived 64 bit box is down:

 	-L/usr/lib64/mysql   rather than the value in the 
Makefile, of -L/usr/lib/mysql

> collect2: ld returned 1 exit status
> make: *** [shim] Error 1
> [ibtrader at murphy shim-071214]$

Probably the easiest way to patch this is thus:

sed -i -e 's at -L/usr/lib/mysql at -L/usr/lib64/mysql  -L/usr/lib/mysql at g' \
 	Makefile

which will have the effect of adding the 64 bit path to the 32 
bit one, but in a location which is found 'first' by the 
linker.

I had a hard drive die on my long time workstation (but with 
advance notice from the SMART utilities), and took that as a 
sign that I needed a new workstation;  I chose to install 
CentOS 5 in the x86_64 version, to get us coverage there in 
daily development.

There is a fresh candidate externally, on th site, but I have 
not yet run it through the testing suite, as Bill pushed it 
after I had left for the day, and we closed the office today.

-- Russ Herrold


More information about the ts-general mailing list