php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58840 Compilation fails on OSX
Submitted: 2009-08-30 03:36 UTC Modified: 2009-08-30 14:16 UTC
From: wings774 at gmx dot net Assigned:
Status: Closed Package: zip (PECL)
PHP Version: 5.3.0 OS: OSX 10.6 Snow Leopard
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wings774 at gmx dot net
New email:
PHP Version: OS:

 

 [2009-08-30 03:36 UTC] wings774 at gmx dot net
Description:
------------
pecl command cannot compile, it fails with these errors:
command used: pecl install zip

Reproduce code:
---------------
downloading zip-1.10.2.tgz ...
Starting to download zip-1.10.2.tgz (236,912 bytes)
.................................................done: 236,912 bytes
61 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/zip-1.10.2
running: /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/configure
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 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... i686-apple-darwin10.0.0
checking host system type... i686-apple-darwin10.0.0
checking target system type... i686-apple-darwin10.0.0
checking for PHP prefix... /usr
checking for PHP includes... -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
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/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... no
checking for awk... awk
checking if awk is broken... no
checking for zip archive read/writesupport... yes, shared
checking for the location of libz... no
checking pcre install prefix... no
checking for the location of zlib... /usr
checking for ld used by cc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognise 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... 196608
checking command to parse /usr/bin/nm output from cc object... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
checking if cc static flag  works... rm: conftest.dSYM: is a directory
yes
checking if cc supports -fno-rtti -fno-exceptions... rm: conftest.dSYM: is a directory
no
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... rm: conftest.dSYM: is a directory
yes
checking if cc supports -c -o file.o... rm: conftest.dSYM: is a directory
yes
checking whether the cc linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.0.0 dyld
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/sh /private/var/tmp/pear-build-root/zip-1.10.2/libtool --mode=compile cc  -I. -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/zip-1.10.2/include -I/private/var/tmp/pear-build-root/zip-1.10.2/main -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip -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 /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c -o php_zip.lo
mkdir .libs
 cc -I. "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip" -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/zip-1.10.2/include -I/private/var/tmp/pear-build-root/zip-1.10.2/main "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip" -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 "/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c"  -fno-common -DPIC -o .libs/php_zip.o
In file included from /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:30:
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:30:
/usr/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_extract_file':
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:185: warning: passing argument 6 of 'php_basename' from incompatible pointer type
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_pcre':
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:601: error: 'pcre' undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:601: error: (Each undeclared identifier is reported only once
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:601: error: for each function it appears in.)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:601: error: 're' undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:602: error: 'pcre_extra' undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_add_from_pattern':
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/zip/php_zip.c:1636: warning: passing argument 6 of 'php_basename' from incompatible pointer type
make: *** [php_zip.lo] Error 1
ERROR: `make' failed



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-30 06:34 UTC] pierre dot php at gmail dot com
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory

is the problem. Be sure that you have enabled and installed the pcre extension (it should be enabled by default and can't be disabled.

Also please try with 5.3.0 final too.
 [2009-08-30 14:16 UTC] wings774 at gmx dot net
Installed the pcre from macports (it seems 10.6 osx doesn't 
have it), compilled fine and working fine. 
Also added the  CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64" 
to work with the 64 bit apache.
 [2012-10-24 15:58 UTC] qwerty at mailinator dot com
RHE4, php 5.2.0
pecl install zip fails as below

running: make
/bin/sh /tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/include -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/main -I/tmp/pear/temp/zip -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 /tmp/pear/temp/zip/php_zip.c -o php_zip.lo
mkdir .libs
 gcc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/include -I/tmp/pear/temp/pear-build-fourinttdN2JL/zip-1.10.2/main -I/tmp/pear/temp/zip -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 /tmp/pear/temp/zip/php_zip.c  -fPIC -DPIC -o .libs/php_zip.o
/tmp/pear/temp/zip/php_zip.c: In function `php_zip_extract_file':
/tmp/pear/temp/zip/php_zip.c:163: error: `CWD_EXPAND' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c:163: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/zip/php_zip.c:163: error: for each function it appears in.)
/tmp/pear/temp/zip/php_zip.c: At top level:
/tmp/pear/temp/zip/php_zip.c:715: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:715: error: (near initialization for `zip_functions[0].fname')
/tmp/pear/temp/zip/php_zip.c:715: error: syntax error before "ZEND_RAW_FENTRY"
/tmp/pear/temp/zip/php_zip.c:715: error: syntax error before ')' token
/tmp/pear/temp/zip/php_zip.c:716: warning: initialization makes integer from pointer without a cast
/tmp/pear/temp/zip/php_zip.c:716: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:716: error: (near initialization for `zip_functions[0]')
/tmp/pear/temp/zip/php_zip.c:716: warning: initialization from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:716: error: syntax error before ')' token
/tmp/pear/temp/zip/php_zip.c:717: warning: initialization from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:717: warning: initialization makes integer from pointer without a cast
/tmp/pear/temp/zip/php_zip.c:717: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:717: error: (near initialization for `zip_functions[1]')
/tmp/pear/temp/zip/php_zip.c:717: error: initializer element is not constant
/tmp/pear/temp/zip/php_zip.c:717: error: (near initialization for `zip_functions[2]')
/tmp/pear/temp/zip/php_zip.c:718: error: syntax error before '{' token
/tmp/pear/temp/zip/php_zip.c:1112: warning: initialization discards qualifiers from pointer target type
/tmp/pear/temp/zip/php_zip.c: In function `zm_startup_zip':
/tmp/pear/temp/zip/php_zip.c:2586: warning: assignment discards qualifiers from pointer target type
make: *** [php_zip.lo] Error 1
ERROR: `make' failed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 09 22:01:29 2024 UTC