Comment 0 for bug 1713945

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

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 $