Can't build with libtool link error

182 views
Skip to first unread message

L.INA

unread,
Aug 26, 2008, 8:09:05 AM8/26/08
to Q4M - a Message Queue for MySQL
Hi,

I've tried Q4M and got an impression that this is a very useful tool.
First I built Q4M and made a test on my local PC (it worked), and then
tried to do the same thing on a server of my project. But I've got an
error while building Q4M.

It says:

/bin/sh ../libtool --preserve-dup-deps --mode=link g++ -g -O2 -Wall
-fpic -o
libqueue_engine.la -rpath /usr/local/mysql/lib/mysql/plugin -module
libqueue_engine_la-ha_queue.lo queue_cond.o
libtool: link: cannot build libtool library `libqueue_engine.la'
from non-libtool objects on this host: queue_cond.o

Is there any solution for this?

The environment of the server is as follows:
- system
Linux 6.18-53.el5 #1 SMP Mon Nov 12 02:14:55 EST 2007 x86_64 GNU/
Linux
- distribution
CentOS release 5 (Final)
- MySQL version
5.1.26-rc
- MySQL configuration
--prefix=/usr/local/mysql \
--with-mysqld-user=mysql \
--with-charset=utf8 \
--with-extra-charsets=all \
--with-tcp-port=3308
-Q4M version
0.8
-Q4M configuration
--with-mysql=/path/to/mysql-5.1.26-rc --prefix=/usr/local/mysql

--
L.INA

Kazuho Oku

unread,
Aug 26, 2008, 8:27:13 AM8/26/08
to q4m-g...@googlegroups.com
Hi,

Using the -fpic option might help. I have usually build Q4M on CentOS
5 (x86_64) with the following options.

./configure --prefix=... --with-mysql=... CFLAGS='-O2 -g -Wall -fpic'
CXXFLAGS='-O2 -g -Wall -fpic'

2008/8/26 L.INA <tara...@gmail.com>:

--
Kazuho Oku

L.INA

unread,
Aug 27, 2008, 3:20:15 AM8/27/08
to Q4M - a Message Queue for MySQL
Thank you for your immediate response.

I've tried those options but the problem is still there with the same
error message.

The message "cannot build libtool library `libqueue_engine.la' from
non-libtool objects" is generated by libtool, when
$deplibs_check_method is not equal to 'pass_all'. Modifying libool to
skip that check causes "multiple definition" link errors.

According to the libtool documentation (
http://www.gnu.org/software/libtool/manual/html_node/Linking-libraries.html#Linking-libraries
), it seems that 'libtool --mode=link' should be used with arguments
of "special ‘.lo’ object files". But in the output of 'make' I wrote
in the previous post, '../libtool --mode=link' have an argument of a
standard object 'queue_cond.o'. Isn't it causing a trouble? Do you
have any idea to avoid this?

--
L.INA

Kazuho Oku

unread,
Aug 27, 2008, 11:21:51 PM8/27/08
to q4m-g...@googlegroups.com
Hi,

Thank you for the details. Would you please try the patch attached?
I hope it fixes the problem.

Q4M consists of two source files that require different compile
options. However, it is impossible with automake to set different
compile option per compile unit. So we are first compiling one source
file as a static library and then trying to link it against the core
code of Q4M.
And that is the cause of the problem. I thought it would only
generate a warning, but your libtool seems to be giving error for the
usage.

So I have tweaked src/Makefile.am a little, and on my servers, the
warning has gone away, and the test suite runs fine, but I am not sure
whether it would build fine on other environments. Would you mind
testing a patch?

2008/8/27 L.INA <tara...@gmail.com>:

--
Kazuho Oku

q4m-libtool-error.patch
Reply all
Reply to author
Forward
0 new messages