Page 1 of 1
Help my to compile 64 bit with 32-bit libraries
Posted: Fri Nov 19, 2004 8:09 am
by LAVSAN
SABJ
I'am under SPARC Solaris 8
gcc -3.4.0
mysql-4.1.7 -64-bit
libxml2-2.6.4 -32 bit
...next pount indifferently
problem:
at run
shell>CFLAGS='-m64' ./configure
I have next into config.log
blah-blah-blah....libxml2.so: wrong ELF class: ELFCLASS32
help or get link to help. PLEASE

Posted: Fri Nov 19, 2004 8:41 am
by bluenote
You have to build a 64-bit PHP, i. e.
Code: Select all
root@your_machine> cd /usr/local/src
root@your_machine> gunzip < php-5.0.2.tar.gz | /usr/local/bin/tar xovf -
root@your_machine> cd php-5.0.2
root@your_machine> export CC="/usr/local/bin/gcc -m64"
root@your_machine> export LDFLAGS="-R/local/openldap/lib -R/etc/lib -L/usr/lib -R/usr/ucblib -R/usr/local/lib -R/usr/local/apache/lib -R/usr/local/ssl/lib -R/usr/local/mysql/lib"
root@your_machine> export CPPFLAGS="-I/local/openldap/include -I/usr/include -I/usr/local/include -I/usr/local/mysql/include -I/usr/local/apache/include"
root@your_machine> export PATH=/local/openldap/bin:/usr/sbin:/usr/bin:/usr/lib/nis:/usr/local/bin:/usr/ccs/bin:/usr/local/apache/bin/apxs:/usr/local/mysql/bin
root@your_machine> export LD_LIBRARY_PATH=/local/openldap/lib:/usr/local/ssl/lib:/usr/local/mysql/lib
root@your_machine> export LD_RUN_PATH=/local/openldap/bin:/usr/sbin:/usr/bin:/usr/lib/nis:/usr/local/bin:/usr/ccs/bin:/usr/local/apache/bin/apxs:/usr/local/mysql/bin
root@your_machine> ln -s /usr/ccs/bin/ar /usr/local/bin/ar
root@your_machine> ln -s /usr/local/bin/libtool ./libtool
root@your_machine> ./configure --with-apxs=/usr/local/apache/bin/apxs --with-ldap=/local/openldap --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl --with-zlib-dir=/usr/local/include --with-gd --with-jpeg-dir=/usr/local/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-curl=/usr/local/include/curl --with-curlwrappers --enable-calendar --enable-dbx --enable-filepro --enable-ftp
root@your_machine> make clean
root@your_machine> make
root@your_machine> make install
Otherwise, configure will fail.
Greez,
- bluenote
Posted: Sat Nov 20, 2004 5:30 am
by bluenote
There is already an entry in the PHP Bug list:
http://bugs.php.net/bug.php?id=29537
I have tried this long days and even longer nights

until i found this entry.
Greez,
- bluenote
Posted: Mon Nov 22, 2004 12:47 am
by LAVSAN
bluenote wrote:There is already an entry in the PHP Bug list:
http://bugs.php.net/bug.php?id=29537
I have tried this long days and even longer nights

until i found this entry.
Greez,
- bluenote
I think that is bug of gcc or gnu ld, because I was expirement with simple C code (from configure test):
Code: Select all
#include confdefs.h
char xmlInitParser();
int main (){
xmlInitParser();
return 0;
}
And I so think

I have wry hand...... I'am no one
