Project

General

Profile

Bug #5234

SVN Trunk 89: Cannot build against PHP 5.3.3 with embed enabled

Added by Anonymous over 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Alexey Klyukin
Target version:
Start date:
07/21/2010
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

./configure

AFTER config as above:

checking whether PHP is compiled with the Embed SAPI... yes
checking for php_module_startup in -lphp5... no
configure: error: Cannot find PHP 5 SAPI library

OS: CentOS 5.5


Files

config.log (13.9 KB) config.log Log of ./configure Anonymous, 07/29/2010 05:08 AM
config.log (15.5 KB) config.log plphp config.log Moisés P. Sena, 08/01/2010 02:01 PM

Related issues

Has duplicate PL/php - Bug #5233: SVN Trunk 89: Cannot build against PHP 5.3.2 with embed enabledClosed07/21/2010

Actions
#1

Updated by Alexey Klyukin over 14 years ago

From the attached config.log

configure:3679: checking whether PHP is compiled with the Embed SAPI
configure:3687: result: no
configure:3691: error: PL/php requires the Embed PHP SAPI.

Looks like you haven't enabled embed sapi when building php. If you did enable it - please, show the output of:
/usr/local/bin/php-config --configure-options and
/usr/local/bin/php-config --php-sapis

#2

Updated by Álvaro Herrera over 14 years ago

I've been discussing a similar case with another user by private email. It seems that the ldflags passed to the compiler are not correctly determined by configure when running this check.

I notice that configure.in appends $(php-config --libs) to LDFLAGS, but this is probably missing something; at least the output of --ldflags should be appended also, I think. On my platform it doesn't make a difference becase --ldflags returns an empty string, but this doesn't have to be necessarily the case.

Even with this fix, there's something wrong, but I'm not sure what. Seems to be we should have a closer look at compiler and linker flags. (For example, should --libs really be part of LDFLAGS, or does it belong elsewhere?)

#3

Updated by Moisés P. Sena over 14 years ago

Anônimo wrote:

./configure

AFTER config as above:

checking whether PHP is compiled with the Embed SAPI... yes
checking for php_module_startup in -lphp5... no
configure: error: Cannot find PHP 5 SAPI library

OS: CentOS 5.5

The my php-config result:

  1. php-config
    Usage:
    /usr/local/bin/php-config
    [OPTION]
    Options:

--prefix
[/usr/local]

--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]

--ldflags
[
-L/opt/xml2/lib
-L/opt/pcre/lib
-L/opt/curlssl/lib
-L/usr/kerberos/lib
-L/opt/curlssl//lib
-L/opt/php_with_imap_client//lib
-L/opt/firebird//lib
-L/opt/libmcrypt//lib
-L/usr/lib/mysql
-L/opt/mm//lib
-L/opt/tidy//lib
-L/opt/xslt/lib
-L/opt/xslt//lib
-L/usr/lib]

--libs
[-lcrypt
-lc-client
-lz
-lexslt
-lexpat
-lexpat
-lexpat
-ltidy
-lcrypt
-lmm
-laspell
-lpspell
-lpq
-lmysqlclient
-lmcrypt
-lltdl
-lfbclient
-lssl
-lcrypto
-lcrypt
-lpam
-lfreetype
-lX11
-lXpm
-lpng
-lz
-ljpeg
-lssl
-lcrypto
-lcurl
-lbz2
-lz
-lpcre
-lssl
-lcrypto
-lm
-ldl
-lnsl
-lxml2
-lz
-lm
-lgssapi_krb5
-lkrb5
-lk5crypto
-lcom_err
-lcurl
-lidn
-lssl
-lcrypto
-lldap
-lrt
-lssl
-lcrypto
-ldl
-lz
-lz
-lxml2
-lz
-lm
-lgssapi_krb5
-lkrb5
-lk5crypto
-lcom_err
-licui18n
-licuuc
-licudata
-lm
-licuio
-lmysqlclient
-lz
-lcrypt
-lnsl
-lm
-lmygcc
-lxml2
-lz
-lm
-lxml2
-lz
-lm
-lcrypt
-lxml2
-lz
-lm
-lxml2
-lz
-lm
-lxslt
-lxml2
-lz
-lm
-lcrypt
]

--extension-dir
[/usr/local/lib/php/extensions/no-debug-non-zts-20090626]

--include-dir
[/usr/local/include/php]

--php-binary
[/usr/local/bin/php]

--php-sapis
[cli
apache2handler]

--configure-options
[--enable-bcmath
--enable-calendar
--enable-exif
--enable-ftp
--enable-gd-native-ttf
--enable-intl
--enable-libxml
--enable-magic-quotes
--enable-mbstring
--enable-pdo=shared
--enable-safe-mode
--enable-soap
--enable-sockets
--enable-wddx
--enable-zip
--prefix=/usr/local
--with-apxs2=/usr/local/apache/bin/apxs
--with-bz2
--with-config-file-path=/usr/local/lib
--with-config-file-scan-dir=/usr/local/lib/php.ini.d
--with-curl=/opt/curlssl/
--with-curlwrappers
--with-freetype-dir=/usr
--with-gd
--with-gettext
--with-icu-dir=/usr
--with-imap=/opt/php_with_imap_client/
--with-imap-ssl=/usr
--with-interbase=/opt/firebird/
--with-jpeg-dir=/usr
--with-kerberos
--with-libexpat-dir=/usr
--with-libxml-dir=/opt/xml2
--with-libxml-dir=/opt/xml2/
--with-mcrypt=/opt/libmcrypt/
--with-mm=/opt/mm/
--with-mysql=/usr
--with-mysql-sock=/var/lib/mysql/mysql.sock
--with-mysqli=/usr/bin/mysql_config
--with-openssl=/usr
--with-openssl-dir=/usr
--with-pcre-regex=/opt/pcre
--with-pdo-mysql=shared
--with-pdo-sqlite=shared
--with-pgsql=/usr
--with-png-dir=/usr
--with-pspell
--with-sqlite=shared
--with-tidy=/opt/tidy/
--with-xmlrpc
--with-xpm-dir=/usr
--with-xsl=/opt/xslt/
--with-zlib
--with-zlib-dir=/usr]

--version
[5.3.3]

--vernum
[50303]

#4

Updated by Alexey Klyukin over 14 years ago

On Jul 29, 2010, at 10:21 AM, wrote:

Issue #5234 has been updated by Moisés P. Sena.

Anônimo wrote:

./configure

AFTER config as above:

checking whether PHP is compiled with the Embed SAPI... yes
checking for php_module_startup in -lphp5... no
configure: error: Cannot find PHP 5 SAPI library

OS: CentOS 5.5

The my php-config result:

<snip>

--php-sapis
[cli
apache2handler]

See, there's no embed here. You have to build php with --enable-embed and retry.

--configure-options
[--enable-bcmath
--enable-calendar
--enable-exif
--enable-ftp
--enable-gd-native-ttf
--enable-intl
--enable-libxml
--enable-magic-quotes
--enable-mbstring
--enable-pdo=shared
--enable-safe-mode
--enable-soap
--enable-sockets
--enable-wddx
--enable-zip
--prefix=/usr/local
--with-apxs2=/usr/local/apache/bin/apxs
--with-bz2
--with-config-file-path=/usr/local/lib
--with-config-file-scan-dir=/usr/local/lib/php.ini.d
--with-curl=/opt/curlssl/
--with-curlwrappers
--with-freetype-dir=/usr
--with-gd
--with-gettext
--with-icu-dir=/usr
--with-imap=/opt/php_with_imap_client/
--with-imap-ssl=/usr
--with-interbase=/opt/firebird/
--with-jpeg-dir=/usr
--with-kerberos
--with-libexpat-dir=/usr
--with-libxml-dir=/opt/xml2
--with-libxml-dir=/opt/xml2/
--with-mcrypt=/opt/libmcrypt/
--with-mm=/opt/mm/
--with-mysql=/usr
--with-mysql-sock=/var/lib/mysql/mysql.sock
--with-mysqli=/usr/bin/mysql_config
--with-openssl=/usr
--with-openssl-dir=/usr
--with-pcre-regex=/opt/pcre
--with-pdo-mysql=shared
--with-pdo-sqlite=shared
--with-pgsql=/usr
--with-png-dir=/usr
--with-pspell
--with-sqlite=shared
--with-tidy=/opt/tidy/
--with-xmlrpc
--with-xpm-dir=/usr
--with-xsl=/opt/xslt/
--with-zlib
--with-zlib-dir=/usr]

--version
[5.3.3]

--vernum
[50303]

----------------------------------------
Bug #5234: SVN Trunk 89: Cannot build against PHP 5.3.3 with embed enabled
https://public.commandprompt.com/issues/5234

Author: Anonymous
Status: New
Priority: Urgent
Assigned to:
Category:
Target version: Release 1.4
Resolution:

./configure

AFTER config as above:

checking whether PHP is compiled with the Embed SAPI... yes
checking for php_module_startup in -lphp5... no
configure: error: Cannot find PHP 5 SAPI library

OS: CentOS 5.5

--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://redmine.commandprompt.com/my/account

#5

Updated by Álvaro Herrera over 14 years ago

Alexey Klyukin wrote:

On Jul 29, 2010, at 10:21 AM, wrote:

Issue #5234 has been updated by Moisés P. Sena.

Anônimo wrote:

./configure

AFTER config as above:

checking whether PHP is compiled with the Embed SAPI... yes
checking for php_module_startup in -lphp5... no
configure: error: Cannot find PHP 5 SAPI library

<snip>

--php-sapis
[cli
apache2handler]

See, there's no embed here. You have to build php with --enable-embed and retry.

So why did the other test pass? Shouldn't it have said "no"?

#6

Updated by Álvaro Herrera over 14 years ago

  • Assignee set to Alexey Klyukin
#7

Updated by Moisés P. Sena over 14 years ago

I compile php on embeded, outher error show:

checking whether PHP is compiled with the Embed SAPI... yes
checking for php_module_startup in -lphp5... no
configure: error: Cannot find PHP 5 SAPI library

The php config:
# php-config
Usage: /usr/local/bin/php-config [OPTION]
Options:
  --prefix            [/usr/local]
  --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]
  --ldflags           [ -L/opt/xml2/lib -L/opt/pcre/lib64 -L/opt/curlssl/lib -L/usr/kerberos/lib -L/opt/curlssl//lib64 -L/opt/php_with_imap_client//lib64 -L/opt/libmcrypt//lib64 -L/usr/lib64/mysql -L/opt/mm//lib64 -L/opt/tidy//lib64 -L/opt/xslt/lib -L/opt/xslt//lib64 -L/usr/lib64]
  --libs              [-lcrypt  -lc-client  -lz -lexslt -lexpat -lexpat -lexpat -ltidy -lcrypt -lmm -lpq -lmysqlclient -lmcrypt -lltdl -lssl -lcrypto -lcrypt -lpam -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lssl -lcrypto -lcurl -lbz2 -lz -lpcre -lssl -lcrypto -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lidn -lssl -lcrypto -lldap -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -licui18n -licuuc -licudata -lm -licuio -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt ]
  --extension-dir     [/usr/local/lib/php/extensions/no-debug-non-zts-20090626]
  --include-dir       [/usr/local/include/php]
  --php-binary        [/usr/local/bin/php]
  --php-sapis         [cli embed]
  --configure-options [--enable-bcmath --enable-calendar --enable-embed --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-libxml --enable-magic-quotes --enable-mbstring --enable-pdo=shared --enable-safe-mode --enable-soap --enable-sockets --enable-wddx --enable-zip --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-bz2 --with-curl=/opt/curlssl/ --with-curlwrappers --with-freetype-dir=/usr --with-gd --with-gettext --with-icu-dir=/usr --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libdir=lib64 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2 --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mm=/opt/mm/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pgsql=/usr --with-pic --with-png-dir=/usr --with-sqlite=shared --with-tidy=/opt/tidy/ --with-xmlrpc --with-xpm-dir=/usr --with-xsl=/opt/xslt/ --with-zlib --with-zlib-dir=/usr]
  --version           [5.3.3]
  --vernum            [50303]

The config.log has anexed.

#8

Updated by Álvaro Herrera over 14 years ago

Please grab the latest head from the Github repository -- I fixed the autoconf code there.

(Subversion is no longer the authoritative source. I bugged the sysadmins to remove the repository or change it to point to github, but nothing has gotten done yet, it seems.)

#9

Updated by Álvaro Herrera over 13 years ago

I guess it takes a really long time to clone Git repositories. If we get a report before the world ends next year, we can reopen this ticket.

#10

Updated by Álvaro Herrera over 13 years ago

  • Status changed from New to Closed

Apparently I forgot to actually close the ticket.

Also available in: Atom PDF