[ODBC-268] Does not build on any platform other than i386/amd64 Created: 2019-10-15 Updated: 2022-01-30 |
|
| Status: | Open |
| Project: | MariaDB Connector/ODBC |
| Component/s: | General |
| Affects Version/s: | 3.1.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Bernhard Schmidt | Assignee: | Lawrin Novitsky |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian Linux |
||
| Description |
|
I recently packaged MariaDB Connector/ODBC for Debian, see https://tracker.debian.org/pkg/mariadb-connector-odbc . After uploading it turned out that it fails to build on any platform that is not amd64 (x86_64) or i386. https://buildd.debian.org/status/package.php?p=mariadb-connector-odbc It fails to build on any other platform with
There is a lot of debug output from CMake after that, but I think those all come from the libm tests that passed before. Looking at cmake/FindDM.cmake I think it can work on any other platform right now, because it i.e. hardcodes the library path to x86_64-linux-gnu on all 64bit platforms. |
| Comments |
| Comment by Lawrin Novitsky [ 2019-10-15 ] | ||||||||||||||||||||||||||
|
Well, no, it does not. As I read it, libraries are looked (for 64bit build) in /usr/local /usr /usr/local/Cellar/libiodbc/3.52.12 /usr/lib/x86_64-linux-gnu What's wrong/missing there? And btw I don't think we support all those architectures in your build results table. | ||||||||||||||||||||||||||
| Comment by Jose Riha [ 2020-01-13 ] | ||||||||||||||||||||||||||
|
thank you for the hint. this helped me to get the connector compiled on debian on arm: DM_DIR=/usr/lib/arm-linux-gnueabihf cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_C_FLAGS_RELWITHDEBINFO="-I/usr/local/include/mariadb -I/usr/include/mariadb -L/usr/local/lib" | ||||||||||||||||||||||||||
| Comment by mocart [ 2020-10-05 ] | ||||||||||||||||||||||||||
|
Hi! Can you help me please, with building mariadb-connector-odbc on armbian for orange pi, a have some problems:
I try repeat like says Jose Riha:
then i have that message:
| ||||||||||||||||||||||||||
| Comment by Lawrin Novitsky [ 2020-10-07 ] | ||||||||||||||||||||||||||
|
First, it's not really officially supported. But looks like it shouldn't be a problem to build. "Driver Manager was not found" means that either libraries or headers are not found. You can hint cmake where to look for them using DM_LIB_DIR and DM_INCLUDE_DIR cmake/env variables. You can also set ODBC_LIB_DIR and ODBC_INCLUDE_DIR variables directly(via cmake command line parameters). In this case cmake take these values won't even look for odbc_config, libraries and headers. But if required files are not there, then you get the error later during the build. | ||||||||||||||||||||||||||
| Comment by Bernhard Schmidt [ 2022-01-28 ] | ||||||||||||||||||||||||||
|
I had another look at this lately, sorry for the delay. 3.1.15 builds fine on 32 bit architectures (see https://buildd.debian.org/status/package.php?p=mariadb-connector-odbc). I think this is due to the addition of /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} to the library search path on 32 bit architectures in However, this is not done for 64 bit architectures, so it still fails. We have a patch pending in the Debian BTS that replaces the whole code with pkg-config. It appears to work fine and is substantially cleaner, but needs pkg-config. If this is acceptable, I have opened a merge request with this code, see https://github.com/mariadb-corporation/mariadb-connector-odbc/pull/54 . Note that I am not the author of the patch! | ||||||||||||||||||||||||||
| Comment by Lawrin Novitsky [ 2022-01-30 ] | ||||||||||||||||||||||||||
|
I've pushed in the last commit also change for ${CMAKE_LIBRARY_ARCHITECTURE} is added to searched suffixes on all architectures. That may probably help. |