Phalcon install error on Centos : make: *** [phalcon.lo] Error 1 - php

I install all dependencies / requires for phalcon , and pull from git then when i run ./install i got theese errors :
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
/bin/sh /root/down/cphalcon/build/64bits/libtool --mode=compile gcc -I. -I/root/down/cphalcon/build/64bits -DPHP_ATOM_INC -I/root/down/cphalcon/build/64bits/include -I/root/down/cphalcon/build/64bits/main -I/root/down/cphalcon/build/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /root/down/cphalcon/build/64bits/phalcon.c -o phalcon.lo
libtool: compile: gcc -I. -I/root/down/cphalcon/build/64bits -DPHP_ATOM_INC -I/root/down/cphalcon/build/64bits/include -I/root/down/cphalcon/build/64bits/main -I/root/down/cphalcon/build/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /root/down/cphalcon/build/64bits/phalcon.c -fPIC -DPIC -o .libs/phalcon.o
/root/down/cphalcon/build/64bits/phalcon.c: In function ‘phalcon_array_unshift’:
/root/down/cphalcon/build/64bits/phalcon.c:6058: error: void value not ignored as it ought to be
make: *** [phalcon.lo] Error 1
What can i do ?

Make sure your PHP is 5+ then check if you have the latest version of these packages: php-devel php-mysqlnd gcc libtool.
If still no luck try to using PHP 5.5 and install the packages: php55-devel php55-mysqlnd.
And finally if you believe that the problem isn't with your machine configurations, checkout to branches 1.3.2 or 1.3.3 and try to install again.

Hopefully you got this figured out by now, but I just ran into the same issue. I'm using Ubuntu through VirtualBox.
The issue was that GCC ran out of memory, so I changed the allocated memory from 512MB to 1024MB, then I ran it again successfully.

Related

Azure + Debian + PHP8.1 trying to install sqlsrv_pdo and getting "error: `make` failed;

Trying to deploy a PHP Azure "App Service" app, which connects to a SQL Server database
I have to add the sqlsrv and sqlsrv_pdo packages by running pecl install pdo_sqlsrv and pecl install sqlsrv`
Other threads have mentioned adding apt-get install unixodbc-dev, I have done so, but it does not help
Here is the error I'm getting below
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-rootiNpTPo/pdo_sqlsrv-5.10.1/libtool --mode=compile g++ -I. -I/tmp/pear/temp/pdo_sqlsrv -I/tmp/pear/temp/pear-build-rootiNpTPo/pdo_sqlsrv-5.10.1/include -I/tmp/pear/temp/pear-build-rootiNpTPo/pdo_sqlsrv-5.10.1/main -I/tmp/pear/temp/pdo_sqlsrv -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/pdo_sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -I/usr/local/include/php/ext -std=c++11 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp -o pdo_dbh.lo -MMD -MF pdo_dbh.dep -MT pdo_dbh.lo
g++ -I. -I/tmp/pear/temp/pdo_sqlsrv -I/tmp/pear/temp/pear-build-rootiNpTPo/pdo_sqlsrv-5.10.1/include -I/tmp/pear/temp/pear-build-rootiNpTPo/pdo_sqlsrv-5.10.1/main -I/tmp/pear/temp/pdo_sqlsrv -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/pdo_sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -I/usr/local/include/php/ext -std=c++11 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp -MMD -MF pdo_dbh.dep -MT pdo_dbh.lo -fPIC -DPIC -o .libs/pdo_dbh.o
In file included from /tmp/pear/temp/pdo_sqlsrv/php_pdo_sqlsrv_int.h:23,
from /tmp/pear/temp/pdo_sqlsrv/pdo_dbh.cpp:24:
/tmp/pear/temp/pdo_sqlsrv/shared/core_sqlsrv.h:48:10: fatal error: config.h: No such file or directory
48 | #include "config.h"
| ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:205: pdo_dbh.lo] Error 1
ERROR: `make' failed
I was expecting the pecl package to run... actually I was expecting the Microsoft App Service linux box to support MS Sql Server by default, but you get what I'm saying
Okay, after 3 days of messing around with this, I found a solution
Azure doesn't have sudo command... but in order to install pecl packages, you MUST run su -
su -
pecl install pdo_sqlsrv
pecl install sqlsrv
cp /home/site/wwwroot/azure/custom_php.ini /usr/local/etc/php/conf.d/;
exit;
service nginx reload;
The contents of my custom_php.ini file are
extension=pdo_sqlsrv.so
extension=sqlsrv.so
NOTE:
For Azure, I had to create a .sh file in my project and run all this from Home > My App > Configuration > General Settings > Startup Command - so that it'd be ran every time a new server is instantiated
NOTE 2: I also had to make changes to the nginx /etc/nginx/sites-enabled/default file, which moved the root of my project to /home/site/wwwroot/public - but that's laravel specific

fatal error: 'php.h' file not found when running make on xdebug in MacOS

I try to get Xdebug ready on my Mac to use for PHP development, I inputed the output of phpinfo() in the official Wizard and followed the instructions. phpize worked, running ./configure also works, but I'm stuck at the make command which outputs:
Makefile:230: warning: overriding commands for target `test'
Makefile:134: warning: ignoring old commands for target `test'
/bin/sh ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/libtool --mode=compile cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -o xdebug.lo
mkdir .libs
cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -fno-common -DPIC -o .libs/xdebug.o
~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c:25:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
1 error generated.
make: *** [xdebug.lo] Error 1
I tried to install the php-dev package through brew, but it does not exist. How to fix this issue?
It is because OSX doesn't install the PHP headers that extensions require when they are being compiled. I think you're using the OSX provided PHP.
You should instead use homebrew to install PHP, which would also install the headers, and then you can install Xdebug (and other extensions).
There are excellent instructions in this answer.

Installing sqlsrv extension on centos with multiple php versions

We are running php on a machine with Centos7, running multiple php versions and we need to install the sql server drivers and are running with the following errors.
we have tried running pecl from the 7.3 php location but it reverts midway to the default pecl instance for the machine, which is 5.6 and fails to complete the task.
running: make
/bin/sh /var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/var/tmp/sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/include -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/main -I/var/tmp/sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /var/tmp/sqlsrv/conn.cpp -o conn.lo
libtool: compile: g++ -std=c++11 -I. -I/var/tmp/sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/include -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/main -I/var/tmp/sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /var/tmp/sqlsrv/conn.cpp -fPIC -DPIC -o .libs/conn.o
In file included from /var/tmp/sqlsrv/php_sqlsrv_int.h:25:0,
from /var/tmp/sqlsrv/conn.cpp:24:
/var/tmp/sqlsrv/shared/core_sqlsrv.h:2390:38: error: macro "ZVAL_STRINGL" requires 4 arguments, but only 3 given
ZVAL_STRINGL(value_z, str, str_len);
^
/var/tmp/sqlsrv/shared/core_sqlsrv.h:2437:54: error: macro "add_assoc_string" requires 4 arguments, but only 3 given
int zr = ::add_assoc_string(array_z, key, val);
how do we tell pecl to do the whole procedure in php 7.3 so it can run propperly??
We noticed a week ago that we were missing some pdo php drivers, we installed them via yum and then we succesfully connected the machine to sqlserver

PDO OCI8 2.0.0, Error while compiling on centos linux 6.5

I am new on Linux. I am compiling PDO oci8 for Oracle on PHP 5.6. And I am using 12.1 instant client for Oracle.
I am following this link to install.
http://shiki.me/blog/installing-pdo_oci-and-oci8-php-extensions-on-centos-6-4-64bit/
But on make command I am facing lots of errors.
running: make
/bin/sh /var/tmp/pear-build-rootra3mow/oci8-2.0.0/libtool --mode=compile cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/include -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/main -I/var/tmp/oci8 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -o oci8.lo
libtool: compile: cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/include -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/main -I/var/tmp/oci8 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -fPIC -DPIC -o .libs/oci8.o
In file included from /usr/include/php/Zend/zend_config.h:1,
from /usr/include/php/Zend/zend.h:51,
from /usr/include/php/main/php.h:35,
from /var/tmp/oci8/oci8.c:35:
/usr/include/php/main/../main/php_config.h:1230: error: expected ë=í, ë,í, ë;í, ëasmí or ë__attribute__í before ëHAVE_OCI8_DTRACEí
There are some other errors. I will upload if needed.
Please help, Every type of help will be appreciated.
Thanks in advance.
The main problem would be downloading PDO_OCI from PECL. This, similar to other DB's PDO drivers, is obsoleted and you must use the PDO_OCI code from a PHP source bundle.
I'd strongly recommend using OCI8 instead of PDO_OCI. OCI8 has all sorts of things like connection pooling, statement caching etc.

How do I upgrade intl extension to ICU 4+ on OS X 10.7 Lion with PHP 5.3.8-ZS5.5.0

I am running OS X 10.7 Lion with Zend Server CE 5.5 (and therefore PHP 5.3.8). When I try to setup a new Symfony2 project the configuration checker warns me to upgrade the intl extension to ICU 4+.
I followed the instructions I found in another StackOverflow Post, mainly this blog post about upgrading intl on Lion. But when I try to compile the extension with PHP 5.3.8. I get the following error:
$ make
/bin/sh /Users/Florian/Downloads/php-5.3.8/ext/intl/libtool --mode=compile cc -I/usr/local/include -I. -I/Users/Florian/Downloads/php-5.3.8/ext/intl -DPHP_ATOM_INC -I/Users/Florian/Downloads/php-5.3.8/ext/intl/include -I/Users/Florian/Downloads/php-5.3.8/ext/intl/main -I/Users/Florian/Downloads/php-5.3.8/ext/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c -o php_intl.lo
mkdir .libs
cc -I/usr/local/include -I. -I/Users/Florian/Downloads/php-5.3.8/ext/intl -DPHP_ATOM_INC -I/Users/Florian/Downloads/php-5.3.8/ext/intl/include -I/Users/Florian/Downloads/php-5.3.8/ext/intl/main -I/Users/Florian/Downloads/php-5.3.8/ext/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c -fno-common -DPIC -o .libs/php_intl.o
/Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c:490: error: ‘PHP_FE_END’ undeclared here (not in a function)
make: *** [php_intl.lo] Error 1
I was able to compile intl.so with PHP 5.3.6 but when I put that file in my php_extensions directory, PHP does not recognize intl at all. I think in my last attempt I tried to compile it with ICU 4.0.1, but I also tried some other versions like 4.8.1 or 4.6.1. Is there any possibility to compile ICU with PHP 5.3.8 on 10.7 at the moment?
How much do you need Zend Server? If not at all, then you could try http://php-osx.liip.ch/ which comes with ext/intl and everything else you need for Symfony2

Categories