[Releasing] Failed to build mysql plugin

Thiago Macieira thiago.macieira at intel.com
Thu Aug 23 11:18:18 CEST 2012


On quinta-feira, 23 de agosto de 2012 10.57.25, Simon Hausmann wrote:
> I'd rather say that the actual bug is in mysql_config. It seems wrong to me
> for  any *config tool to spit out a library search path that is part of the
> toolchain default.

True. In fact, mysql_config is *not* meant to be used when linking to MySQL, as 
it outputs way too many libraries. In my case:

$ mysql_config --libs
-L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl

The plugin does definitely not need to link to any of those trailing libraries. 
Only when statically linking to libmysqlclient.a would they be necessary.

Another fault is that there's no way to get the 32-bit path from mysql_config. 
So when building 32-bit on a 64-bit Fedora, I need to pass an extra -L option 
to configure.

> One workaround we could do is to make sure that any paths we get from any *-
> config tools end up behind everything else.

That would be hard due to the way qmake works. The QT += processing is done 
after the .pro, so the Qt libraries are always appended to the build. That's 
why they show up after the MySQL libraries.

No, the proper solution is to use full paths to libraries instead of -L and -
l, like cmake does.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/releasing/attachments/20120823/ab71f536/attachment.sig>


More information about the Releasing mailing list