[CONC-475] undefined reference to mariadb_rpl_init_ex when linking with libmariadb.so Created: 2020-06-11  Updated: 2021-06-14  Resolved: 2021-03-15

Status: Closed
Project: MariaDB Connector/C
Component/s: Replication/Binlog API
Affects Version/s: 3.1.12
Fix Version/s: 3.2.0, 3.1.13

Type: Bug Priority: Trivial
Reporter: Andrei Lurie Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux (Centos 7)



 Description   

When building a program that uses mariadb-connector-c function mariadb_rpl_init() I'm getting a link error: "undefined reference to mariadb_rpl_init_ex ".
In the source, mariadb_rpl_init is defined as mariadb_rpl_init_ex.
Looking inside libmariadb.so: 000000000003ebef t mariadb_rpl_init_ex
which shows the symbol is internal.
Same error occurs whether I build mariadb-connector-c from source or download the pre-built one form the distribution site.
As a workaround, I've modified the CMakeLists.txt and added mariadb_rpl_init_ex to the list of symbols. Then rebuilt mariadb-connector-c.
Unless I'm missing some option when building, it sounds like mariadb_rpl_init_ex should be externalized in the libmariadb.so?



 Comments   
Comment by Ruslan Altynbaev [ 2021-03-14 ]

Same here on Win32, "unresolved external symbol mariadb_rpl_init_ex" in libmariadb.dll.

Almost looks intentional so that we can't play with the mariadb_rpl API

Comment by Georg Richter [ 2021-03-15 ]

Fixed in rev. c23ecca2a80cf09f4f3872eda3692ffa0c6f74b3

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