php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9634 imap_*_quota not found
Submitted: 2001-03-08 14:11 UTC Modified: 2001-03-08 17:03 UTC
From: ignacio at openservices dot net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Latest CVS (08/03/2001) OS: RH Linux 6.2
Private report: No CVE-ID: None
 [2001-03-08 14:11 UTC] ignacio at openservices dot net
Last few lines of build:

/bin/sh /usr/src/redhat/BUILD/php-4.0.5dev_20010308/libtool --silent --mode=link gcc  -I. -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/ -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/main -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308 -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/Zend -I/usr/include/freetype -I/usr/include/imap -I/usr/local/include -I/opt/sybase-11.9.2/include -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/ext/xml/expat/xmltok -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/ext/xml/expat/xmlparse -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/TSRM  -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -O2 -m486 -fno-strength-reduce -fPIC   -o php -export-dynamic	 stub.lo libphp4.la
.libs/libphp4.a(php_imap.o): In function `php_if_imap_get_quota':
php_imap.o(.text+0x1aef): undefined reference to `imap_getquota'
.libs/libphp4.a(php_imap.o): In function `php_if_imap_set_quota':
php_imap.o(.text+0x1e19): undefined reference to `imap_setquota'
collect2: ld returned 1 exit status
make[1]: *** [php] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.0.5dev_20010308'
make: *** [all-recursive] Error 1
Bad exit status from /var/tmp/rpm-tmp.49221 (%build)

IMAP 2000c is installed, and another machine with a very similar configuration had no problem compiling. Any ideas?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-08 14:55 UTC] kalowsky@php.net
1) make sure HAVE_IMAP2000 is being defined

2) Check to make sure imap4r1.h is included in the php_imap.c file (this should be done as long as HAVE_IMAP2000) is defined and exists in the imap directory (looks like it's /usr/include/imap on your machine)

3) check that your imap4r1.h has both functions defined.  it should, but double checking never hurts.


 [2001-03-08 14:56 UTC] kalowsky@php.net
1) make sure HAVE_IMAP2000 is being defined

2) Check to make sure imap4r1.h is included in the php_imap.c file (this should be done as long as HAVE_IMAP2000) is defined and exists in the imap directory (looks like it's /usr/include/imap on your machine)

3) check that your imap4r1.h has both functions defined.  it should, but double checking never hurts.


 [2001-03-08 14:57 UTC] kalowsky@php.net
i'm sorry, #2 should have also check to make sure you have a c-client.h file in your include directory (this is what ensures a define of HAVE_IMAP2000).
 [2001-03-08 16:14 UTC] ignacio at openservices dot net
1) Yes, it's defined in main/php_config.h.

2) Yes, they both exist and are in /usr/include/imap.

3) Yes, the functions are defined in imap4r1.h.

It appears that this is a link failure and not just a simple compile failure. Here is the previous command:

/bin/sh /usr/src/redhat/BUILD/php-4.0.5dev_20010308/libtool --silent --mode=link gcc  -I. -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/ -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/main -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308 -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/Zend -I/usr/include/freetype -I/usr/include/imap -I/usr/local/include -I/opt/sybase-11.9.2/include -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/ext/xml/expat/xmltok -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/ext/xml/expat/xmlparse -I/usr/src/redhat/BUILD/php-4.0.5dev_20010308/TSRM  -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -O2 -m486 -fno-strength-reduce -fPIC   -o libphp4.la -rpath /usr/src/redhat/BUILD/php-4.0.5dev_20010308/libs -L/usr/kerberos/lib -L/usr/local/lib -L/opt/sybase-11.9.2/lib  -R /usr/kerberos/lib -R /usr/local/lib -R /opt/sybase-11.9.2/lib stub.lo  Zend/libZend.la sapi/cgi/libsapi.la main/libmain.la regex/libregex.la ext/dba/libdba.la ext/domxml/libdomxml.la ext/ftp/libftp.la ext/gd/libgd.la ext/gettext/libgettext.la ext/imap/libimap.la ext/openssl/libopenssl.la ext/pcre/libpcre.la ext/pdf/libpdf.la ext/posix/libposix.la ext/sablot/libsablot.la ext/session/libsession.la ext/standard/libstandard.la ext/sybase_ct/libsybase_ct.la ext/sysvsem/libsysvsem.la ext/sysvshm/libsysvshm.la ext/xml/libxml.la ext/yp/libyp.la TSRM/libtsrm.la -lpam -limap -ldl -linsck -lsybtcl -lintl -lcomn -lct -lcs -lxmltok -lxmlparse -lsablot -lz -ljpeg -lpng -ltiff -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lttf -lz -lpng -lgd -ljpeg -lz -lxml -lgdbm -lssl -lcrypto -lresolv -lm -ldl -lcrypt -lnsl -lttf -lpng -ljpeg -lz -lpam -lxmlparse -lxmltok -lresolv -lz -L/usr/lib -ljpeg -lpdf

Note the absence of '-lc-client' and the presence of '-limap' in that command. What would be causing this?
 [2001-03-08 17:03 UTC] ignacio at openservices dot net
Dan Kalowsky <dkalowsky@wgate.com> wrote:
> don't have time for the web interface, but...
> 
> in the ext/imap directory is a config.m4 and a line like:
> iMAP_LIB_CHK(lib)
> IMAP_LIB_CHK(c-client)
> 
> try reversing the two.  not sure if that'll do it, but it's the only
> thing i can think of off hand...

Actually, I found the problem.

Turns out that a while back (4.6beta) imap had been compiled via tarball and left a /usr/lib/libimap.a which of course didn't have the quota functions. After deleting this file PHP compiled fine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC