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

RHEL 7 pecl install sqlsrv fails #933

Closed
cbarnett3901 opened this issue Feb 21, 2019 · 2 comments
Closed

RHEL 7 pecl install sqlsrv fails #933

cbarnett3901 opened this issue Feb 21, 2019 · 2 comments

Comments

@cbarnett3901
Copy link

.+Please check the FAQ (frequently-asked questions) first. If you have other questions or something to report, please address the following:

+## PHP Driver version or file name
+
+## SQL Server version
+mysql version 5.5.60
+## Client operating system
+RHEL 7.6
+## PHP version
+PHP 7.3.2
+## Microsoft ODBC Driver version
+17.2.0.1
+## Table schema
+
+## Problem description
+When I run pecl install sqlsrv I get the output below after the make file is run

running: make /bin/sh /var/tmp/pear-build-rootyNI6vq/sqlsrv-5.3.0/libtool --mode=compile g++ -std=c++11 -I. -I/var/tmp/sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootyNI6vq/sqlsrv-5.3.0/include -I/var/tmp/pear-build-rootyNI6vq/sqlsrv-5.3.0/main -I/var/tmp/sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /var/tmp/sqlsrv/conn.cpp -o conn.lo libtool: compile: g++ -std=c++11 -I. -I/var/tmp/sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootyNI6vq/sqlsrv-5.3.0/include -I/var/tmp/pear-build-rootyNI6vq/sqlsrv-5.3.0/main -I/var/tmp/sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /var/tmp/sqlsrv/conn.cpp -fPIC -DPIC -o .libs/conn.o In file included from /usr/include/php/Zend/zend.h:27:0, from /usr/include/php/main/php.h:33, from /var/tmp/sqlsrv/shared/core_sqlsrv.h:34, from /var/tmp/sqlsrv/php_sqlsrv.h:25, from /var/tmp/sqlsrv/conn.cpp:20: /var/tmp/sqlsrv/shared/core_sqlsrv.h: In function 'void core::sqlsrv_array_init(sqlsrv_context&, zval*)': /usr/include/php/Zend/zend_types.h:792:24: error: expected id-expression before 'do' #define ZVAL_ARR(z, a) do { \ ^ /usr/include/php/Zend/zend_API.h:377:28: note: in expansion of macro 'ZVAL_ARR' #define array_init(arg) ZVAL_ARR((arg), zend_new_array(0)) ^ /var/tmp/sqlsrv/shared/core_sqlsrv.h:2380:20: note: in expansion of macro 'array_init' int zr = ::array_init(new_array); ^ /usr/include/php/Zend/zend_types.h:797:4: error: expected ',' or ';' before 'while' } while (0) ^ /usr/include/php/Zend/zend_API.h:377:28: note: in expansion of macro 'ZVAL_ARR' #define array_init(arg) ZVAL_ARR((arg), zend_new_array(0)) ^ /var/tmp/sqlsrv/shared/core_sqlsrv.h:2380:20: note: in expansion of macro 'array_init' int zr = ::array_init(new_array); ^ make: *** [conn.lo] Error 1 ERROR: make' failed`

Additionally, I tried downloading and manually installing sqlsrv 5.3.0. I get the following output when the make file is run:

/bin/sh /root/sqlsrv-5.3.0/libtool --mode=compile g++ -std=c++11 -I. -I/root/sqlsrv-5.3.0 -DPHP_ATOM_INC -I/root/sqlsrv-5.3.0/include -I/root/sqlsrv-5.3.0/main -I/root/sqlsrv-5.3.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/root/sqlsrv-5.3.0/shared -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /root/sqlsrv-5.3.0/conn.cpp -o conn.lo libtool: compile: g++ -std=c++11 -I. -I/root/sqlsrv-5.3.0 -DPHP_ATOM_INC -I/root/sqlsrv-5.3.0/include -I/root/sqlsrv-5.3.0/main -I/root/sqlsrv-5.3.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/root/sqlsrv-5.3.0/shared -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /root/sqlsrv-5.3.0/conn.cpp -fPIC -DPIC -o .libs/conn.o In file included from /usr/include/php/Zend/zend.h:27:0, from /usr/include/php/main/php.h:33, from /root/sqlsrv-5.3.0/shared/core_sqlsrv.h:34, from /root/sqlsrv-5.3.0/php_sqlsrv.h:25, from /root/sqlsrv-5.3.0/conn.cpp:20: /root/sqlsrv-5.3.0/shared/core_sqlsrv.h: In function 'void core::sqlsrv_array_init(sqlsrv_context&, zval*)': /usr/include/php/Zend/zend_types.h:792:24: error: expected id-expression before 'do' #define ZVAL_ARR(z, a) do { \ ^ /usr/include/php/Zend/zend_API.h:377:28: note: in expansion of macro 'ZVAL_ARR' #define array_init(arg) ZVAL_ARR((arg), zend_new_array(0)) ^~~~~~~~ /root/sqlsrv-5.3.0/shared/core_sqlsrv.h:2380:20: note: in expansion of macro 'array_init' int zr = ::array_init(new_array); ^~~~~~~~~~ make: *** [Makefile:194: conn.lo] Error 1

+## Expected behavior and actual behavior
+
+## Repro code or steps to reproduce

@yitam
Copy link
Contributor

yitam commented Feb 21, 2019

@cbarnett3901 please note that we haven't yet published a stable release that supports PHP 7.3+ (see #901 )

@cbarnett3901
Copy link
Author

Thanks! I was able to resolve this issue by downgrading PHP to 7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants