#30762 [Opn]: Compile fails when using cyrus-imap 2.2.x
| From: | alex at kinder dot ind dot br | Date: | Fri, 12 Nov 2004 10:44:34 +0000 |
| Subject: | #30762 [Opn]: Compile fails when using cyrus-imap 2.2.x | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68980@lists.php.net to get a copy of this message | ||
ID: 30762
User updated by: alex at kinder dot ind dot br
Reported By: alex at kinder dot ind dot br
Status: Open
Bug Type: Compile Failure
Operating System: Linux 2.4.26 - Slackware 10
PHP Version: 4.3.9
New Comment:
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!
Previous Comments:
------------------------------------------------------------------------
[2004-11-11 14:20:42] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30762&edit=1