[arch-general] Issues when updating mysql-connector-c++

Marcel Korpel marcel.lists at gmail.com
Wed Sep 17 23:49:02 EDT 2014


Since mysql-connector-c++ 1.1.4 has been available for a few months I
am trying to create a PKGBUILD for this version. The first problem I
encountered was the MYSQL_LIB variable set to NOTFOUND by default. I
circumvented this issue by hardcoding
-DMYSQL_LIB=/usr/lib/libmysqlclient.so in my PKGBUILD [1]. However, I
don't think this is the right solution. Does anyone know how to obtain
the location of this library and pass it to cmake correctly?

After this workaround make begins to build the library, but errors
when linking an object file:

[ 47%] Building CXX object
Linking CXX executable driver_test
../driver/libmysqlcppconn.so. undefined reference to `mysql_options4'
collect2: error: ld returned 1 exit status

When viewing the symbols in libmysqlcppconn.so. (using readelf)
I noticed that mysql_options4 is indeed available, but with an
undefined index. So I searched for this error and found some info
about undefined symbols, but not about this particular case or
anything that could be related. Does anyone know how to solve this

I thought that it might be because I have libmariadbclient 10.0.13-1
installed and tried to build the connector against Oracle's
libmysqlclient from AUR. This time, I got a different error:

error: ‘dynamic_cast’ not permitted with -fno-rtti
    connection(dynamic_cast< MySQL_Connection * >(service->getConnection())),

So somehow I should remove this flag from the compiler command line make uses.

However, as mariadb is now default in Arch, I think we should try to
build mysql-connector-c++ against that.


[1] http://pastebin.com/jUcJabBx

More information about the arch-general mailing list