php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36713 apache and opteron 64bit cannot load module
Submitted: 2006-03-13 11:09 UTC Modified: 2006-03-13 13:50 UTC
From: abarbieri at isis dot sm Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.1.2 OS: solaris 10
Private report: No CVE-ID: None
 [2006-03-13 11:09 UTC] abarbieri at isis dot sm
Description:
------------
When you compile PHP on a Opteron AMD 64 arch. with the command:
CC='gcc -m64' ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/mysql-max-5.0.15-solaris10-x86_64 --with-zlib=/usr

note:mysql 64bit,libxml 64bit,openssl 64bit,libiconv 64bit

This kind of module compiled and installed with no errors cannot be loaded dinamically on a apache 2 server.
When i exclude the Loadmodule directive all runs OK.

p.s.
httpd -V

Server version: Apache/2.0.55
Server built:   Mar 13 2006 10:54:38
Server's Module Magic Number: 20020903:11
Architecture:   64-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FCNTL_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


ldd ldd /usr/local/apache2/modules/libphp5.s
  libz.so.1 =>     /usr/lib/64/libz.so.1
  libresolv.so.2 =>        /lib/64/libresolv.so.2
  libm.so.2 =>     /lib/64/libm.so.2
  libnsl.so.1 =>   /lib/64/libnsl.so.1
  libsocket.so.1 =>        /lib/64/libsocket.so.1
  libxml2.so.2 =>  /lib/64/libxml2.so.2
  libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
  libc.so.1 =>     /lib/64/libc.so.1
  libmp.so.2 =>    /lib/64/libmp.so.2
  libmd5.so.1 =>   /lib/64/libmd5.so.1
  libscf.so.1 =>   /lib/64/libscf.so.1
  libpthread.so.1 =>       /lib/64/libpthread.so.1
  libgcc_s.so.1 =>         /usr/sfw/lib/amd64//libgcc_s.so.1
  libdoor.so.1 =>  /lib/64/libdoor.so.1
  libuutil.so.1 =>         /lib/64/libuutil.so.1

Reproduce code:
---------------
Versions:
http 2.0.55
mysql 5.0.15 max (binary for solaris 10 release pack)
php 5.0.5
libxml2 2.6.11
libiconv 1.9.1
openssl 0.9.8a
glib 2.8.0
zlib 1.2.3

When you compile PHP on a Opteron AMD 64 arch. with the command:
CC='gcc -m64' ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/mysql-max-5.0.15-solaris10-x86_64 --with-zlib=/usr

note:mysql 64bit,libxml 64bit,openssl 64bit,libiconv 64bit

with
CC='gcc -m64' ./configure --enable-so --enable-ssl --with-ssl=/usr/local/ssl

Expected result:
----------------
apachectl configtest or start with no error
Loadmodule modules/libphp5.so with noerror for the basic configuration


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 11:16 UTC] tony2001@php.net
Please try using this CVS snapshot:

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

And use --with-libdir=lib64, which appeared first in 5.1.x.
 [2006-03-13 11:26 UTC] abarbieri at isis dot sm
--with-libdir=lib64 already done with no positive results.
Modified LD_LIBRARY_PATH with /usr/64 e AMD64 specific libraries with no positive results.
used -fPIC and -fpic in inline compiler option with no positive results.
modified apache2/bin/envvars with no positive results.

Other ideas?
THNX
 [2006-03-13 11:31 UTC] tony2001@php.net
>--with-libdir=lib64 already done with no positive results.
Because you're using PHP 5.0.5 and this option doesn't exist there.
 [2006-03-13 12:12 UTC] abarbieri at isis dot sm
The option:
LD_LIBRARY_PATH:$LD_LIBRARY_PATH:/usr/64:/usr/sfw/lib/amd64
before configure stage is the same than --with-libdir=lib64 (i think).
I see that putting -m64 option in CC variable the fpic was recognized automatically.
All the libraries linked are 64 bit compatibles...i do not understand...
 [2006-03-13 12:24 UTC] tony2001@php.net
Again, please try PHP 5.1.x snapshots.
 [2006-03-13 12:38 UTC] abarbieri at isis dot sm
When i try to compile php with the same option of the 5.0.5 version i receive:
.....
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

all the errors are relatives to the libmysqlclient.a library
 [2006-03-13 13:50 UTC] tony2001@php.net
See bug #35465.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Oct 06 14:03:44 2022 UTC