php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34163 text relocation when building imap extension
Submitted: 2005-08-17 06:20 UTC Modified: 2007-02-14 08:09 UTC
From: selsky at columbia dot edu Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5CVS-2005-08-17 OS: Solaris 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: selsky at columbia dot edu
New email:
PHP Version: OS:

 

 [2005-08-17 06:20 UTC] selsky at columbia dot edu
Description:
------------
$ LDFLAGS='-R/opt/local/lib -L/opt/local/lib'   ./configure --prefix=/opt/php-5.1.0RC1 --sysconfdir=/etc/php --with-config-file-path=/etc/php --with-apxs2 --with-xmlrpc --with-libxml-dir=/opt/local --with-openssl=/opt/openssl-0.9.7f --with-zlib=shared --with-curl=/opt/curl-7.11.1 --with-imap=shared,/src/mail/imap/imap-2004a/obj/solaris9-sslonly --with-imap-ssl=/opt/local --with-ldap=shared,/opt/openldap-1.2.13 --with-oci8=shared,/opt/oracle-9.2 

Actual result:
--------------
/bin/sh /hmt/chinchin/src/web/php/php-5.1.0RC1/src/libtool --silent --preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC -I/hmt/chinchin/src/web/php/php-5.1.0RC1/src/include -I/hmt/chinchin/src/web/php/php-5.1.0RC1/src/main -I/hmt/chinchin/src/web/php/php-5.1.0RC1/src -I/opt/libxml2-2.6.15/include/libxml2 -I/opt/openssl-0.9.7f/include -I/opt/curl-7.11.1/include -I/src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client -I/opt/openldap-1.2.13/include -I/opt/oracle-9.2/rdbms/public -I/opt/oracle-9.2/rdbms/demo -I/hmt/chinchin/src/web/php/php-5.1.0RC1/src/TSRM -I/hmt/chinchin/src/web/php/php-5.1.0RC1/src/Zend  -D_POSIX_PTHREAD_SEMANTICS  -g -O2   -o ext/imap/imap.la -export-dynamic -avoid-version -prefer-pic -module -rpath /hmt/chinchin/src/web/php/php-5.1.0RC1/src/modules -avoid-version -module -L/usr/ucblib -L/opt/gcc2952-28/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2 -L/opt/libxml2-2.6.15/lib -L/opt/openssl-0.9.7f/lib -L/opt/curl-7.11.1/lib -L/opt/local/lib ext/imap/php_imap.lo -R/opt/openssl-0.9.7f/lib -L/opt/openssl-0.9.7f/lib -lssl -lcrypto -R/src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client -L/src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client -lc-client -lcrypt -lpam
Text relocation remains                         referenced
    against symbol                  offset      in file
<unknown>                           0x29f8      /src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client/libc-client.a(osdep.o)
<unknown>                           0x29fc      /src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client/libc-client.a(osdep.o)
<unknown>                           0x2a00      /src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client/libc-client.a(osdep.o)
...
closedir                            0xab4       /src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client/libc-client.a(mh.o)
closedir                            0x360       /src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client/libc-client.a(mx.o)
closedir                            0x6e0       /src/mail/imap/imap-2004a/obj/solaris9-sslonly/c-client/libc-client.a(mx.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make: *** [ext/imap/imap.la] Error 1



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-17 09:50 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-08-17 19:19 UTC] selsky at columbia dot edu
Same error.
 [2005-08-17 19:27 UTC] sniper@php.net
Try without trying to outsmart the configure:

# rm config.cache && ./configure --disable-all --with-imap=/src/mail/imap/imap-2004a/obj/solaris9-sslonly --with-imap-ssl=/usr/local

And check these urls too:

http://www.google.com/search?q=relocations+remain+against+allocatable+but+non-writable+sections



 [2005-08-17 20:51 UTC] selsky at columbia dot edu
That worked.  I'll try adding each extension back in until it fails again.
 [2005-08-17 21:22 UTC] selsky at columbia dot edu
Build imap as a shared extension breaks things again:

$ ./configure --disable-all --with-imap=shared,/src/mail/imap/imap-2004a/obj/solaris9-sslonly --with-imap-ssl=/opt/local
 [2005-08-18 02:32 UTC] sniper@php.net
Apparently you can't build a shared DSO with only static library linked to it on Solaris. Not PHP bug -> bogus.

 [2005-08-18 06:58 UTC] selsky at columbia dot edu
This worked in 4.3.11.  Why would it suddenly not work 
in php5.1?
 [2005-08-21 04:10 UTC] selsky at columbia dot edu
This also worked in php 5.0.4:

/bin/sh /tmp/php-5.0.4/libtool --silent --preserve-dup-
deps --mode=compile gcc  -Iext/imap/ -I/tmp/php-5.0.4/
ext/imap/ -DPHP_ATOM_INC -I/tmp/php-5.0.4/include -I/
tmp/php-5.0.4/main -I/tmp/php-5.0.4 -I/src/mail/imap/
imap-2004a/obj/solaris9-sslonly/c-client -I/opt/local/
include -I/tmp/php-5.0.4/TSRM -I/tmp/php-5.0.4/Zend  
-D_POSIX_PTHREAD_SEMANTICS  -g -O2   -c /tmp/php-5.0.4/
ext/imap/php_imap.c -o ext/imap/php_imap.lo 
/bin/sh /tmp/php-5.0.4/libtool --silent --preserve-dup-
deps --mode=link gcc -DPHP_ATOM_INC -I/tmp/php-5.0.4/
include -I/tmp/php-5.0.4/main -I/tmp/php-5.0.4 -I/src/
mail/imap/imap-2004a/obj/solaris9-sslonly/c-client -I/
opt/local/include -I/tmp/php-5.0.4/TSRM -I/tmp/php
-5.0.4/Zend  -D_POSIX_PTHREAD_SEMANTICS  -g -O2   -o 
ext/imap/imap.la -export-dynamic -avoid-version -prefer-
pic -module -rpath /tmp/php-5.0.4/modules -L/usr/ucblib 
-L/opt/gcc2952-28/lib/gcc-lib/sparc-sun-solaris2.8/
2.95.2 ext/imap/php_imap.lo -R/opt/local/lib -L/opt/
local/lib -lssl -lcrypto -R/src/mail/imap/imap-2004a/
obj/solaris9-sslonly/c-client -L/src/mail/imap/imap
-2004a/obj/solaris9-sslonly/c-client -lc-client -lcrypt 
-lpam
/bin/sh /tmp/php-5.0.4/libtool --silent --preserve-dup-
deps --mode=install cp ext/imap/imap.la /tmp/php-5.0.4/
modules
 [2007-02-14 08:09 UTC] selsky at columbia dot edu
I changed EXTRACFLAGS to include "-fPIC" when building UWash 
imap and now php links properly.  I don't know why this wasn't 
required in older php releases.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 15:01:28 2025 UTC