Bug #86029 | MySQL ODBC connector not working on tegra-ubuntu, aarch64 architecture | ||
---|---|---|---|
Submitted: | 20 Apr 2017 21:05 | Modified: | 24 Apr 2017 14:07 |
Reporter: | Doug Turner | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / ODBC | Severity: | S1 (Critical) |
Version: | 5.3.7 | OS: | Ubuntu (tegra-ubuntu, aarch64) |
Assigned to: | CPU Architecture: | Any |
[20 Apr 2017 21:05]
Doug Turner
[24 Apr 2017 12:07]
Bogdan Degtyariov
Hi Doug, Usually the errors like this "Can't open lib '/home/dturner/mysql/lib/libmyodbc5w.so' : file not found" indicate a missing dependent library or one of these libraries could not be loaded. There could be a mismatch between the UnixODBC version and Connector/ODBC driver. Which version of UnixODBC are you using? Can you send us the output from ldd? Another thing to check would be to use a dltest tool from UnixODBC on each library listed by ldd. For instance check the UnixODBC shared lib as follows: dltest /usr/lib/aarch64-linux-gnu/libodbc.so.2.0.0 What it does is try loading a library using dlopen() and show success or error. Thanks.
[24 Apr 2017 13:47]
Doug Turner
unixodbc (and unixodbc-dev) version is 2.3.1-4.1. Here is the result of ldd on isql: ldd /usr/bin/isql linux-vdso.so.1 => (0x0000007fae3c4000) libodbc.so.2 => /usr/lib/aarch64-linux-gnu/libodbc.so.2 (0x0000007fae333000) libreadline.so.6 => /lib/aarch64-linux-gnu/libreadline.so.6 (0x0000007fae2e1000) libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fae2b4000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fae16d000) /lib/ld-linux-aarch64.so.1 (0x0000005575e36000) libltdl.so.7 => /usr/lib/aarch64-linux-gnu/libltdl.so.7 (0x0000007fae154000) libtinfo.so.5 => /lib/aarch64-linux-gnu/libtinfo.so.5 (0x0000007fae11d000) libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fae10a000) Here is the result of ldd on libodbc: ldd /usr/lib/aarch64-linux-gnu/libodbc.so.2.0.0 linux-vdso.so.1 => (0x0000007fa6804000) libltdl.so.7 => /usr/lib/aarch64-linux-gnu/libltdl.so.7 (0x0000007fa675a000) libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fa672e000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fa65e6000) /lib/ld-linux-aarch64.so.1 (0x000000558c794000) libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fa65d3000) Here is the result of dltest: ~/mysql-connector-odbc-5.3.7-src/bin/dltest /usr/lib/aarch64-linux-gnu/libodbc.so.2.0.0 [/home/dturner/mysql-connector-odbc-5.3.7-src/dltest/dltest.c][170] SUCCESS: Loaded /usr/lib/aarch64-linux-gnu/libodbc.so.2.0.0 So, I don't see any obvious problems with loading libraries. Have you ever successfully used the connector on tegra-ubuntu before? Also, are you able to reproduce the problems with the build that I am seeing?
[24 Apr 2017 14:07]
Doug Turner
I resolved the problem I was having. I ran dltest on the myodbc library, and got the following error: ~/mysql-connector-odbc-5.3.7-src/bin/dltest ~/mysql/lib/libmyodbc5w.so [/home/dturner/mysql-connector-odbc-5.3.7-src/dltest/dltest.c][165] ERROR dlopen(): /home/dturner/mysql/lib/libmyodbc5w.so: undefined symbol: my_charset_latin1 When I looked this up online, I found the following bug: https://bugs.mysql.com/bug.php?id=82202 It turns out that the connector cannot be built against the dynamic libmysqlclient library, or there will be missing symbols (this might only be true with GCC 5). However, the default for the connector build is to use the dynamic library instead of the static one, for some reason. So, I changed the cmake call for the mysql-connector to the following: cmake -G "Unix Makefiles" -DWITH_UNIXODBC=1 -DMYSQLCLIENT_STATIC_LINKING=ON Now, the build completes and isql works with the library. I would recommend making this cmake flag the default for the build (or at least for GCC 5 and later) so other people do not have this problem.