Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

token ""mariadb-10.1"" is not valid in preprocessor expressions #262

Closed
eserte opened this issue Sep 9, 2018 · 10 comments
Closed

token ""mariadb-10.1"" is not valid in preprocessor expressions #262

eserte opened this issue Sep 9, 2018 · 10 comments
Assignees
Labels

Comments

@eserte
Copy link

eserte commented Sep 9, 2018

Compiling DBD-mysql-4.047 fails on debian/stretch systems:

cc -c  -I/opt/perl-5.24.3/lib/site_perl/5.24.3/x86_64-linux/auto/DBI -I/usr/include/mysql -DDBD_MYSQL_WITH_SSL -g  -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2   -DVERSION=\"4.047\" -DXS_VERSION=\"4.047\" -fPIC "-I/opt/perl-5.24.3/lib/5.24.3/x86_64-linux/CORE"   dbdimp.c
In file included from /usr/include/mysql/mysql.h:76:0,
                 from dbdimp.h:21,
                 from dbdimp.c:15:
dbdimp.c: In function 'mysql_dr_connect':
/usr/include/mysql/mysql_version.h:16:31: error: token ""mariadb-10.1"" is not valid in preprocessor expressions
 #define MARIADB_BASE_VERSION  "mariadb-10.1"
                               ^
dbdimp.c:1910:56: note: in expansion of macro 'MARIADB_BASE_VERSION'
 #if (MYSQL_VERSION_ID >= 50723) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
                                                        ^~~~~~~~~~~~~~~~~~~~
/usr/include/mysql/mysql_version.h:16:31: error: token ""mariadb-10.1"" is not valid in preprocessor expressions
 #define MARIADB_BASE_VERSION  "mariadb-10.1"
                               ^
dbdimp.c:1917:56: note: in expansion of macro 'MARIADB_BASE_VERSION'
 #if (MYSQL_VERSION_ID >= 50600) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
                                                        ^~~~~~~~~~~~~~~~~~~~
dbdimp.c: In function 'mysql_st_prepare':
dbdimp.c:3200:24: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
           bind->is_null=      (_Bool*) &(fbind->is_null);
                        ^
Makefile:355: recipe for target 'dbdimp.o' failed
make: *** [dbdimp.o] Error 1

DBD-mysql-4.046 compiled fine on this system.

@cventers
Copy link

cventers commented Sep 11, 2018

Sample problem with DBD-mysql-4.047 on CentOS 7.

"/opt/rh/rh-perl526/root/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- mysql.bs blib/arch/auto/DBD/mysql/mysql.bs 644
gcc -c  -I/opt/git/perl5lib-el7-x86_64-526/perl5lib/lib/x86_64-linux-thread-multi/auto/DBI -I/usr/include/mysql -DDBD_MYSQL_WITH_SSL -g  -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"4.047\" -DXS_VERSION=\"4.047\" -fPIC "-I/opt/rh/rh-perl526/root/usr/lib64/perl5/CORE"   dbdimp.c
In file included from /usr/include/mysql/mysql.h:72:0,
                 from dbdimp.h:21,
                 from dbdimp.c:15:
dbdimp.c: In function ‘mysql_dr_connect’:
/usr/include/mysql/mysql_version.h:16:31: error: token ""mariadb-5.5"" is not valid in preprocessor expressions
 #define MARIADB_BASE_VERSION  "mariadb-5.5"
                               ^
dbdimp.c:1910:56: note: in expansion of macro ‘MARIADB_BASE_VERSION’
 #if (MYSQL_VERSION_ID >= 50723) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
                                                        ^
/usr/include/mysql/mysql_version.h:16:31: error: token ""mariadb-5.5"" is not valid in preprocessor expressions
 #define MARIADB_BASE_VERSION  "mariadb-5.5"
                               ^
dbdimp.c:1917:56: note: in expansion of macro ‘MARIADB_BASE_VERSION’
 #if (MYSQL_VERSION_ID >= 50600) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
                                                        ^
dbdimp.c:1936:19: warning: unused variable ‘ssl_mode’ [-Wunused-variable]
      unsigned int ssl_mode;
                   ^
dbdimp.c: In function ‘mysql_st_prepare’:
dbdimp.c:3200:24: warning: assignment from incompatible pointer type [enabled by default]
           bind->is_null=      (_Bool*) &(fbind->is_null);
                        ^
make: *** [dbdimp.o] Error 1
  CAPTTOFU/DBD-mysql-4.047.tar.gz
  /usr/bin/make -- NOT OK

@Nuadh
Copy link

Nuadh commented Sep 11, 2018

fixed in FreeBSD with the following patch (only the 3rd file should be relevant for you): bugs.freebsd.org

@bramverhelst
Copy link

bramverhelst commented Sep 12, 2018

I also had this issue within a DockerFile build using Debian (together with #263). Sticking to version 4.046 keeps everything working

@eserte
Copy link
Author

eserte commented Sep 15, 2018

Same problem with DBD-mysql-4.048, it seems.

@dveeden
Copy link
Collaborator

dveeden commented Sep 15, 2018

https://travis-ci.org/perl5-dbi/DBD-mysql/jobs/419865071 has this:

...
Setting environment variables from .travis.yml
$ export DB=MariaDB
$ export VERSION=10.2.1
...
# mysql_clientversion is: 50561
# mysql_serverversion is: 50633
# mysql_hostinfo is: Localhost via UNIX socket
# mysql_serverinfo is: 5.6.33-0ubuntu0.14.04.1
...

dveeden added a commit to dveeden/DBD-mysql that referenced this issue Sep 15, 2018
This regression was introduced in perl5-dbi#257
Fixes perl5-dbi#262
@akalinux
Copy link

akalinux commented Oct 11, 2018

When will 4.049 be released to cpan?

@graz68a
Copy link

graz68a commented Oct 11, 2018

+1

@dur-randir
Copy link

@CaptTofu what's the point of closing the issue while not making the advertised version (4.049) available to users?

@todd-richmond
Copy link

Any ETA for 4.049 update on CPAN? We are stuck at 4.046_01 until it is made available

@dveeden
Copy link
Collaborator

dveeden commented Nov 17, 2018

Sorry it took so long, but 4.049 has been uploaded

bigio pushed a commit to bigio/DBD-mysql that referenced this issue Jan 9, 2019
This regression was introduced in perl5-dbi#257
Fixes perl5-dbi#262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants