php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76381 Getting fatal error over some header files missing
Submitted: 2018-05-27 11:08 UTC Modified: 2024-07-14 06:02 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: mail at surjitsidhu dot com Assigned: petk (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.2.6 OS: Ubuntu 16.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mail at surjitsidhu dot com
New email:
PHP Version: OS:

 

 [2018-05-27 11:08 UTC] 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"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-27 14:14 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2018-05-27 14:14 UTC] cmb@php.net
What's your `./configure` line, and does `./configure` show some
errors?
 [2018-05-27 14:42 UTC] 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-28 07:32 UTC] cmb@php.net
-Status: Feedback +Status: Open -Assigned To: cmb +Assigned To:
 [2018-05-30 04:41 UTC] 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-30 11:59 UTC] spam2 at rhsoft dot net
> 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
 [2024-07-14 06:02 UTC] petk@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: petk
 [2024-07-14 06:02 UTC] petk@php.net
This seems to be resolved in current PHP versions. In case you're still experiencing this issue, please reopen a bug at https://github.com/php/php-src/issues

Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC