php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75841 Could not build pcntl extension
Submitted: 2018-01-18 12:57 UTC Modified: 2018-01-18 13:55 UTC
From: ptrkchn at gmail dot com Assigned:
Status: Closed Package: PCNTL related
PHP Version: 7.2.1 OS: ubuntu 16.04 4.4.0-104-generic
Private report: No CVE-ID: None
 [2018-01-18 12:57 UTC] ptrkchn at gmail dot com
Description:
------------
I've downloaded php-7.2.1 source from https://github.com/php/php-src/releases and I'm trying do build pcntl extension. Unfortunately "phpize7.2" and "configure" works but "make" gives error - "fatal error: php.h: No such file or directory"

Test script:
---------------
cd php-src-php-7.2.1/ext/pcntl
phpize7.2
./configure
make

Actual result:
--------------
╭─user@pc ~/php-src-php-7.2.1/ext/pcntl 
╰─$ php -v
PHP 7.2.1-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jan  5 2018 13:54:13) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.1-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
╭─user@pc ~/php-src-php-7.2.1/ext/pcntl 
╰─$ phpize7.2      
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
╭─user@pc ~/php-src-php-7.2.1/ext/pcntl  
╰─$ ./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-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
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-20151012
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... 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 pcntl support... yes, shared
checking for fork... yes
checking for waitpid... yes
checking for sigaction... yes
checking for getpriority... yes
checking for setpriority... yes
checking for wait3... yes
checking for wait4... yes
checking for sigprocmask... yes
checking for sigwaitinfo... yes
checking for sigtimedwait... yes
checking for siginfo_t... 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 how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-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 %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
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: config.h is unchanged
config.status: executing libtool commands
╭─user@pc ~/php-src-php-7.2.1/ext/pcntl  
╰─$ make
/bin/bash /home/user/php-src-php-7.2.1/ext/pcntl/libtool --mode=compile cc -DHAVE_STRUCT_SIGINFO_T -I. -I/home/user/php-src-php-7.2.1/ext/pcntl -DPHP_ATOM_INC -I/home/user/php-src-php-7.2.1/ext/pcntl/include -I/home/user/php-src-php-7.2.1/ext/pcntl/main -I/home/user/php-src-php-7.2.1/ext/pcntl -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  -DHAVE_CONFIG_H  -g -O2   -c /home/user/php-src-php-7.2.1/ext/pcntl/pcntl.c -o pcntl.lo 
libtool: compile:  cc -DHAVE_STRUCT_SIGINFO_T -I. -I/home/user/php-src-php-7.2.1/ext/pcntl -DPHP_ATOM_INC -I/home/user/php-src-php-7.2.1/ext/pcntl/include -I/home/user/php-src-php-7.2.1/ext/pcntl/main -I/home/user/php-src-php-7.2.1/ext/pcntl -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 -DHAVE_CONFIG_H -g -O2 -c /home/user/php-src-php-7.2.1/ext/pcntl/pcntl.c  -fPIC -DPIC -o .libs/pcntl.o
/home/user/php-src-php-7.2.1/ext/pcntl/pcntl.c:34:17: fatal error: php.h: No such file or directory
compilation terminated.
Makefile:193: recipe for target 'pcntl.lo' failed
make: *** [pcntl.lo] Error 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-18 13:55 UTC] ptrkchn at gmail dot com
-Status: Open +Status: Closed
 [2018-01-18 13:55 UTC] ptrkchn at gmail dot com
project must be configured by

./configure --with-php-config=/usr/bin/php-config7.2
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 13:01:24 2020 UTC