Bug #76381 [Com]: Getting fatal error over some header files missing
Edit report at https://bugs.php.net/bug.php?id=76381&edit=1
ID: 76381
Comment by: spam2 at rhsoft dot net
Reported by: mail at surjitsidhu dot com
Summary: Getting fatal error over some header files missing
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Ubuntu 16.04
PHP Version: 7.2.6
Block user comment: N
Private report: N
New Comment:
> 1.) There are some options that aren't used in PHP 7.2 anymore:
>
> configure: WARNING: unrecognized options: --disable-dependency-tracking,
> --enable-gd-native-ttf, --with-system-tzdata, --with-mcrypt
this is not entirely true:
--disable-dependency-tracking is a completly different thing
https://www.gnu.org/software/automake/manual/html_node/Dependency-Tracking.html
--with-system-tzdata was officially never supported by PHP but for decades distributions ship
patches - the same story was true over many years for "--with-gd=shared,%{_prefix}" while
in the meantime php upstream changed it's mind
the same for --with-libzip=%{_prefix} where the bundeled stuff is in the meantime even deprecated
and using system libzip is the preferred method
Previous Comments:
------------------------------------------------------------------------
[2018-05-30 04:41:56] peterkokot at gmail dot com
1.) There are some options that aren't used in PHP 7.2 anymore:
configure: WARNING: unrecognized options: --disable-dependency-tracking, --enable-gd-native-ttf,
--with-system-tzdata, --with-mcrypt
2.) There are two --libdir options (one is not needed)
3.) Imap and recode extensions can't work together. They can be built together with a bit of a
patch of php source code but it's best to avoid the imap extension in such cases.
4.) Add --with-libzip (because the bundled libzip library has been removed in PHP 7.3 version) - for
the future installations...
So the prerequisites for the Ubuntu 16.04:
apt-get update && apt-get install -y \
apt-utils \
wget \
xz-utils \
build-essential \
bison \
re2c \
libxml2-dev \
libssl-dev \
libpcre++-dev \
libsqlite3-dev \
libbz2-dev \
libcurl4-openssl-dev \
libdb5.3++-dev \
libdb-dev \
libsslcommon2-dev \
pkg-config \
libtokyocabinet-dev \
libenchant-dev \
libwebp-dev \
libjpeg-dev \
libpng-dev \
libxpm-dev \
libfreetype6-dev \
libgmp-dev \
libc-client-dev \
libkrb5-dev \
libldap2-dev \
libsasl2-dev \
libodbc1 \
unixodbc-dev \
libpq-dev \
libpspell-dev \
libedit-dev \
librecode-dev \
libsnmp-dev \
libtidy-dev \
libxslt-dev \
libgdbm-dev \
freetds-dev \
libzip-dev
And the adjusted configure options:
./configure --program-prefix= \
--prefix=/opt/pop/pop-php72/root/usr \
--exec-prefix=/opt/pop/pop-php72/root/usr \
--bindir=/opt/pop/pop-php72/root/usr/bin \
--sbindir=/opt/pop/pop-php72/root/usr/sbin \
--sysconfdir=/opt/pop/pop-php72/root/etc \
--datadir=/opt/pop/pop-php72/root/usr/share \
--includedir=/opt/pop/pop-php72/root/usr/include \
--libdir=/opt/pop/pop-php72/root/usr/lib64 \
--libexecdir=/opt/pop/pop-php72/root/usr/libexec \
--localstatedir=/opt/pop/pop-php72/root/usr/var \
--sharedstatedir=/opt/pop/pop-php72/root/usr/com \
--mandir=/opt/pop/pop-php72/root/usr/share/man \
--infodir=/opt/pop/pop-php72/root/usr/share/info \
--cache-file=../config.cache \
--with-config-file-path=/opt/pop/pop-php72/root/etc \
--with-config-file-scan-dir=/opt/pop/pop-php72/root/etc/php.d \
--disable-debug \
--with-pic \
--without-pear \
--with-bz2 \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--with-gettext \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-pcre-regex \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-sockets \
--with-kerberos \
--enable-shmop \
--with-libxml-dir=/usr \
--with-mhash \
--enable-pcntl \
--enable-opcache \
--disable-opcache-file \
--enable-phpdbg \
--enable-mbstring=shared \
--enable-mbregex \
--with-webp-dir=/usr \
--with-gd=shared \
--with-gmp=shared \
--enable-calendar=shared \
--enable-bcmath=shared \
--with-bz2=shared \
--enable-ctype=shared \
--enable-dba=shared \
--without-gdbm \
--with-db4 \
--with-tcadb=/usr \
--enable-exif=shared \
--enable-ftp=shared \
--with-gettext=shared \
--with-iconv=shared \
--enable-sockets=shared \
--enable-tokenizer=shared \
--with-xmlrpc=shared \
--with-ldap=shared \
--with-ldap-sasl \
--enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd \
--with-mysql-sock=/var/run/mysqld/mysqld.sock \
--enable-dom=shared \
--with-pgsql=shared \
--enable-simplexml=shared \
--enable-xml=shared \
--enable-wddx=shared \
--with-snmp=shared,/usr \
--enable-soap=shared \
--with-xsl=shared,/usr \
--enable-xmlreader=shared \
--enable-xmlwriter=shared \
--with-curl=shared \
--enable-pdo=shared \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,/usr \
--with-pdo-sqlite=shared,/usr \
--with-pdo-dblib=shared \
--with-sqlite3=shared,/usr \
--enable-json=shared \
--enable-zip=shared \
--with-libzip=/usr \
--without-readline \
--with-libedit \
--with-pspell=shared \
--enable-phar=shared \
--with-tidy=shared \
--enable-sysvmsg=shared \
--enable-sysvshm=shared \
--enable-sysvsem=shared \
--enable-shmop=shared \
--enable-posix=shared \
--with-unixODBC=shared,/usr \
--enable-intl=shared \
--with-icu-dir=/usr \
--with-enchant=shared,/usr \
--with-recode=shared,/usr \
--enable-fileinfo=shared \
--with-libdir=/lib/x86_64-linux-gnu
And this should go through with make then...
------------------------------------------------------------------------
[2018-05-27 14:42:03] mail at surjitsidhu dot com
./configure does not show any errors
./configure --program-prefix= \
--disable-dependency-tracking \
--prefix=/opt/pop/pop-php72/root/usr \
--exec-prefix=/opt/pop/pop-php72/root/usr \
--bindir=/opt/pop/pop-php72/root/usr/bin \
--sbindir=/opt/pop/pop-php72/root/usr/sbin \
--sysconfdir=/opt/pop/pop-php72/root/etc \
--datadir=/opt/pop/pop-php72/root/usr/share \
--includedir=/opt/pop/pop-php72/root/usr/include \
--libdir=/opt/pop/pop-php72/root/usr/lib64 \
--libexecdir=/opt/pop/pop-php72/root/usr/libexec \
--localstatedir=/opt/pop/pop-php72/root/usr/var \
--sharedstatedir=/opt/pop/pop-php72/root/usr/com \
--mandir=/opt/pop/pop-php72/root/usr/share/man \
--infodir=/opt/pop/pop-php72/root/usr/share/info \
--cache-file=../config.cache \
--with-libdir=/lib/x86_64-linux-gnu \
--with-config-file-path=/opt/pop/pop-php72/root/etc \
--with-config-file-scan-dir=/opt/pop/pop-php72/root/etc/php.d \
--disable-debug \
--with-pic \
--without-pear \
--with-bz2 \
--with-freetype-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--enable-gd-native-ttf \
--without-gdbm \
--with-gettext \
--with-iconv \
--with-jpeg-dir=/usr \
--with-openssl \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-sockets \
--with-kerberos \
--enable-shmop \
--with-libxml-dir=/usr \
--with-system-tzdata \
--with-mhash \
--libdir=/opt/pop/pop-php72/root/usr/lib64/php \
--enable-pcntl \
--enable-opcache \
--disable-opcache-file \
--enable-phpdbg \
--with-imap=shared,/opt/pop/pop-php72/root/usr \
--with-imap-ssl \
--enable-mbstring=shared \
--enable-mbregex \
--with-webp-dir=/usr \
--with-gd=shared \
--with-gmp=shared \
--enable-calendar=shared \
--enable-bcmath=shared \
--with-bz2=shared \
--enable-ctype=shared \
--enable-dba=shared \
--with-db4=/usr \
--with-tcadb=/usr \
--enable-exif=shared \
--enable-ftp=shared \
--with-gettext=shared \
--with-iconv=shared \
--enable-sockets=shared \
--enable-tokenizer=shared \
--with-xmlrpc=shared \
--with-ldap=shared \
--with-ldap-sasl \
--enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd \
--with-mysql-sock=/var/run/mysqld/mysqld.sock \
--enable-dom=shared \
--with-pgsql=shared \
--enable-simplexml=shared \
--enable-xml=shared \
--enable-wddx=shared \
--with-snmp=shared,/usr \
--enable-soap=shared \
--with-xsl=shared,/usr \
--enable-xmlreader=shared \
--enable-xmlwriter=shared \
--with-curl=shared \
--enable-pdo=shared \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,/usr \
--with-pdo-sqlite=shared,/usr \
--with-sqlite3=shared,/usr \
--enable-json=shared \
--enable-zip=shared \
--without-readline \
--with-libedit \
--with-pspell=shared \
--enable-phar=shared \
--with-mcrypt=shared \
--with-tidy=shared \
--enable-sysvmsg=shared \
--enable-sysvshm=shared \
--enable-sysvsem=shared \
--enable-shmop=shared \
--enable-posix=shared \
--with-unixODBC=shared,/usr \
--enable-intl=shared \
--with-icu-dir=/usr \
--with-enchant=shared,/usr \
--with-recode=shared,/usr \
--enable-fileinfo=shared
make
------------------------------------------------------------------------
[2018-05-27 14:14:37] cmb@php.net
What's your ./configure line, and does ./configure show some
errors?
------------------------------------------------------------------------
[2018-05-27 11:08:31] mail at surjitsidhu dot com
Description:
------------
/home/php-7.2.6/ext/pdo_odbc/pdo_odbc.c:28:25: fatal error: pdo/php_pdo.h: No such file or directory
compilation terminated.
Makefile:1749: recipe for target 'ext/pdo_odbc/pdo_odbc.lo' failed
make: *** [ext/pdo_odbc/pdo_odbc.lo] Error 1
Current 28 and 29 lines
#include "pdo/php_pdo.h"
#include "pdo/php_pdo_driver.h"
After below changes it works
#include "ext/pdo/php_pdo.h"
#include "ext/pdo/php_pdo_driver.h"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76381&edit=1
Thread (7 messages)