[arch-general] Issues when updating mysql-connector-c++
Hi, 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 test/framework/CMakeFiles/test_framework.dir/start_options.cpp.o Linking CXX executable driver_test ../driver/libmysqlcppconn.so.7.1.1.4: undefined reference to `mysql_options4' collect2: error: ld returned 1 exit status When viewing the symbols in libmysqlcppconn.so.7.1.1.4 (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 issue? 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: /…/src/mysql-connector-c++-1.1.4/driver/mysql_metadata.cpp:1216:74: 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. Regards, Marcel [1] http://pastebin.com/jUcJabBx
On 18 September 2014 05:49, Marcel Korpel <marcel.lists@gmail.com> wrote:
Hi,
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?
/usr/bin/mysql_config --libs you might also need /usr/bin/mysql_config --include -- damjan
Marcel Korpel <marcel.lists@gmail.com> on Thu, 2014/09/18 05:49:
[ 47%] Building CXX object test/framework/CMakeFiles/test_framework.dir/start_options.cpp.o Linking CXX executable driver_test ../driver/libmysqlcppconn.so.7.1.1.4: undefined reference to `mysql_options4' collect2: error: ld returned 1 exit status
This has been introduced in MySQL 5.6.6 and is not available in MariaDB. Looks like this does not do anything essential (it is skipped by macros if compiled with libmysqlclient < 5.6.6), so I disable it for mysql-workbench. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
Christian Hesse <list@eworm.de> on Thu, 2014/09/18 10:01:
Marcel Korpel <marcel.lists@gmail.com> on Thu, 2014/09/18 05:49:
[ 47%] Building CXX object test/framework/CMakeFiles/test_framework.dir/start_options.cpp.o Linking CXX executable driver_test ../driver/libmysqlcppconn.so.7.1.1.4: undefined reference to `mysql_options4' collect2: error: ld returned 1 exit status
This has been introduced in MySQL 5.6.6 and is not available in MariaDB.
Looks like this does not do anything essential (it is skipped by macros if compiled with libmysqlclient < 5.6.6), so I disable it for mysql-workbench.
BTW, this should be fixed in MariaDB 10.0.14 [0]. Perhaps we should backport the fix and apply to our mariadb (libmariadbclient) package. [0] https://mariadb.atlassian.net/browse/MDEV-6638 -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
participants (3)
-
Christian Hesse
-
Damjan Georgievski
-
Marcel Korpel