RMySQL icon indicating copy to clipboard operation
RMySQL copied to clipboard

RMySQL fails build with mariadb >10.4

Open alecuba16 opened this issue 8 years ago • 12 comments

Because it looks for: MYSQL_SERVER_VERSION with libmariadb.so ???

Possible solution is given here: https://wiki.gentoo.org/wiki/MariaDB#MYSQL_SERVER_VERSION

#if defined MARIADB_CLIENT_VERSION_STR && !defined MYSQL_SERVER_VERSION #define MYSQL_SERVER_VERSION MARIADB_CLIENT_VERSION_STR #endif

alecuba16 avatar Nov 03 '17 13:11 alecuba16

Fixed in this pull request:

https://github.com/r-dbi/RMySQL/pull/215

alecuba16 avatar Nov 03 '17 13:11 alecuba16

Any chance this can be pushed? I'm still seeing this error in CentOS 7.4, R 3.4.2 and MariaDB 10.2.11.1

lachlansimpson avatar Dec 19 '17 04:12 lachlansimpson

@datakid Meanwhile you can use my fork with install GitHub from devtools.

alecuba16 avatar Dec 19 '17 07:12 alecuba16

Ah yeah. I might do. The RMariadb package installed - but the package I'm trying to install needs RMySQL and it's written poorly enough that I'd rather not fix it myself.

lachlansimpson avatar Dec 19 '17 07:12 lachlansimpson

@datakid My fork is from RMySQL master, to install it , you have to first install devtools from R package manager:

install.packages("devtools")

Then you will able to install RMySQL from my fork using the devtools (works on gentoo linux with latest mariadb beta too).

devtools::install_github("alecuba16/RMySQL")

PD: In windows you have to install RTOOLS before.

alecuba16 avatar Dec 19 '17 07:12 alecuba16

Perfect - thanks!

lachlansimpson avatar Dec 19 '17 21:12 lachlansimpson

This also affects mariadb=10.2.* (on Gentoo)

mschubert avatar Jan 10 '18 09:01 mschubert

I spent an hour or so trying to install RMySQL and re-discovered the patch suggested here. I can't see how this simple fix can break anything else, so I do hope this can be incorporated in the distribution and save a lot of others a bunch of time!

vpbrendel avatar Feb 11 '18 20:02 vpbrendel

Does this now work with the CRAN version 0.10.14?

krlmlr avatar Mar 24 '18 07:03 krlmlr

@krlmlr works for me now

mschubert avatar Mar 24 '18 10:03 mschubert

@krlmlr not for me

utils.c: In function ‘rmysql_version’:
utils.c:269:40: error: ‘MYSQL_SERVER_VERSION’ undeclared (first use in this function); did you mean ‘MYSQL_PS_CONVERSION’?
   SET_STRING_ELT(output_nms, 0, mkChar(MYSQL_SERVER_VERSION));
                                        ^~~~~~~~~~~~~~~~~~~~
                                        MYSQL_PS_CONVERSION
utils.c:269:40: note: each undeclared identifier is reported only once for each function it appears in
make: *** [/usr/lib64/R/etc/Makeconf:159: utils.o] Error 1
ERROR: compilation failed for package ‘RMySQL’

OpenSUSE Tumbleweed, R 3.4.4, MariaDB 10.2.13

dialvarezs avatar Mar 28 '18 06:03 dialvarezs

I'm still seeing this error when building RMySQL (0.10.15) with MariaDB 10.2.8 to provide backend.

Edit: RMySQL 0.10.16 exhibits the same build failure.

utils.c: In function 'rmysql_version':
utils.c:269:40: error: 'MYSQL_SERVER_VERSION' undeclared (first use in this function); did you mean 'MYSQL_PS_CONVERSION'?
   SET_STRING_ELT(output_nms, 0, mkChar(MYSQL_SERVER_VERSION));
                                        ^~~~~~~~~~~~~~~~~~~~
                                        MYSQL_PS_CONVERSION

Seems like @jeroen implied that work done on Feb 25, 2018 (such as https://github.com/r-dbi/RMySQL/commit/6434882109de23b7bb0ba0bd06cf269c6fe5afe1) was intended to fix this issue. That work should be in RMySQL (0.10.15).

Can't the patch suggested in https://github.com/r-dbi/RMySQL/pull/215 be merged?

CentOS Linux release 7.6.1810, R 3.5.1, MariaDB 10.2.8

odoublewen avatar Jan 10 '19 22:01 odoublewen