|  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
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.

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_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -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 =>     /usr/lib/64/ =>        /lib/64/ =>     /lib/64/ =>   /lib/64/ =>        /lib/64/ =>  /lib/64/ =>         /usr/local/lib/ =>     /lib/64/ =>    /lib/64/ =>   /lib/64/ =>   /lib/64/ =>       /lib/64/ =>         /usr/sfw/lib/amd64// =>  /lib/64/ =>         /lib/64/

Reproduce code:
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

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 11:16 UTC]
Please try using this CVS snapshot:
For Windows:

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?
 [2006-03-13 11:31 UTC]
>--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:
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]
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: *** [] Error 1

all the errors are relatives to the libmysqlclient.a library
 [2006-03-13 13:50 UTC]
See bug #35465.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 18:01:30 2024 UTC