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

sudo pecl install sqlsrv #1071

Closed
Jayram92 opened this issue Dec 26, 2019 · 6 comments
Closed

sudo pecl install sqlsrv #1071

Jayram92 opened this issue Dec 26, 2019 · 6 comments

Comments

@Jayram92
Copy link

Please help me

  • sudo pecl install sqlsrv

PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib/php/20170718/pdo_sqlsrv.so (/usr/lib/php/20170718/pdo_sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_sqlsrv.so.so (/usr/lib/php/20170718/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /usr/lib/php/20170718/sqlsrv.so (/usr/lib/php/20170718/sqlsrv.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/sqlsrv.so.so (/usr/lib/php/20170718/sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading sqlsrv-5.6.1.tgz ...
Starting to download sqlsrv-5.6.1.tgz (183,396 bytes)
.......................................done: 183,396 bytes
34 source files, building
running: phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
building in /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1
running: /tmp/pear/temp/sqlsrv/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20190902
checking for PHP installed headers prefix... /usr/include/php/20190902
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable sqlsrv functions... yes, shared
checking for SQLSRV headers... /tmp/pear/temp/sqlsrv/shared/
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/conn.cpp -o conn.lo
mkdir .libs
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/conn.cpp -fPIC -DPIC -o .libs/conn.o
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/util.cpp -o util.lo
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/util.cpp -fPIC -DPIC -o .libs/util.o
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/init.cpp -o init.lo
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/init.cpp -fPIC -DPIC -o .libs/init.o
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/stmt.cpp -o stmt.lo
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/stmt.cpp -fPIC -DPIC -o .libs/stmt.o
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/shared/core_conn.cpp -o shared/core_conn.lo
mkdir shared/.libs
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/shared/core_conn.cpp -fPIC -DPIC -o shared/.libs/core_conn.o
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/shared/core_results.cpp -o shared/core_results.lo
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/shared/core_results.cpp -fPIC -DPIC -o shared/.libs/core_results.o
/bin/bash /tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/shared/core_stream.cpp -o shared/core_stream.lo
g++ -std=c++11 -I. -I/tmp/pear/temp/sqlsrv -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/include -I/tmp/pear/temp/pear-build-root83MYVT/sqlsrv-5.6.1/main -I/tmp/pear/temp/sqlsrv -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/tmp/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /tmp/pear/temp/sqlsrv/shared/core_stream.cpp -fPIC -DPIC -o shared/.libs/core_stream.o
/tmp/pear/temp/sqlsrv/shared/core_stream.cpp:209:1: error: invalid conversion from ‘size_t ()(php_stream, char*, size_t) {aka long unsigned int ()(_php_stream, char*, long unsigned int)}’ to ‘ssize_t ()(php_stream, char*, size_t) {aka long int ()(_php_stream, char*, long unsigned int)}’ [-fpermissive]
};
^
Makefile:204: recipe for target 'shared/core_stream.lo' failed
make: *** [shared/core_stream.lo] Error 1
ERROR: `make' failed

@cheenamalhotra
Copy link
Member

cheenamalhotra commented Dec 27, 2019

Hi @Jayram92

Please provide below information for your usecase:

  • PHP Driver version or file name
  • SQL Server version
  • Client operating system
  • PHP version
  • Microsoft ODBC Driver version

Please confirm you have followed instructions on Microsoft Docs for the same.

@FliegenKLATSCH
Copy link

I had the same issue on an up to date Ubuntu 18.04 with php7.4, but pecl install sqlsrv-5.7.1preview worked, so the issue is probably already fixed..

@Jayram92
Copy link
Author

Jayram92 commented Dec 30, 2019 via email

@cheenamalhotra
Copy link
Member

Thanks @Jayram92
We will close the issue.

@Jayram92
Copy link
Author

Jayram92 commented Dec 31, 2019 via email

@rumours86
Copy link

@Jayram92 I have exactly the same error, you can tell how you solved it?

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

No branches or pull requests

5 participants