[ODBC-112] Undefined symbol: max_allowed_packet when using dynamic linking Created: 2017-09-05  Updated: 2017-09-06  Resolved: 2017-09-06

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: 3.0.1
Fix Version/s: 3.0.2

Type: Bug Priority: Blocker
Reporter: Augusto Caringi Assignee: Lawrin Novitsky
Resolution: Done Votes: 1
Labels: None
Environment:

Linux/Fedora x86_64
MariaDB Connector C version: 3.0.2
MariaDB Connector ODBC version: 3.0.1



 Description   

Hello,

We are working to pack c/odbc 3.0 in Fedora (https://bugzilla.redhat.com/show_bug.cgi?id=1381548)...

As "c/c 3.0 can be dynamically linked against c/odbc 3.0" (ODBC-98), I decided to give it a try and found this undefined symbol error (using isql command line tool - it's a runtime problem, the build is successful):

/usr/lib64/libmaodbc.so: error: symbol lookup error: undefined symbol: max_allowed_packet (fatal)

Can you look into that please? Thanks!



 Comments   
Comment by Lawrin Novitsky [ 2017-09-05 ]

This is strange. I remember I removed reference to max_allowed_packet from c/odbc, and I cannot find string "max_allowed_packet" throughout the source besides one commented out line.
And I ran tests against connector with dynamically linked c/c without any problem.
Could you please double-check if you have latest revision etc? Leaving the bug open so far, but I am pretty much sure it should be fine.

Comment by Augusto Caringi [ 2017-09-06 ]

The tgz file that I downloaded from here: https://downloads.mariadb.org/connector-odbc/3.0.1/ has a reference to max_allowed_packet at line 1332...

$ grep -rni max_allowed
ma_connection.c:682: /*_snprintf(StmtStr, 128, "SET GLOBAL max_allowed_packet=%ld", Connection-> PacketSize);
ma_connection.c:1332: MADB_SET_NUM_VAL(SQLUINTEGER, InfoValuePtr, max_allowed_packet, StringLengthPtr);

And I can see that this symbols is undefined in the shared library:

$ objdump -T /usr/lib64/libmaodbc.so|grep max
0000000000000000 D UND 0000000000000000 max_allowed_packet

Comment by Michal Schorm [ 2017-09-06 ]

Hi Lawrin,
I saw you (meant as MDB developers) closing several issues about dynamic linking between CONC/ODBC & CONC/C, and simmilar issues.
Maybe, they're solved, but not released yet.

In that case, If you can provide us links to latest CONC/C and CONC/ODBC on GitHub that should have this solved, we can re-build our packages and try it again with them.

Comment by Lawrin Novitsky [ 2017-09-06 ]

Closed bugs have "Fixed version", and it's 3.0.2. That version is not released yet

C/ODBC and C/C branches:
https://github.com/MariaDB/mariadb-connector-odbc/tree/odbc-3.0
https://github.com/MariaDB/mariadb-connector-c/tree/connector_c_3.0

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