There are other functions too, but the case that gets hit first is in driver/dll.c on line 78. myodbc used to call my_strdup (and a few others direct). Later some versions of MySQL and/or MariaDB seemingly added an argument to that which allows for other stuff to be manipulated, specifically the signature for my_strdup changed from: extern char *my_strdup(const char *from,myf MyFlags); /* dev-db/mariadb-10.1.31- r1:0/18 */ To: char * my_strdup(PSI_memory_key key, const char *from, myf_t flags); /* dev-db/mariadb-10.3.8 */ I'm not sure WHEN exactly this changed (version). There is now a service struct in the wat to enable swapping out the malloc related implementation, and a #define to if my_strdup gets called, call that instead, so it's nasty. What makes this tricky though is that myodbc has introduced a MYODBC_MYSQL.h file which now adapts a set of myodbc_* functions to this new set of functions of the form: #define myodbc_strdup(A,B) my_strdup(PSI_NOT_INSTRUMENTED,A,B) Now, when compiled against the *older* signature, this causes problems. In more details, it seems that myodbc includes it's own set of mysql/ headers, in such a way that when it compiles it hides the signature difference between the installed libraries (which will load at runtime) and the declarations. Resulting in an ABI mismatch, resulting in segmentation faults time (the from argument, intended as intrumentation arguments gets received as from, since that's NULL, doing things like strlen() on it has undesired effects). I have no idea when that change happened. I have no idea whether this applies to both mysql and mariadb, or only mariadb. Ideally I would expect a compile failure if things like this goes wrong.
MariaDB 10.3.8 does not install headers or libraries. You should be compiling myodbc against mysql-connector-c
I'm not compiling against MariaDB 10.3.8. I'm trying to install myodbc with MariaDB 10.1.31-r1. I even tried myodbc-5.2.7 but that fails to compile as well.
(In reply to Jaco Kroon from comment #2) > I'm not compiling against MariaDB 10.3.8. I'm trying to install myodbc with > MariaDB 10.1.31-r1. I even tried myodbc-5.2.7 but that fails to compile as > well. Please install mariadb-10.1.34 and try again. The libraries in mariadb are going away.
Thank you, that fixes it, which is indicative that the dependencies in the related packages is incomplete or wrong. Please change this into a "please fix the dependencies" request then since this situation really should not occur.