Discussion:
.so symlinks not being created
(too old to reply)
Warren Young
2011-07-13 19:21:17 UTC
Permalink
Raw Message
I tried to build my Bakefile-based project on CentOS 6 for the first
time today.

The project goes through the bootstrap and build processes just fine,
right through the link step for the main target, a library. (<dll> tag
in the .bkl file.) After that it goes on to build some test and sample
programs that exercise the library, but the first one of these fails to
build because the libmyproject.so file doesn't exist. The
libmyproject.so.x.y.z file created by the link step exists, but the .x.y
and .x symlinks don't exist.

This causes the subsequent library test programs to fail, because their
build lines have -lmyproject, and libmyproject.so doesn't exist.

Here's the last few build lines:

g++ -shared -fPIC -o libmysqlpp.so.3.1.0 [LOTS OF .o FILES]
-Wl,-soname,libmysqlpp.so.3 -lmysqlclient -L/usr/lib64
/usr/bin/ld: cannot find -lmysqlclient

To the best of my knowledge, the only difference between these two build
systems is the OS.

I poked into the generated Makefile.in and Makefile, and see something
about a USE_SOTWOSYMLINKS conditional variable. I assume what's going
on is that conditional isn't getting set to 1, but I don't see how to do
that. -DUSE_SOTWOSYMLINKS=1 on the bakefile command line doesn't do it.
I never had to explicitly set it before.

Could it be an incompatibility with newer versions of the various tools?
Differences I've found:

Autoconf 2.59 -> 2.63
Automake 1.9.6 -> 1.11.1
Python 2.4.3 -> 2.6.5
SWIG 1.3.29 -> 1.3.40
GCC 4.1.2 -> 4.4.4
Warren Young
2011-07-13 20:44:43 UTC
Permalink
Raw Message
Post by Warren Young
g++ -shared -fPIC -o libmysqlpp.so.3.1.0 [LOTS OF .o FILES]
-Wl,-soname,libmysqlpp.so.3 -lmysqlclient -L/usr/lib64
/usr/bin/ld: cannot find -lmysqlclient
Sorry, irrelevant error. The one I should have included is:

g++ -shared -fPIC -o libmysqlpp.so.2.3.2 [LOTS OF .o FILES]
-Wl,-soname,libmysqlpp.so.2 -L/usr/local/lib -L/usr/lib64/mysql
-lmysqlclient -lz -lz
[snipped irrelevancies]
g++ -o resetdb resetdb_resetdb.o -L. -L/usr/local/lib -L/usr/lib64/mysql
-lmysqlpp_util -lmysqlclient -lmysqlpp -lz -lz
/usr/bin/ld: cannot find -lmysqlpp

This just reiterates my report that the ln commands that create
libmysqlpp.so.2 and libmysqlpp.so.2.3 don't occur before it goes to try
and build resetdb with -lmysqlpp.
Warren Young
2011-07-13 21:21:46 UTC
Permalink
Raw Message
Post by Warren Young
I tried to build my Bakefile-based project on CentOS 6 for the first
time today.
False alarm. It turned out to be a problem with autoconf. It was
silently barfing on a deprecated macro in my configure.ac file, so I was
using a configure script generated on an older machine. Fixing the
macro and regenerating the configure script fixed the symptom.

Sorry for the noise.

Loading...