Pecl error make failed

I'm trying to install sqlsrv by using the commands from this page. However, when running pecl install sqlsrv-4.2.0preview I get the error: Error 1 ERROR: 'make' failed. I tried : apt-get updat...

I’m trying to install sqlsrv by using the commands from this page. However, when running

pecl install sqlsrv-4.2.0preview

I get the error: Error 1 ERROR: 'make' failed.

I tried :

apt-get update
apt-get install build-essential
apt-get install libpcre3-dev 
apt-get install make

All of these are installed on the latest version.

I’m running a container using the php:7.0-apache image. Running apachectl -V returns Apache/2.4.10 (Debian).

Here is the full log output from the command I ran: https://pastebin.com/MYDY3xwU

Giacomo1968's user avatar

Giacomo1968

25.4k11 gold badges70 silver badges100 bronze badges

asked May 24, 2017 at 8:47

Edeholland's user avatar

I had this exact error.

/tmp/pear/temp/sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
 #include <sql.h>

Apparently the header file its looking for is only in the package unixODBC-devel.

I installed that package and was able to successfully complete the build. yum install unixODBC-devel.

Possibly, a better explanation is here.
stackoverflow Question # 15447386

answered May 26, 2017 at 15:12

Matthew Goheen's user avatar

1

I had the following error on Ubuntu 18.04 when installing

/tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory #include <sql.h>

Installing the package unixodbc-dev as Matthew Goheen proposed solved the issue

sudo apt-get install unixodbc-dev

answered Mar 7, 2019 at 6:30

Vindic's user avatar

VindicVindic

5675 silver badges8 bronze badges

0

try

sudo apt-get install unixodbc-dev

answered Feb 22, 2021 at 10:30

erax's user avatar

eraxerax

1211 silver badge3 bronze badges

Содержание

  1. Thread: make failed error when installing pdo via pecl
  2. make failed error when installing pdo via pecl
  3. Re: make failed error when installing pdo via pecl
  4. Re: make failed error when installing pdo via pecl
  5. Re: make failed error when installing pdo via pecl
  6. Re: make failed error when installing pdo via pecl
  7. Re: make failed error when installing pdo via pecl
  8. unable to install version 4.0.7+ on ubuntu 16.04 using pecl #213
  9. Comments

Thread: make failed error when installing pdo via pecl

Thread Tools
Display

make failed error when installing pdo via pecl

I’m on Ubuntu 9.10 64-bit trying to install pdo and pdo_mysql, but whenever I run «sudo pecl install pdo» I get the following output:

What am I doing wrong?

Re: make failed error when installing pdo via pecl

Re: make failed error when installing pdo via pecl

I have the same problem. The problem was appeared when updated my ubuntu from 9 to 10 (php5.3 was installed).

Unfortunately I didn’t find solution for this problem. There are few similar topics in internet, but anyone has solution.

Re: make failed error when installing pdo via pecl

Ok I’ve found the solution to our problems. The biggest issue here is that PDO is no longer supported in PECL and has been moved to CORE.

On that note all the PDO drivers for the respected databases have been moved into the main php5 database packages. So when you install php5-sqlite it not only installs the basic driver it also installs the pdo driver at the same time.

Now if you are getting this error that means that you already attempted to install the outdated pecl version. Doing that seems to corrupt your php installation and now even if you install the right package it still wont work.

To fix this you must PURGE not remove all the installed packages that start with php5 including php itself.

Once all these packages are purged reinstall the ones you deleted.

Finally install the correct php5 database package, so for sqlite install php5-sqlite. After which pdo-sqlite will be properly installed and ready for use.

Re: make failed error when installing pdo via pecl

Thank you! Saved me a bit of t/s on this issue!

Re: make failed error when installing pdo via pecl

Ok I’ve found the solution to our problems. The biggest issue here is that PDO is no longer supported in PECL and has been moved to CORE.

On that note all the PDO drivers for the respected databases have been moved into the main php5 database packages. So when you install php5-sqlite it not only installs the basic driver it also installs the pdo driver at the same time.

Now if you are getting this error that means that you already attempted to install the outdated pecl version. Doing that seems to corrupt your php installation and now even if you install the right package it still wont work.

To fix this you must PURGE not remove all the installed packages that start with php5 including php itself.

Once all these packages are purged reinstall the ones you deleted.

Finally install the correct php5 database package, so for sqlite install php5-sqlite. After which pdo-sqlite will be properly installed and ready for use.

Hope this helps,
LaChild

thanks!
After a whole day of searching for a solution to enable curl and pdo, although i had installed them previously, i have found this, followed all steps, and now it works like a charm!
thank you one more time

Источник

unable to install version 4.0.7+ on ubuntu 16.04 using pecl #213

Hi,
I’m trying to install sqlsrv and pdo_sqlsrv using pecl on php 7.0.14 however it fails with an error.
I was also following the tutorial at https://www.microsoft.com/en-us/sql-server/developer-get-started/php-ubuntu
Is anyone else experiencing the same issue?

The latest installable version for me is 4.0.6 and here’s the part from pecl output

The text was updated successfully, but these errors were encountered:

Same error on oficial PHP docker image (debian)

Same issue on docker image php:7.0-fpm with updated libc6 package.
The creation of the hidden .libs folder with mkdir shared/.libs seems like the culprit. (the -p flag is missing)

@ioweb-gr Can you try out the install instruction in README? it is the most recent file.

OK I have some further info regarding this issue. I installed a fresh virtual machine using Ubuntu 16.04 as in my original machine and tested on that system.

The pecl install sqlsrv seems to work with the provided php version on Ubuntu 16.04 from the repositories.

However, I then also tried to compile a new php version from source and and try to install sqlsrv on that one using pecl. It always fails when you try to install to the custom php version no matter what options you build php with.

Probably that’s similar to what’s happening using docker image.

@Hadis-Fard all the prerequisites on the link you sent are installed on both my Ubuntu 16.04 systems and although I can’t try on my main system using the default php version, the result is consistent when compiling from source in both machines with the same error. I can confirm it worked OK for the fresh Ubuntu system with default PHP from repos.

@vandammeb I can confirm this. I tested it in a php:7.1 Docker container. pecl install sqlsrv failed with the «cannot create directory ‘shared/.libs’» error message. When I quickly create a «mkdir /tmp/pear/temp/pear-build-defaultuserXXXXXX/sqlsrv-4.0.8/shared» folder manually the build process completed successfully.

I have the same problem on php7.1-fpm docker image. sqlsrv-4.0.6 works perfect, both 4.0.7 and 4.0.8 fail on mkdir.

@GodWolen Seems like there in an issue with our 4.0.6+ PECL packages. We are looking into this actively.

@GodWolen @bla-kw @ioweb-gr Can you try the latest PECL package (4.1.6.1)?

sudo pecl install sqlsrv-4.1.6.1

@meet-bhagdev , I actually came across this issue today when attempting to install sqlsrv-4.0.8 on a docker image from pecl. I updated to 4.1.6.1 and the fail did not occur.

I’ve managed to install it as well. Nice job

Awesome! @ALL we are going to close this now. v4.1.6 fixes this issue. Feel free to reopen if you are still running into problems.

Im getting the following error

cc1plus: error: unrecognized command line option «-std=c++11»
cc1plus: error: unrecognized command line option «-std=c++11»
make: *** [conn.lo] Error 1
ERROR: `make’ failed

PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012

gcc -v
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)

@jebarco1 What is the output for g++ -v?

Hi,
I’m getting the following when trying sudo pecl install sqlsrv (also with sudo pecl install sqlsrv-4.1.6.1 ) :

libtool: link: cc -shared -fPIC -DPIC .libs/conn.o .libs/util.o .libs/init.o .libs/stmt.o shared/.libs/core_conn.o shared/.libs/core_results.o shared/.libs/core_stream.o shared/.libs/core_init.o shared/.libs/core_stmt.o shared/.libs/core_util.o shared/.libs/FormattedPrint.o shared/.libs/localizationimpl.o shared/.libs/StringFunctions.o -lstdc++ -lodbc -lodbcinst -g -O2 -Wl,-soname -Wl,sqlsrv.so -o .libs/sqlsrv.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodbc.a(SQLAllocHandle.o): relocation R_X86_64_32 against `.rodata.str1.8′ can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodbc.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:223: recipe for target ‘sqlsrv.la’ failed
make: *** [sqlsrv.la] Error 1
ERROR: ‘make’ failed

My config :
PHP 7.0.18-0ubuntu0.16.04.1 (cli) ( NTS )
Zend Engine v3.0.0 (with Zend OPcache v7.0.18-0ubuntu0.16.04)
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1

I also placed php_pdo_sqlsrv_7_nts.so in /usr/local/lib/ but don’t know how to manually install it in PHP or in odbc ini file..

Can you help me ?
What I need is accessing a remote MS SQL server

Please follow these steps to load php_pdo_sqlsrv_7_nts.so

Get the path php.ini location.

php —ini | grep «Loaded Configuration»

Add the driver to php.ini file.

echo «extension=path_to_driver/php_pdo_sqlsrv_7_nts.so» >> path_to_ini/php.ini

Verify that the driver is loaded.

php —ri pdo_sqlsrv

Regarding the PECL install issue, looks like you are missing a shared dependency or it is static. Let me know if you were able to load php_pdo_sqlsrv_7_nts.so.

Hi,
Thanks for answering me 👍

So, the command for me is :
echo «extension=/usr/local/lib/php_pdo_sqlsrv_7_nts.so» >> /etc/php/7.0/apache2/php.ini

After that I restarted apache and run php —ri pdo_sqlsrv :
Extension ‘pdo_sqlsrv’ not present.

If I execute php —ri pdo I have :
PDO
PDO support => enabled
PDO drivers => mysql

So I just found that I need to insert it in the cli/php.ini instead of the apache2/php.ini but the same error comes again about the libodbc.so.2 missing when I execute php —ri pdo_sqlsrv :

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php_pdo_sqlsrv_7_nts.so’ — libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/odbc.so’ — libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/pdo_odbc.so’ — libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
Extension ‘pdo_sqlsrv’ not present.

I suspect unixODBC is not properly installed in your machine. Please post the output of the following commands:

odbcinst -j
unixODBC 2.3.1
DRIVERS. /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES. /etc/ODBCDataSources
USER DATA SOURCES. /home/servadm/.odbc.ini
SQLULEN Size. 8
SQLLEN Size. 8
SQLSETPOSIROW Size.: 8
servadm@demo-ws-int:

odbcinst -q -d -n «ODBC Driver 13 for SQL Server»
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.8.0
UsageCount=1

sudo find /usr 2>/dev/null -name «libodbc*»
/usr/local/freetds-0.91/vms/libodbc.opt
/usr/share/doc/libodbc1
/usr/lib/x86_64-linux-gnu/libodbc.so
/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
/usr/lib/x86_64-linux-gnu/libodbc.a
/usr/lib/x86_64-linux-gnu/libodbcinst.so.1
/usr/lib/x86_64-linux-gnu/libodbccr.so
/usr/lib/x86_64-linux-gnu/libodbcinst.a
/usr/lib/x86_64-linux-gnu/libodbcinst.so
/usr/lib/x86_64-linux-gnu/libodbccr.a
/usr/lib/x86_64-linux-gnu/libodbcinst.so.2
/usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg1S.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg2S.so
/usr/lib/x86_64-linux-gnu/odbc/libodbctxtS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcnnS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcminiS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so

php -i | grep «Configure Command»
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php_pdo_sqlsrv_7_nts.so’ — libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/odbc.so’ — libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/pdo_odbc.so’ — libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0

Your unixODBC installation is missing libodbc.so.2. You might have accidentally removed that file or unixODBC installation did not finish properly. You can run apt-cache policy unixodbc to display the package information.

I would suggest to uninstall unixodbc and install the latest package. If the current unixodbc package was installed with apt-get , you can run sudo apt-get purge unixodbc && sudo apt autoremove . If you installed unixodbc from a different source, you will need to remove its files manually. After uninstalling the package, run sudo find /usr 2>/dev/null -name «libodbc*» to make sure that, there are no libodbc files in /usr/lib/x86_64-linux-gnu/ folder.

Once uninstall is done, you can run sudo apt-get update && sudo apt-get install unixodbc to install the new package.

You can also check this page for end to end installation instructions.

Let me know if this helps.

Well, Yes I know that a file is missing, but not why and how to fix it 😒

So, thanks a lot for your help 👍

Running apt-cache policy unixodbc gives :
unixodbc:
Installed: 2.3.1-4.1
Candidate: 2.3.1-4.1
Version table:
*** 2.3.1-4.1 500
500 http://ch.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status

I just run sudo apt-get purge unixodbc && sudo apt autoremove followed by sudo apt-get update && sudo apt-get install unixodbc It seems to be OK.

Now When I execute again odbcinst -q -d -n «ODBC Driver 13 for SQL Server» :
odbcinst: SQLGetPrivateProfileString failed with .

And for find /usr 2>/dev/null -name «libodbc*» :
/usr/local/freetds-0.91/vms/libodbc.opt
/usr/share/doc/libodbc1
/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
/usr/lib/x86_64-linux-gnu/libodbcinst.so.1
/usr/lib/x86_64-linux-gnu/libodbcinst.so.2
/usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg1S.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg2S.so
/usr/lib/x86_64-linux-gnu/odbc/libodbctxtS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcnnS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcminiS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so

I called this first sudo pecl search sqlsrv :
Retrieving data. 0%
.Matched packages, channel pecl.php.net:
Package Stable/(Latest) Local
pdo_sqlsrv 4.2.0preview (devel) Microsoft Drivers for PHP for SQL Server (PDO_SQLSRV)
sqlsrv 4.2.0preview (devel) Microsoft Drivers for PHP for SQL Server (SQLSRV)

So, I’ll try to install the SQL driver again with command pecl install sqlsrv and it stops with following error (same result with pecl install pdo_sqlsrv ) :
downloading sqlsrv-4.0.8.tgz .
Starting to download sqlsrv-4.0.8.tgz (192,155 bytes)
. done: 192,155 bytes
33 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
building in /tmp/pear/temp/pear-build-rootQz2kj5/sqlsrv-4.0.8
running: /tmp/pear/temp/sqlsrv/configure —with-php-config=/usr/bin/php-config
.
In file included from /tmp/pear/temp/sqlsrv/shared/typedefs_for_linux.h:23:0,
from /tmp/pear/temp/sqlsrv/shared/winnls.h:24,
from /tmp/pear/temp/sqlsrv/shared/FormattedPrint.h:24,
from /tmp/pear/temp/sqlsrv/shared/core_sqlsrv.h:40,
from /tmp/pear/temp/sqlsrv/php_sqlsrv.h:25,
from /tmp/pear/temp/sqlsrv/conn.cpp:20:
/tmp/pear/temp/sqlsrv/shared/xplat.h:36:17: fatal error: sql.h: No such file or directory
#include
^
compilation terminated.
Makefile:194: recipe for target ‘conn.lo’ failed
make: *** [conn.lo] Error 1
ERROR: `make’ failed

I installed missing unixodbc-dev and run again, now the error is not the same :
libtool: link: cc -shared -fPIC -DPIC .libs/pdo_dbh.o .libs/pdo_parser.o .libs/pdo_util.o .libs/pdo_init.o .libs/pdo_stmt.o shared/.libs/core_conn.o shared/.libs/ce_results.o shared/.libs/core_stream.o shared/.libs/core_init.o shared/.libs/core_stmt.o shared/.libs/core_util.o shared/.libs/FormattedPrint.o shared/.libs/localizaonimpl.o shared/.libs/StringFunctions.o -lstdc++ -lodbc -g -O2 -Wl,-soname -Wl,pdo_sqlsrv.so -o .libs/pdo_sqlsrv.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodbc.a(SQLAllocHandle.o): relocation R_X86_64_32 against ‘.rodata.str1.8’ can not be used wn making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodbc.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:225: recipe for target ‘pdo_sqlsrv.la’ failed
make: *** [pdo_sqlsrv.la] Error 1
ERROR: ‘make’ failed

The same as 7 days ago !
This is going to make me crazy.

This is what find /usr 2>/dev/null -name «libodbc*» returns on my clean Ubuntu 16.04 VM after installing unixodbc with sudo apt-get install unixodbc

Your unixodbc installation is still broken. Please post the full stacktrace of the following commands in the same order, I will try to figure out what went wrong.

Ok @ulvii I run this 5 steps in this order :

  1. sudo apt-get purge unixodbc && sudo apt autoremove
    Reading package lists. Done
    Building dependency tree
    Reading state information. Done
    The following packages will be REMOVED:
    msodbcsql* mssql-tools* unixodbc* unixodbc-dev*
    0 upgraded, 0 newly installed, 4 to remove and 11 not upgraded.
    After this operation, 1,822 kB disk space will be freed.
    Do you want to continue? [Y/n] Y
    (Reading database . 111612 files and directories currently installed.)
    Removing mssql-tools (14.0.6.0-1) .
    Purging configuration files for mssql-tools (14.0.6.0-1) .
    Removing msodbcsql (13.1.8.0-1) .
    Purging configuration files for msodbcsql (13.1.8.0-1) .
    dpkg: warning: while removing msodbcsql, directory ‘/opt’ not empty so not removed
    Removing unixodbc-dev (2.3.1-4.1) .
    Removing unixodbc (2.3.1-4.1) .
    Processing triggers for man-db (2.7.5-1) .
    Reading package lists. Done
    Building dependency tree
    Reading state information. Done
    0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  1. find /usr 2>/dev/null -name «libodbc*»
    /usr/local/freetds-0.91/vms/libodbc.opt
    /usr/share/doc/libodbc1
    /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
    /usr/lib/x86_64-linux-gnu/libodbcinst.so.1
    /usr/lib/x86_64-linux-gnu/libodbcinst.so.2
    /usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg1S.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg2S.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbctxtS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcnnS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcminiS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
  1. sudo apt-get update && sudo apt-get install unixodbc
    Hit:1 http://ch.archive.ubuntu.com/ubuntu xenial InRelease
    Get:2 http://ch.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
    Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
    Get:4 http://ch.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
    Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [291 kB]
    Get:6 http://ch.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [565 kB]
    Hit:7 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease
    Hit:8 https://apt-mo.trafficmanager.net/repos/mssql-ubuntu-xenial-release xenial InRelease
    Get:9 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [275 kB]
    Hit:10 https://packages.microsoft.com/ubuntu/16.04/mssql-server xenial InRelease
    Get:11 http://ch.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [547 kB]
    Get:12 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [124 kB]
    Get:13 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [139 kB]
    Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [125 kB]
    Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [72.2 kB]
    Get:16 http://ch.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [228 kB]
    Get:17 http://ch.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [488 kB]
    Get:18 http://ch.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [470 kB]
    Get:19 http://ch.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [193 kB]
    Fetched 3,824 kB in 3s (1,161 kB/s)
    Reading package lists. Done
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1
    W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-tools.list:1
    Reading package lists. Done
    Building dependency tree
    Reading state information. Done
    The following NEW packages will be installed:
    unixodbc
    0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.
    Need to get 0 B/20.5 kB of archives.
    After this operation, 88.1 kB of additional disk space will be used.
    Selecting previously unselected package unixodbc.
    (Reading database . 111550 files and directories currently installed.)
    Preparing to unpack . /unixodbc_2.3.1-4.1_amd64.deb .
    Unpacking unixodbc (2.3.1-4.1) .
    Processing triggers for man-db (2.7.5-1) .
    Setting up unixodbc (2.3.1-4.1) .
  1. find /usr 2>/dev/null -name «libodbc*»
    /usr/local/freetds-0.91/vms/libodbc.opt
    /usr/share/doc/libodbc1
    /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
    /usr/lib/x86_64-linux-gnu/libodbcinst.so.1
    /usr/lib/x86_64-linux-gnu/libodbcinst.so.2
    /usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg1S.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg2S.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbctxtS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcnnS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcminiS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
    /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
  1. dpkg-query -L libodbc1
    /.
    /usr
    /usr/share
    /usr/share/doc
    /usr/share/doc/libodbc1
    /usr/share/doc/libodbc1/changelog.gz
    /usr/share/doc/libodbc1/README.Debian
    /usr/share/doc/libodbc1/copyright

Apparently apt-get purge unixodbc did not succeed. Otherwise the second step would have had no output. You need to uninstall libodbc1 , odbcinst and odbcinst1debian2 packages as well, because looks they were installed separately (or some other packages that you have installed on the system require them). Since the packages I mentioned above can be a dependency for some other packages, you should be careful when removing them.

I have the same error, I could solve the issue with installing sudo apt install unixodbc-dev
After this I was able to install sqlsrv and pdo_sqlsrv without any problems.

Источник

Here is the log file, make does not run. I followed the instructions by Ronald Bauman here. Below you can find the point where it fails. How can I debug this?

/bin/bash /tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/include -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/PDO/pdo.c -o pdo.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/include -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo.c  -fPIC -DPIC -o .libs/pdo.o
/bin/bash /tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/include -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/PDO/pdo_dbh.c -o pdo_dbh.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/include -I/tmp/pear/temp/pear-build-rootq7RxQ6/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo_dbh.c  -fPIC -DPIC -o .libs/pdo_dbh.o
/tmp/pear/temp/PDO/pdo_dbh.c: In function ‘pdo_stmt_instantiate’:
/tmp/pear/temp/PDO/pdo_dbh.c:410:8: error: ‘zval’ has no member named ‘refcount’
/tmp/pear/temp/PDO/pdo_dbh.c:411:8: error: ‘zval’ has no member named ‘is_ref’
/tmp/pear/temp/PDO/pdo_dbh.c: In function ‘pdo_stmt_construct’:
/tmp/pear/temp/PDO/pdo_dbh.c:435:6: error: ‘zend_fcall_info’ has no member named ‘object_pp’
/tmp/pear/temp/PDO/pdo_dbh.c:458:6: error: ‘zend_fcall_info_cache’ has no member named ‘object_pp’
/tmp/pear/temp/PDO/pdo_dbh.c: In function ‘zim_PDO_setAttribute’:
/tmp/pear/temp/PDO/pdo_dbh.c:752:12: error: ‘zval’ has no member named ‘refcount’
/tmp/pear/temp/PDO/pdo_dbh.c: In function ‘zim_PDO_getAttribute’:
/tmp/pear/temp/PDO/pdo_dbh.c:818:28: error: ‘zval’ has no member named ‘refcount’
/tmp/pear/temp/PDO/pdo_dbh.c: In function ‘pdo_hash_methods’:
/tmp/pear/temp/PDO/pdo_dbh.c:1122:24: warning: assignment discards qualifiers from pointer target type
/tmp/pear/temp/PDO/pdo_dbh.c:1126:20: warning: assignment discards qualifiers from pointer target type
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed

asked Jun 23, 2011 at 16:54

otto's user avatar

php5-mysql, php5-pgsql, and php5-sqlite packages will provide the PDO extensions with them. Pear is not needed to achieve this.

sudo apt-get install php5-mysql php5-postgres php5-sqlite

answered Dec 5, 2011 at 20:11

Marco Ceppi's user avatar

Marco CeppiMarco Ceppi

47.5k29 gold badges171 silver badges197 bronze badges

While trying to install drupal7 under Debian wheezy, I encountered identical make errors as shown here.

Initial error was:
PHP Fatal error: Undefined class constant ‘MYSQL_ATTR_USE_BUFFERED_QUERY’ in /usr/share/drupal7/includes/database/mysql/database.inc on line 42

Then, installing with «pecl install pdo» gave the above make errors.

Following this:
http://drupal.org/node/784062#comment-2932820
The issue was avoided.

answered Nov 4, 2011 at 3:22

Kiharo's user avatar

1

You didn’t specify the PHP version used so I am just guessing the reason. The most probable reason for compilation failure is that you are using incompatible version of PECL module and PHP version.

There was a change in Zend internals between PHP 5.4 and PHP 5.3, so the modules needed an update.

Together with the fact that PDO module is no longer maintained makes quite reasonable assumption that you are using way-to-old PDO module with newer PHP, which will not work for reasons I have already stated.

E.g. just use the modules (php5-mysql, php5-pgsql) provided by the distribution.

answered Mar 8, 2013 at 7:27

oerdnj's user avatar

oerdnjoerdnj

7,88038 silver badges49 bronze badges

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • [ubuntu] make failed error when installing pdo via pecl

  1. make failed error when installing pdo via pecl

    I’m on Ubuntu 9.10 64-bit trying to install pdo and pdo_mysql, but whenever I run «sudo pecl install pdo» I get the following output:

    Code:

    downloading PDO-1.0.3.tgz ...
    Starting to download PDO-1.0.3.tgz (52,613 bytes)
    .............done: 52,613 bytes
    12 source files, building
    running: phpize
    Configuring for:
    PHP Api Version:         20090626
    Zend Module Api No:      20090626
    Zend Extension Api No:   220090626
    building in /var/tmp/pear-build-root/PDO-1.0.3
    running: /tmp/pear/temp/PDO/configure
    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 cc... cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    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 whether cc understands -c and -o together... yes
    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-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for PHP prefix... /usr
    checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
    checking for PHP extension directory... /usr/lib/php5/20090626
    checking for PHP installed headers prefix... /usr/include/php5
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    checking for gawk... no
    checking for nawk... nawk
    checking if nawk is broken... no
    checking whether to enable PDO support... yes, shared
    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 for g77... no
    checking for xlf... no
    checking for f77... no
    checking for frt... no
    checking for pgf77... no
    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for xlf90... no
    checking for f90... no
    checking for pgf90... no
    checking for pghpf... no
    checking for epcf90... no
    checking for gfortran... no
    checking for g95... no
    checking for xlf95... no
    checking for f95... no
    checking for fort... no
    checking for ifort... no
    checking for ifc... no
    checking for efc... no
    checking for pgf95... no
    checking for lf95... no
    checking for ftn... no
    checking whether we are using the GNU Fortran 77 compiler... no
    checking whether  accepts -g... no
    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
    configure: creating libtool
    appending configuration tag "CXX" to libtool
    appending configuration tag "F77" to libtool
    configure: creating ./config.status
    config.status: creating config.h
    running: make
    /bin/bash /var/tmp/pear-build-root/PDO-1.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/PDO/pdo.c -o pdo.lo
    mkdir .libs
     cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo.c  -fPIC -DPIC -o .libs/pdo.o
    /bin/bash /var/tmp/pear-build-root/PDO-1.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/PDO/pdo_dbh.c -o pdo_dbh.lo
     cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo_dbh.c  -fPIC -DPIC -o .libs/pdo_dbh.o
    /tmp/pear/temp/PDO/pdo_dbh.c: In function �pdo_stmt_instantiate�:
    /tmp/pear/temp/PDO/pdo_dbh.c:410: error: �zval� has no member named �refcount�
    /tmp/pear/temp/PDO/pdo_dbh.c:411: error: �zval� has no member named �is_ref�
    /tmp/pear/temp/PDO/pdo_dbh.c: In function �pdo_stmt_construct�:
    /tmp/pear/temp/PDO/pdo_dbh.c:435: error: �zend_fcall_info� has no member named �object_pp�
    /tmp/pear/temp/PDO/pdo_dbh.c:458: error: �zend_fcall_info_cache� has no member named �object_pp�
    /tmp/pear/temp/PDO/pdo_dbh.c: In function �zim_PDO_setAttribute�:
    /tmp/pear/temp/PDO/pdo_dbh.c:752: error: �zval� has no member named �refcount�
    /tmp/pear/temp/PDO/pdo_dbh.c: In function �zim_PDO_getAttribute�:
    /tmp/pear/temp/PDO/pdo_dbh.c:818: error: �zval� has no member named �refcount�
    /tmp/pear/temp/PDO/pdo_dbh.c: In function �pdo_hash_methods�:
    /tmp/pear/temp/PDO/pdo_dbh.c:1122: warning: assignment discards qualifiers from pointer target type
    /tmp/pear/temp/PDO/pdo_dbh.c:1126: warning: assignment discards qualifiers from pointer target type
    make: *** [pdo_dbh.lo] Error 1
    ERROR: `make' failed

    What am I doing wrong?


  2. Re: make failed error when installing pdo via pecl


  3. Re: make failed error when installing pdo via pecl

    I have the same problem. The problem was appeared when updated my ubuntu from 9 to 10 (php5.3 was installed).

    Unfortunately I didn’t find solution for this problem. There are few similar topics in internet, but anyone has solution.


  4. Re: make failed error when installing pdo via pecl

    Ok I’ve found the solution to our problems. The biggest issue here is that PDO is no longer supported in PECL and has been moved to CORE.

    On that note all the PDO drivers for the respected databases have been moved into the main php5 database packages. So when you install php5-sqlite it not only installs the basic driver it also installs the pdo driver at the same time.

    Now if you are getting this error that means that you already attempted to install the outdated pecl version. Doing that seems to corrupt your php installation and now even if you install the right package it still wont work.

    To fix this you must PURGE not remove all the installed packages that start with php5 including php itself.

    Once all these packages are purged reinstall the ones you deleted.

    Finally install the correct php5 database package, so for sqlite install php5-sqlite. After which pdo-sqlite will be properly installed and ready for use.

    Hope this helps,
    LaChild


  5. Lightbulb Re: make failed error when installing pdo via pecl

    Thank you! Saved me a bit of t/s on this issue!

    If Linux doesn’t have the solution, you have the wrong problem
    — Gerard Beekmans, LFS


  6. Lightbulb Re: make failed error when installing pdo via pecl

    Quote Originally Posted by lachild
    View Post

    Ok I’ve found the solution to our problems. The biggest issue here is that PDO is no longer supported in PECL and has been moved to CORE.

    On that note all the PDO drivers for the respected databases have been moved into the main php5 database packages. So when you install php5-sqlite it not only installs the basic driver it also installs the pdo driver at the same time.

    Now if you are getting this error that means that you already attempted to install the outdated pecl version. Doing that seems to corrupt your php installation and now even if you install the right package it still wont work.

    To fix this you must PURGE not remove all the installed packages that start with php5 including php itself.

    Once all these packages are purged reinstall the ones you deleted.

    Finally install the correct php5 database package, so for sqlite install php5-sqlite. After which pdo-sqlite will be properly installed and ready for use.

    Hope this helps,
    LaChild

    thanks!
    After a whole day of searching for a solution to enable curl and pdo, although i had installed them previously, i have found this, followed all steps, and now it works like a charm!
    thank you one more time


  7. Re: make failed error when installing pdo via pecl


Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

Bug #59296 pecl install fails with `make`
Submitted: 2010-07-07 12:45 UTC Modified: 2011-05-15 03:44 UTC
From: trukin at gmail dot com Assigned:
Status: Wont fix Package: gearman (PECL)
PHP Version: 5.3.2 OS: Ubuntu 10.4
Private report: No CVE-ID: None

 [2010-07-07 12:45 UTC] trukin at gmail dot com

Description:
------------
Running

sudo pecl install channel://pecl.php.net/gearman-0.7.0


Fails with 

/tmp/pear/temp/gearman/php_gearman.c: In function 
?zm_startup_gearman?:
/tmp/pear/temp/gearman/php_gearman.c:4467: error: 
?GEARMAN_VERBOSE_NEVER? undeclared (first use in this 
function)
/tmp/pear/temp/gearman/php_gearman.c:4467: error: (Each 
undeclared identifier is reported only once
/tmp/pear/temp/gearman/php_gearman.c:4467: error: for each 
function it appears in.)
make: *** [php_gearman.lo] Error 1
ERROR: `make' failed


Reproduce code:
---------------
sudo pecl install channel://pecl.php.net/gearman-0.7.0

Expected result:
----------------
work

Actual result:
--------------
not work

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2010-07-27 19:43 UTC] david at hisel dot com

I had the same error on Ubuntu 10.04.

To recreate the error, I used apt-get to install the 
gearman-* and libgearman-* packages.  Then, I ran pecl 
install channel://pecl.php.net/gearman-0.7.0.

I did get it to work finally...
1. uninstall every gearman-* and libgearman-* package from 
apt-get.
2.  download gearmand source, and configure/make/make 
install
3.  downlaod gearman-0.7.0 source, and 
phpize/configure/make/make install

HTH.

.dave.

 [2010-08-30 18:03 UTC] jbelich at adicio dot com

I've also found that doing an apt-get -b source gearman also before doing the pecl install also clears up this compile issue. However, i'm using the gearman-developers ppa.

 [2010-08-30 22:08 UTC] trukin at gmail dot com

The only way to bypass this "bug" is to install the latest 
libgearman

 [2011-05-15 03:44 UTC] hradtke@php.net

Please upgrade libgearman if you are having this problem.

I’m running Ubuntu 14.04 and want install ssh2 module for php 7 using this command :

pecl install -f https://pecl.php.net/get/ssh2-1.1.2.tgz

I’ve got this return :

downloading ssh2-1.1.2.tgz ...
Starting to download ssh2-1.1.2.tgz (32,057 bytes)
.........done: 32,057 bytes
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
6 source files, building
running: phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
libssh2 prefix? [autodetect] :
building in /tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2
running: /tmp/pear/temp/ssh2/configure --with-php-config=/usr/bin/php-config --with-ssh2
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 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 whether cc understands -c and -o together... yes
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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20180731
checking for PHP installed headers prefix... /usr/include/php/20180731
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for ssh2 support... yes, shared
checking for ssh2 files in default path... found in /usr
checking for libssh2_session_hostkey in -lssh2... yes
checking for libssh2_agent_init in -lssh2... yes
checking for libssh2_session_set_timeout in -lssh2... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %sn
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) 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
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/ssh2 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/include -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/main -I/tmp/pear/temp/ssh2 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/ssh2/ssh2.c -o ssh2.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/ssh2 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/include -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/main -I/tmp/pear/temp/ssh2 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/ssh2/ssh2.c  -fPIC -DPIC -o .libs/ssh2.o
/bin/bash /tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/ssh2 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/include -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/main -I/tmp/pear/temp/ssh2 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c -o ssh2_fopen_wrappers.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/ssh2 -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/include -I/tmp/pear/temp/pear-build-root2GcW3z/ssh2-1.1.2/main -I/tmp/pear/temp/ssh2 -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c  -fPIC -DPIC -o .libs/ssh2_fopen_wrappers.o
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wraper_parse_path':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
  if (strncmp(resource->scheme, "ssh2.", sizeof("ssh2.") - 1)) {
  ^
In file included from /usr/include/php/20180731/main/php_config.h:2623:0,
                 from /usr/include/php/20180731/main/php.h:32,
                 from /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:25:
/usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'struct zend_string *'
 extern size_t strlen (const char *__s)
               ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of '__builtin_strlen' from incompatible pointer type [enabled by default]
  if (strncmp(resource->scheme, "ssh2.", sizeof("ssh2.") - 1)) {
  ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of '__builtin_strlen' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:236:2: warning: passing argument 1 of 'strncmp' from incompatible pointer type [enabled by default]
In file included from /usr/include/php/20180731/main/php_config.h:2623:0,
                 from /usr/include/php/20180731/main/php.h:32,
                 from /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:25:
/usr/include/string.h:147:12: note: expected 'const char *' but argument is of type 'struct zend_string *'
 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
            ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: warning: passing argument 1 of '__builtin_strlen' from incompatible pointer type [enabled by default]
  if (strcmp(resource->scheme + sizeof("ssh2.") - 1, type)) {
  ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: warning: passing argument 1 of '__builtin_strlen' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [enabled by default]
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:242:2: note: expected 'const char *' but argument is of type 'struct zend_string *'
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:256:4: warning: assignment from incompatible pointer type [enabled by default]
  s = resource->path;
    ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:257:2: warning: passing argument 2 of 'strstr' from incompatible pointer type [enabled by default]
  resource->path = estrdup(strstr(path, resource->path));
  ^
In file included from /usr/include/php/20180731/main/php_config.h:2623:0,
                 from /usr/include/php/20180731/main/php.h:32,
                 from /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:25:
/usr/include/string.h:342:14: note: expected 'const char *' but argument is of type 'struct zend_string *'
 extern char *strstr (const char *__haystack, const char *__needle)
              ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:257:17: warning: assignment from incompatible pointer type [enabled by default]
  resource->path = estrdup(strstr(path, resource->path));
                 ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:261:4: warning: assignment from incompatible pointer type [enabled by default]
  s = resource->host;
    ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:312:24: error: invalid operands to binary == (have 'zend_string' and 'int')
  if (resource->host[0] == 0 && context && psftp &&
                        ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:326:24: error: invalid operands to binary == (have 'zend_string' and 'int')
  if (resource->host[0] == 0 && context &&
                        ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:402:3: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
   int len = strlen(resource->user);
   ^
In file included from /usr/include/php/20180731/main/php_config.h:2623:0,
                 from /usr/include/php/20180731/main/php.h:32,
                 from /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:25:
/usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'struct zend_string *'
 extern size_t strlen (const char *__s)
               ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:405:13: warning: assignment from incompatible pointer type [enabled by default]
    username = resource->user;
             ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:411:3: warning: passing argument 1 of 'strlen' from incompatible pointer type [enabled by default]
   int len = strlen(resource->pass);
   ^
In file included from /usr/include/php/20180731/main/php_config.h:2623:0,
                 from /usr/include/php/20180731/main/php.h:32,
                 from /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:25:
/usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'struct zend_string *'
 extern size_t strlen (const char *__s)
               ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:414:13: warning: assignment from incompatible pointer type [enabled by default]
    password = resource->pass;
             ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:425:2: warning: passing argument 1 of 'php_ssh2_session_connect' from incompatible pointer type [enabled by default]
  session = php_ssh2_session_connect(resource->host, resource->port, methods, callbacks);
  ^
In file included from /tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:26:0:
/tmp/pear/temp/ssh2/php_ssh2.h:151:18: note: expected 'char *' but argument is of type 'struct zend_string *'
 LIBSSH2_SESSION *php_ssh2_session_connect(char *host, int port, zval *methods, zval *callbacks);
                  ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_shell_open':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:530:7: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'struct zend_string *' [-Wformat=]
       php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", key, Z_STRVAL(copyval));
       ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wrapper_shell':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:634:4: warning: assignment from incompatible pointer type [enabled by default]
  s = resource->path ? resource->path : NULL;
    ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_exec_command':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:769:7: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'struct zend_string *' [-Wformat=]
       php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", key, Z_STRVAL(copyval));
       ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wrapper_exec':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:881:2: warning: passing argument 3 of 'php_ssh2_exec_command' from incompatible pointer type [enabled by default]
  stream = php_ssh2_exec_command(session, resource_id, resource->path + 1, terminal, terminal_len, environment, width, height, type);
  ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:737:20: note: expected 'char *' but argument is of type 'struct zend_string *'
 static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, int resource_id, char *command, char *term, int term_len, zval *environment, long width, long height, long type)
                    ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wrapper_scp':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1024:2: warning: passing argument 3 of 'php_ssh2_scp_xfer' from incompatible pointer type [enabled by default]
  stream = php_ssh2_scp_xfer(session, resource_id, resource->path);
  ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:970:20: note: expected 'char *' but argument is of type 'struct zend_string *'
 static php_stream *php_ssh2_scp_xfer(LIBSSH2_SESSION *session, int resource_id, char *filename)
                    ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wrapper_tunnel':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1265:42: error: invalid operands to binary == (have 'zend_string' and 'int')
  if (resource->path && resource->path[0] == '/') {
                                          ^
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1268:8: warning: assignment from incompatible pointer type [enabled by default]
   host = resource->path + 1;
        ^
make: *** [ssh2_fopen_wrappers.lo] Error 1
ERROR: `make' failed

