You are not logged in.

#1 2010-04-07 14:39:35

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

[solved] PHC - phpcompiler : missing php header files (?)

after building numerous packages myself I got stuck on building phc. I currently have this PKGUILD

# Maintainer: Spider.007 <archPackage@spider007.net>
# Contributor: Spider.007 <archPackage@spider007.net>
pkgname=phc
pkgver=0.2.0.3
pkgrel=1
pkgdesc="an open source compiler for PHP"
arch=('any')
url="http://www.phpcompiler.org/"
license=('bsd')
depends=(php-embed)
source=("http://www.phpcompiler.org/src/archive/phc-$pkgver.tar.gz")
md5sums=('8b7a70ca6fb6720fa7eceed161a61729')

build() {
  cd $startdir/src/$pkgname-$pkgver
  sed -i 's/<sapi\/embed\/php_embed.h>/<php\/sapi\/embed\/php_embed.h>/g' configure
  ./configure --prefix=/usr
  make || return 1

  make DESTDIR=$startdir/pkg install
}

I added the sed line so the configure checks found the header file, but that seems to have some dependencies as well:

configure:20275: checking for sapi/embed/php_embed.h
configure:20297: gcc -c -isystem/usr/local/include/php -isystem/usr/local/include/php/main -isystem/usr/local/include/php/TSRM -isystem/usr/local/include/php/Zend -march=i686 -mtune=generic -O2 -pipe  conftest.c >&5
In file included from conftest.c:27:
/usr/include/php/sapi/embed/php_embed.h:23:22: error: main/php.h: No such file or directory
/usr/include/php/sapi/embed/php_embed.h:24:23: error: main/SAPI.h: No such file or directory
/usr/include/php/sapi/embed/php_embed.h:25:27: error: main/php_main.h: No such file or directory
/usr/include/php/sapi/embed/php_embed.h:26:32: error: main/php_variables.h: No such file or directory
/usr/include/php/sapi/embed/php_embed.h:27:26: error: main/php_ini.h: No such file or directory
/usr/include/php/sapi/embed/php_embed.h:28:22: error: zend_ini.h: No such file or directory
In file included from conftest.c:27:
/usr/include/php/sapi/embed/php_embed.h: In function 'BEGIN_EXTERN_C':
/usr/include/php/sapi/embed/php_embed.h:67: error: expected declaration specifiers before 'SAPI_API'
/usr/include/php/sapi/embed/php_embed.h:68: error: expected declaration specifiers before 'SAPI_API'
/usr/include/php/sapi/embed/php_embed.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sapi_module_struct'
/usr/include/php/sapi/embed/php_embed.h:70: error: expected declaration specifiers before 'END_EXTERN_C'
configure:20303: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "phc"
| #define PACKAGE_TARNAME "phc"
| #define PACKAGE_VERSION "0.2.0.3"
| #define PACKAGE_STRING "phc 0.2.0.3"
| #define PACKAGE_BUGREPORT "phc-general@phpcompiler.org"
| #define PACKAGE "phc"
| #define VERSION "0.2.0.3"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_BOOST
| #define PHP_INSTALL_PATH "/usr/local"
| #define HAVE_EMBED 1
| /* end confdefs.h.  */
|
|
|
| #include <php/sapi/embed/php_embed.h>
configure:20318: result: no

anyone want to help out?

Last edited by Spider.007 (2010-04-08 07:31:28)

Offline

#2 2010-04-07 15:25:06

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: [solved] PHC - phpcompiler : missing php header files (?)

Remove the sed line and try adding --with-php=/usr instead.

Offline

#3 2010-04-08 07:31:19

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: [solved] PHC - phpcompiler : missing php header files (?)

Pierre wrote:

Remove the sed line and try adding --with-php=/usr instead.

That works much better, thanks!

Offline

Board footer

Powered by FluxBB