I’ve been having numerous problems building a c-client that actually allows me to compile IMAP into PHP5 for use by IMP (Horde).  I can successfully build imap-2004g using “make gso”.  I then copy the c-client.a file and *.c files to /usl/local/imap-2004g/lib/libc-client.a, and copy all the *.h files from c-client to /usr/local/imap2004g/include.  I then configure php5 thusly:

 

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pgsql --prefix=/usr/local/stow/php-5.1.4 --with-mcrypt --with-imap=/usr/local/imap-2004g --with-dom --with-iconv --enable-mbstring --with-mbstring=all --with-mime-magic --with-pear --with-gettext --with-imap-ssl=/usr/local/ssl --with-openssl=/usr/local/ssl --with-zlib-dir=/usr/local --with-ldap-dir=/usr/local/stow/openldap-2.3.20

 

Configure seems to complete successfully, so following that, I do a ‘make’ using the make-3.8.0 from sunfreeware (I’ve also tried with /usr/ccs/bin/make).  When make for php5 gets to the point where it’s linking libphp5.la, it throws thousands of ld: fatal: lines, the tail of which looks like this:

 

time                                0x118f      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x1273      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x1799      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x1d73      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x1e45      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x1ec2      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x242a      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x2439      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x2b2e      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x2fb2      /usr/local/imap-2004g/lib/libc-client.a(mtx.o)

time                                0x2381      /usr/local/imap-2004g/lib/libc-client.a(mh.o)

time                                0x24a9      /usr/local/imap-2004g/lib/libc-client.a(mx.o)

time                                0x26ed      /usr/local/imap-2004g/lib/libc-client.a(mx.o)

time                                0x1a2       /usr/local/imap-2004g/lib/libc-client.a(netmsg.o)

realloc                             0xfc        /usr/local/imap-2004g/lib/libc-client.a(osdep.o)

printf                              0x58f8      /usr/local/imap-2004g/lib/libc-client.a(osdep.o)

ld: fatal: relocations remain against allocatable but non-writable sections

collect2: ld returned 1 exit status

make: *** [libphp5.la] Error 1

 

Now from another user online that suggested manually creating a .so from the .a (http://us3.php.net/imap), I can get that to work sometimes, if I fiddle with the c-client Makefile, LD_LIBRARY_PATH, PATH, etc.  Frankly, I’m not really sure what I do that makes it work or fail.  But I’m dubious that the shared object I create takes the changes to src/osdep/unix/env_unix.c, because IMP still shows the entire home directory, even though I’ve patched it so it only shows what’s in ~/mail/. 

 

I don’t care if I can make the c-client.a archive compile with PHP (haven’t I set up my /usr/local/imap2004g correctly?), or the shared object, but the PRIMARY OBJECTIVE is to create a c-client lib that doesn’t show the entire home directory.  The patch I found to patch env_unix.c was here: http://wiki.horde.org/ImpUWIMAPNamespaces.

 

If anyone can help I’d certainly appreciate the advice.  Thanks in advance!

_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to