Does some one have an idea how to troubleshoot this ?

Thanks,

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


Closed

aripringle opened this issue

Sep 8, 2015

· 10 comments

Comments

@aripringle

As of the 1.13.0 release, I can’t install this package using pecl. I’ve tested this on a CentOS 6 system running PHP 5.5.27 and a Debian system running PHP 5.6.13. I can still install the 1.12.5 release successfully. I get the following error:

make: *** No rule to make target '/tmp/pear/temp/zip/php_zip.c', needed by 'php_zip.lo'.  Stop.

Here’s full output:

pecl install zip
downloading zip-1.13.0.tgz …
Starting to download zip-1.13.0.tgz (312,531 bytes)
………done: 312,531 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
building in /tmp/pear/temp/pear-build-defaultuserkRfp7a/zip-1.13.0
running: /tmp/pear/temp/zip/configure
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 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 whether cc understands -c and -o together… yes
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-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for PHP prefix… /usr/local
checking for PHP includes… -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory… /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix… /usr/local/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… re2c
checking for re2c version… 0.13.5 (ok)
checking for gawk… no
checking for nawk… nawk
checking if nawk is broken… no
checking for zip archive read/writesupport… yes, shared
checking for the location of libz… no
checking pcre install prefix… no
checking libzip… no
checking for the location of zlib… /usr
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 stdbool.h usability… yes
checking stdbool.h presence… yes
checking for stdbool.h… yes
checking fts.h usability… yes
checking fts.h presence… yes
checking for fts.h… yes
checking for int8_t… yes
checking for int16_t… yes
checking for int32_t… yes
checking for int64_t… yes
checking for uint8_t… yes
checking for uint16_t… yes
checking for uint32_t… yes
checking for uint64_t… yes
checking for ssize_t… yes
checking size of short… 2
checking size of int… 4
checking size of long… 8
checking size of long long… 8
checking size of off_t… 8
checking size of size_t… 8
checking for touch… /usr/bin/touch
checking for unzip… no
checking whether struct tm is in sys/time.h or time.h… time.h
checking for struct tm.tm_zone… yes
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 dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking the maximum length of command line arguments… 1966080
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
configure: creating ./config.status
config.status: creating config.h
running: make
make: *** No rule to make target ‘/tmp/pear/temp/zip/php_zip.c’, needed by ‘php_zip.lo’. Stop.
ERROR: `make’ failed

@remicollet

Can you test if dd594c3 fix this issue.

from a git clone of this repo

 pecl package
 pecl install /path/to/zip-1.13.0.tgz

@aripringle

That seems to have taken care of it. Thank you!

@remicollet

zip 1.13.1 is released, should install cleanly.

@aripringle

Sorry, I should have tested on both of my systems. It installs fine on my CentOS system w/ PHP 5.5.27, but my Debian system (running PHP 5.6.13 in a docker container) is now failing with a new error. Full output below:

pecl install zip
downloading zip-1.13.1.tgz …
Starting to download zip-1.13.1.tgz (312,567 bytes)
………………………………………………………..done: 312,567 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
building in /tmp/pear/temp/pear-build-defaultuserRDvylc/zip-1.13.1
running: /tmp/pear/temp/zip/configure
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 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 whether cc understands -c and -o together… yes
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-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for PHP prefix… /usr/local
checking for PHP includes… -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory… /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix… /usr/local/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… re2c
checking for re2c version… 0.13.5 (ok)
checking for gawk… no
checking for nawk… nawk
checking if nawk is broken… no
checking for zip archive read/writesupport… yes, shared
checking for the location of libz… no
checking pcre install prefix… no
checking libzip… no
checking for the location of zlib… /usr
checking PHP version… PHP 5.x
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 stdbool.h usability… yes
checking stdbool.h presence… yes
checking for stdbool.h… yes
checking fts.h usability… yes
checking fts.h presence… yes
checking for fts.h… yes
checking for int8_t… yes
checking for int16_t… yes
checking for int32_t… yes
checking for int64_t… yes
checking for uint8_t… yes
checking for uint16_t… yes
checking for uint32_t… yes
checking for uint64_t… yes
checking for ssize_t… yes
checking size of short… 2
checking size of int… 4
checking size of long… 8
checking size of long long… 8
checking size of off_t… 8
checking size of size_t… 8
checking for touch… /usr/bin/touch
checking for unzip… no
checking whether struct tm is in sys/time.h or time.h… time.h
checking for struct tm.tm_zone… yes
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 dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking the maximum length of command line arguments… 1966080
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
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserRDvylc/zip-1.13.1/libtool —mode=compile cc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserRDvylc/zip-1.13.1/include -I/tmp/pear/temp/pear-build-defaultuserRDvylc/zip-1.13.1/main -I/tmp/pear/temp/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/zip/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/zip/php5/php_zip.c -o php5/php_zip.lo
/tmp/pear/temp/pear-build-defaultuserRDvylc/zip-1.13.1/libtool: line 1283: php5/php_zip.loT: No such file or directory
mkdir php5/.libs
mkdir: cannot create directory ‘php5/.libs’: No such file or directory
Makefile:181: recipe for target ‘php5/php_zip.lo’ failed
make: *** [php5/php_zip.lo] Error 1
ERROR: `make’ failed

