php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30762 Compile fails when using cyrus-imap 2.2.x
Submitted: 2004-11-11 14:20 UTC Modified: 2011-01-02 02:16 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: alex at kinder dot ind dot br Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.9 OS: Linux 2.4.26 - Slackware 10
Private report: No CVE-ID: None
 [2004-11-11 14:20 UTC] alex at kinder dot ind dot br
Description:
------------
According to this post (http://asg.web.cmu.edu/archive/message.php?mailbox=archive.info-cyrus&msg=22673)     , the PHP code hasn't been updated to include the changes in the cyrus 2.2.x code.
The code was split into libcyrus.a AND libcyrus_min.a.

One needs to link to both libcyrus.a AND libcyrus_min.a for compilation to work.
(which i really don't know how to do... help!)

my configure line:
./configure  --prefix=/usr --with-bz2 --with-zlib --with-ldap --with-mysql=/usr/mysql --with-apxs2 --enable-track-vars --with-gd --with-png --with-ttf --with-jpeg --with-openssl --with-gettext --with-xml --with-mhash=/usr/lib --with-dom=/usr/lib --with-dom-xslt=/usr/lib --with-dom-exslt=/usr/lib --with-cyrus=/usr/lib --with-config-file-path=/etc/httpd --enable-dba --with-db4 --enable-dbase --enable-ftp

Trying to compile PHP with OpenLDAP 2.2.17, MySQL 4.1.7 adn Cyrus IMAP 2.2.8, all latest versions.

Thanks for your help!

Reproduce code:
---------------
/usr/lib/libcyrus.a(cyrusdb_quotalegacy.o)(.text+0xe56): In function `mystore':
/usr/local/src/build/cyrus-imapd-2.2.8/lib/cyrusdb_quotalegacy.c:605: undefined reference to `hash_insert'
/usr/lib/libcyrus.a(cyrusdb_quotalegacy.o)(.text+0x1252):/usr/local/src/build/cyrus-imapd-2.2.8/lib/cyrusdb_quotalegacy.c:573: undefined reference to `hash_lookup'
/usr/lib/libcyrus.a(cyrusdb_quotalegacy.o)(.text+0x1350): In function `enum_func':
/usr/local/src/build/cyrus-imapd-2.2.8/lib/cyrusdb_quotalegacy.c:731: undefined reference to `hash_del'
/usr/lib/libcyrus.a(cyrusdb_quotalegacy.o)(.text+0x13a5): In function `commit_txn':
/usr/local/src/build/cyrus-imapd-2.2.8/lib/cyrusdb_quotalegacy.c:744: undefined reference to `hash_enumerate'
/usr/lib/libcyrus.a(cyrusdb_quotalegacy.o)(.text+0x13d5): In function `abort_txn':
/usr/local/src/build/cyrus-imapd-2.2.8/lib/cyrusdb_quotalegacy.c:757: undefined reference to `hash_enumerate'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-12 11:44 UTC] alex at kinder dot ind dot br
I was able to circunvent this problem, by extracting the contents of libcyrus_min.a and inserting those libraries into libcyrus.a.
Here are the steps I took:
-- back things up
# cp /usr/lib/libcyrus.a /root/libcyrus.a.backup
-- let's work on /tmp
# cp /usr/lib/libcyrus.a /tmp
# cp /usr/lib/libcyrus_min.a /tmp
# cd /tmp
-- list the archives content
# ar vt libcyrus.a
# ar vt libcyrus_min.a
[ you'll notice that there are 2 libraries with the same name on both archives, what i did was, extract them to different directories, and 'diff' them, to find that they're the same on both archives, which means that i can overwrite the ones inside libcyrus.a or just not insert the new ones there. ]
-- extract the content from libcyrus_min.a
# ar xv libcyrus_min.a
-- one liner to insert stuff into libcyrus.a
# for file in `ar t libcyrus_min.a `; do ar rv libcyrus.a  $file; done
-- cp libcyrus back into it's original location - /usr/lib..
# cp libcyrus.a /usr/lib

now rerun configure, make and make install, things should work just fine as PHP will be able to find every function it needs to finish compiling.

But the PHP team should definitely fix this on future versions!
 [2004-11-15 15:55 UTC] tony2001@php.net
Reclassified as feature request.
It would be also very good if Cyrus developers add a possibility to check it's version in compile time.
 [2011-01-02 02:16 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2011-01-02 02:16 UTC] jani@php.net
There is no such option anymore in PHP 5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 03:01:28 2024 UTC