function my_load_defaults() missing in libmariadbclient

Bug #1713945 reported by Luc Castermans
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

pi@raspberrypi:~/dsm2sql $ cat /etc/debian_version
9.1

package libmariadbclient-dev provides the library libmariadbclient.so

This library should contain a function my_load_defaults() however it appears to be missing.
Below I demonstrate this by showing linker output with and without this library:

pi@raspberrypi:~/dsm2sql $ gcc db.o rs232.o dm.o -lmariadbclient -o dsm2sql
db.o: In function `init':
db.c:(.text+0x4f4): undefined reference to `my_load_defaults'
collect2: error: ld returned 1 exit status

pi@raspberrypi:~/dsm2sql $ gcc db.o rs232.o dm.o -o dsm2sql
db.o: In function `print_error':
db.c:(.text+0xe4): undefined reference to `mysql_errno'
db.c:(.text+0xf0): undefined reference to `mysql_error'
db.o: In function `do_connect':
db.c:(.text+0x14c): undefined reference to `mysql_init'
db.c:(.text+0x1a4): undefined reference to `mysql_real_connect'
db.o: In function `do_disconnect':
db.c:(.text+0x1f4): undefined reference to `mysql_close'
db.o: In function `process_result_set':
db.c:(.text+0x2a0): undefined reference to `mysql_num_fields'
db.c:(.text+0x2c8): undefined reference to `mysql_fetch_row'
db.c:(.text+0x2e0): undefined reference to `mysql_errno'
db.c:(.text+0x30c): undefined reference to `mysql_num_rows'
db.o: In function `process_query':
db.c:(.text+0x374): undefined reference to `mysql_query'
db.c:(.text+0x3b4): undefined reference to `mysql_store_result'
db.c:(.text+0x3cc): undefined reference to `mysql_field_count'
db.c:(.text+0x3f8): undefined reference to `mysql_affected_rows'
db.c:(.text+0x438): undefined reference to `mysql_free_result'
db.o: In function `init':
db.c:(.text+0x4d4): undefined reference to `my_init'
db.c:(.text+0x4f4): undefined reference to `my_load_defaults'
db.c:(.text+0x75c): undefined reference to `get_tty_password'
db.o: In function `main':
db.c:(.text+0x8ec): undefined reference to `mysql_server_init'
db.c:(.text+0xa38): undefined reference to `mysql_server_end'
collect2: error: ld returned 1 exit status
pi@raspberrypi:~/dsm2sql $

description: updated
description: updated
Revision history for this message
Luc Castermans (luc-castermans-q) wrote :

Note: before I compiled the same program for MySQL. I used package libmysqlclient-dev. In this case the function is available in this library.

affects: raspbian → mariadb-10.1 (Ubuntu)
affects: mariadb-10.1 (Ubuntu) → raspbian
Revision history for this message
peter green (plugwash) wrote :

Frankly I don't have a clue about this, i'm not even sure whether it is a bug or a user error.

Revision history for this message
Robie Basak (racb) wrote :

I suspect this is due to some distinction between libmysqlclient18, libmysqlclient20, and MariaDB's "drop-in" replacement of libmysqlclient18 (which in Debian we call libmariadbclient18 to disambiguate).

I don't believe MariaDB ever went beyond attempted compatibility against MySQL 5.6 (ie. libmysqlclient18's API). When you try against libmysqlclient-dev, you're probably building against MySQL 5.7 which is a different API revision.

I don't know if this is a bug or not either. It depends on whether upstream MariaDB expects to be shipping a my_load_defaults function in their API that they forked from libmysqlclient18 but didn't rename upstream.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.