[ODBC-124] odbc does not build on centos 7 out of the box Created: 2017-11-28  Updated: 2018-06-04  Resolved: 2018-06-04

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 3.0.2
Fix Version/s: 2.0.17, 3.0.5

Type: Task Priority: Major
Reporter: David Thompson (Inactive) Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by ODBC-136 Make Connector/C a git sub-project Closed

 Description   

After install MariaDB 10.2 (after installing the custom repo), the following satisfy the cmake dependencies:
yum install MariaDB-client MariaDB-server MariaDB-devel unixODBC

However link failures happen if you run cmake then make. For this to build the following is needed:

  • cmake -DWITH_OPENSSL=on
  • modify tests/CMakeLists.txt to add z as a lib dep: SET(PLATFORM_DEPENDENCIES ${PLATFORM_DEPENDENCIES} "pthread" "dl" "z")

I'd suggest make WITH_OPENSSL=on the default setting since this is what we build with and fix the test cmake file.



 Comments   
Comment by Lawrin Novitsky [ 2017-11-28 ]

I guess that(z dependency) is because those packages install client library from server. I usually... well, always build using Connector/C, and it does not require -lz
mariadb_config --libs
-L/usr/local/lib/mariadb/ -lmariadb -lpthread -ldl -lm -liconv -liconv

Comment by David Thompson (Inactive) [ 2017-11-28 ]

ah that makes sense. I didn't think about installing connector/c directly and assumed it was easier to use an os package.

Comment by Lawrin Novitsky [ 2018-06-04 ]

Both 2.0 and 3.0 connectors are now build with C/C as a git sub-module, and this should solve the issue

Generated at Thu Feb 08 03:26:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.