Re: Compiling Pike with MySQL 8 support
Ignasi Cavero <[email protected]> Sun, 9 Sep 2018 12:58:40 +0200
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Trivial patch for Pike-v8.0.610/src/modules/Mysql/mysql.c diff mysql.c_org mysql.c 307c307,311 < my_bool reconnectp = 0; --- > #if MYSQL_VERSION_ID >= 80000 > bool reconnectp = 0; > #else > my_bool reconect_p = 0; > #endif 481c485,489 < my_bool reconnectp = 0; --- > #if MYSQL_VERSION_ID >= 80000 > bool reconnectp = 0; > #else > my_bool reconect_p = 0; > #endif 546c554,558 < my_bool reconnectp = 0; --- > #if MYSQL_VERSION_ID >= 80000 > bool reconnectp = 0; > #else > my_bool reconect_p = 0; > #endif El 7/9/18 a les 11:10, Ignasi Cavero ha escrit: > I'm trying to compile pike 8.0.610 with support for MySQL 8.0.12 in a > Centos 7. > > I get the following error: > > Compiling modules/Mysql/mysql.c > /opt/Pike-v8.0.610/src/modules/Mysql/mysql.c: In function > ‘pike_mysql_set_options’: > /opt/Pike-v8.0.610/src/modules/Mysql/mysql.c:307:5: error: unknown > type name ‘my_bool’ > my_bool reconnectp = 0; > ^ > /opt/Pike-v8.0.610/src/modules/Mysql/mysql.c: In function > ‘pike_mysql_reconnect’: > /opt/Pike-v8.0.610/src/modules/Mysql/mysql.c:481:5: error: unknown > type name ‘my_bool’ > my_bool reconnectp = 0; > ^ > Compilation command was: > /opt/Pike-v8.0.610/build/linux-3.10.0-862.el7.x86_64-x86_64/smartlink > gcc -I. -I/opt/Pike-v8.0.610/src/modules/Mysql > -I/opt/Pike-v8.0.610/build/linux-3.10.0-862.el7.x86_64-x86_64 > -I/root/Pike-v8.0.610/src -I/usr/./include/mysql -I/usr/local/include > -DHAVE_CONFIG_H -g -ggdb -m64 -mrdrnd -fvisibility=hidden -O3 -pipe > -fvar-tracking-assignments -funswitch-loops -W -Wall -Wno-unused > -Wcomment -Wformat -Wimplicit-function-declaration -Wmultichar > -Wunused-function -Wswitch -Wuninitialized -Wpointer-arith > -Wchar-subscripts -Wno-long-long -Wdeclaration-after-statement -fPIC > -DDYNAMIC_MODULE -c /opt/Pike-v8.0.610/src/modules/Mysql/mysql.c -o > mysql.o > > Checking the MySQL include files I see that 'my_bool' isn't defined. I > see that they use 'bool'. Workaround: Edit the > Pike-v8.0.610/src/modules/Mysql/mysql.c and change 'my_bool' by > 'bool'. Now, it compiles nicely. > > -- *Ignasi Cavero* Técnico de I+D+i | R&D Technician [email protected] <mailto:[email protected]> (+34) 652 813 884 *Parc Científic i Tecnològic Agroalimentari de Lleida* Edifici H1 2a planta B | 25003 Lleida (Spain) Tel. 902 999 272 | (+34) 973 282 300 Fax (+34) 973 282 195 www.lleida.net <http://www.lleida.net> Política de privacidad <http://www.lleida.net/es/privacy.html>