@remicollet

I’ve unreleased the 1.13.1

Please try from the git snapshot on debian, should be fixed by 041e4fb

I will release 1.13.1 after your test.

@aripringle

Still looks like the same error from a fresh clone. I confirmed that your change in 041e4fb is present in the package I’m trying to install. Let me know if you need any more information about the system I’m trying it on. Here’s the error:

running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserVLMuU3/zip-1.13.1/libtool —mode=compile cc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserVLMuU3/zip-1.13.1/include -I/tmp/pear/temp/pear-build-defaultuserVLMuU3/zip-1.13.1/main -I/tmp/pear/temp/zip -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/zip/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/zip/php5/php_zip.c -o php5/php_zip.lo
/tmp/pear/temp/pear-build-defaultuserVLMuU3/zip-1.13.1/libtool: line 1283: php5/php_zip.loT: No such file or directory
mkdir php5/.libs
mkdir: cannot create directory ‘php5/.libs’: No such file or directory
Makefile:181: recipe for target ‘php5/php_zip.lo’ failed
make: *** [php5/php_zip.lo] Error 1
ERROR: `make’ failed

@remicollet

@aripringle

Looks like it is now installing successfully on both systems. Thank you!

@remicollet

thanks for the feedback, and tests.

@remicollet

And just FYI, for CentOS, I hope you know binary packages exists in some good 3rd party repository, such as http://rpms.remirepo.net/ which can avoid you to rebuild everything.

2 participants

@remicollet

@aripringle

586 votes

0 answers

Get the solution ↓↓↓

Ubuntu 20.04 PHP 7.4

The server only installedApache2,MySQL,PHP and their dependences.

[email protected]:~$ sudo pecl install PDO PDO_MYSQL

Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
downloading PDO_MYSQL-1.0.2.tgz ...
Starting to download PDO_MYSQL-1.0.2.tgz (14,778 bytes)
...done: 14,778 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
building in /tmp/pear/temp/pear-build-root4OSLDd/PDO-1.0.3
running: /tmp/pear/temp/PDO/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
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 whether cc understands -c and -o together... yes
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/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-zts-20180731
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... yes
checking for re2c... re2c
checking for re2c version... 2.2 (ok)
checking for gawk... gawk
checking whether to enable PDO support... yes, shared
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 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
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-root4OSLDd/PDO-1.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root4OSLDd/PDO-1.0.3/include -I/tmp/pear/temp/pear-build-root4OSLDd/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/PDO/pdo.c -o pdo.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root4OSLDd/PDO-1.0.3/include -I/tmp/pear/temp/pear-build-root4OSLDd/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo.c  -fPIC -DPIC -o .libs/pdo.o

make: *** [Makefile:219: pdo.lo] Error 1
ERROR: `make' failed

2021-12-24

Write your answer


Share solution ↓

Additional Information:

Date the issue was resolved:

2021-12-24

Link To Source

Link To Answer
People are also looking for solutions of the problem: a non-numeric value encountered

Didn’t find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.


Similar questions

Find the answer in similar questions on our website.

Понравилась статья? Поделить с друзьями:
  • Pdr region does not exist как исправить
  • Pdr region does not exist error 25
  • Pdoexception sqlstate hy000 general error 2006 mysql server has gone away
  • Pdoexception sqlstate hy000 general error 1215 cannot add foreign key constraint
  • Pdo statement error