Compile PHP 5.3.6 with MySql on Sun Blade 1500 Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris Compile PHP 5.3.6 with MySql on Sun Blade 1500 Solaris 10
# 1  
Old 05-12-2011
Compile PHP 5.3.6 with MySql on Sun Blade 1500 Solaris 10

Hello,

I'm trying to compile PHP 5.3.6 with Apache2 and MySql 5.5.12. I hit a problem that I can't seem to resolve by myself and I could not find a solution on the web.

It looks like Apache and MySql installed ok, I can start/stop them with no problem.

When I try to compile PHP the configure script fails with the error related to MySql.

Code:
# ./configure --with--apxs2=/usr/apache2/bin/apxs --with-mysql --with-zlib-dir=/usr/local/zlib

checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.

# more config.log

. . .   . . .  . . .

configure:59920: gcc -o conftest -I/usr/include -g -O2  -D_POSIX_PTHREAD_SEMANTICS -L/usr/lib  -R/usr/ucblib -L/usr/ucblib -R/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3 -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3 -R/usr/local/zlib/lib -L/usr/local/zlib/lib conftest.c -lmysqlclient  -lz -lrt -lm -lnsl -lsocket  -lgcc -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl 1>&5
ld: fatal: file /usr/lib/libmysqlclient.so: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 59909 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_close();

It looks to me that the problem is related to the face that MySql was compiled for 64 bits since the error says "wrong ELF class: ELFCLASS64"

On the web I found recommendations to include option -with-libdir=/usr/lib64
but /usr/lib64 does not exist on my workstation. In fact lib64 cannot be found anywhere on my hard drive.

I can't believe that I'm the first person facing this problem. Does anyone have experience with this?


Thank You,
Pavel.
# 2  
Old 05-13-2011
64 bit libraries should not be in /usr/lib, they should be in /usr/lib/sparcv9 instead. And by the way, if you compile software yourself, it should not be in /usr at all. When I need to compile my own MySQL, I put it in /opt/mysql.

Please change your mysql build, so that the 32- and 64-bit MySQL libaries end up in the proper places. Then your PHP build should succeed too.
This User Gave Thanks to hergp For This Post:
# 3  
Old 05-13-2011
Thank You,

I installed MySQL as a package (with pkgadm) downloaded from Oracle website. The only software that I'm trying to compile is PHP. MySQL installation directory is /opt/mysql/mysql so if mysql libraries ended up in /usr that's probably because Oracle wanted to put them there. Is it not a correct setup?

Pavel.
# 4  
Old 05-14-2011
If the package you installed puts 64-bit libraries into /usr/lib instead of /usr/lib/sparcv9, then the package configuration is faulty.

As far as I know, the 64-bit MySQL package comes only with the 64-bit client libary and the 32-bit package only with the 32-bit client library. For your PHP configuration, you need the 32-bit library, so you better install the 32-bit MySQL package instead of the 64 bit one. If you don't have a huge database, the 32 bit database engine should work fine too.
This User Gave Thanks to hergp For This Post:
# 5  
Old 05-16-2011
Thanks!

I will try using 32-bit MySQL. I just noticed that for MySQL 5.1.57 they still provide 32-bit package. It's not available for MySQL 5.5.12. Maybe that's the deal.

Regards,
Pavel.


Edit: This worked! Thank You very much!!

Last edited by pn8830; 05-16-2011 at 05:52 PM.. Reason: Status update
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Using larger than 120GB drives on a Blade 1500

Hi, I'm using Solaris 8 on a Blade 1500. I know that IDE drives are limited to around 120GB, but I was told that it's possible to use larger drives with the only caveat that the available size will be that 120 (or is it 128?) GB size. But when I try, format shows only very low sizes, like... (2 Replies)
Discussion started by: BobSol8
2 Replies

2. UNIX Benchmarks

Blade 1500 Silver

CPU/Speed: UltraSPARC-IIIi/1.5Ghz Ram: 1GB Motherboard: Sparc Bus: PCI Cache: Controller: Disk: ATA Load: 1 user Kernel: SunOS 5.10 Generic_137111-02 Kernel ELF?: yes pgms: gcc 2.95.3 compiled BYTE UNIX Benchmarks (Version 3.11) System -- SunOS aachen95 5.10... (0 Replies)
Discussion started by: MadeInGermany
0 Replies

3. Solaris

Sun blade 1500 bad magic number

Good afternoon all, First, sorry for my English, this is not my first language but I try my best :). So, here we go. A friend of mine gave me an old Sun Blade 1500 he wasn't using. He said it was working fine except for the missing hard drive. I had in my IT personnal box an old IDE... (33 Replies)
Discussion started by: firstpost
33 Replies

4. Solaris

Cannot install or run Solaris 8 on Sun Blade 150

Hi everybody, I'm having big troubles in installing Solaris 8 on a Sun Blade 150. Here are some system specs: Sun Blade 150 (UltraSPARC-IIe 550MHz) RAM: 256MB OBP 4.10.6 2003/06/06 12:30 POST 2.0.1 2001/08/23 17:13 When I try to boot from Solaris 8 CD with boot cdrom or... (10 Replies)
Discussion started by: Vortigern
10 Replies

5. Solaris

help installing solaris 10 on sun blade 1500

Hi everyone can someone please explain to me how to install solaris 10 on a sunblade 1500 using cdrom? Thanks for your assistance (1 Reply)
Discussion started by: cjashu
1 Replies

6. UNIX for Dummies Questions & Answers

Reinstalling Solaris 9 on Sun Blade 100

For the past ten years I have owned a blade 100, and I had Solaris 9 running on it. Due to the fact, 9 is woefully out of date, I wanted to try 10, but 10 needed more ram, so I beefed up the ram to the full 2 gig. I have two 15 gig ide drives in the box (stock drives). But unfortunately solaris... (2 Replies)
Discussion started by: RichardET
2 Replies

7. Solaris

Sun blade 1500 installation and administration problem

Hi I'm completely new in solaris,and don't know many about it. I was installed solaris 10 on sun blade 1500,and also I need to install oracle on it. Now I stuck on some thing and i'm sure that you help me. When i started Oracle installation system told me that I don't have enogh swap space.... (1 Reply)
Discussion started by: dirtyjack
1 Replies

8. Solaris

Errors trying to compile PHP for use with MySQL on Solaris 10

have installed and am using the GNU based tools from the Sunfreeware site to compile PHP. I already have Apache, MySQL, and Oracle compiled and working properly. Below is my configure string for my PHP build: ./configure --prefix=/usr/local/php5 \... (2 Replies)
Discussion started by: sunsysadm2003
2 Replies

9. UNIX for Dummies Questions & Answers

Configuring networking interface on Sun Blade 1500

Hi, I am attempting to configure my ethernet interface on a Sun Blade 1500. I am testing out my network interface my connecting a crossover cable from my blade to a windows box. I would like to assign an ip address of 10.0.0.2 to "bge0" and netmask of "255.0.0.0". I have typed the following: ... (1 Reply)
Discussion started by: annointed3
1 Replies

10. UNIX Benchmarks

Sun Blade 2000 UltraSparc III Solaris 8

Sun Blade 2000 UltraSparc III Solaris 8 Notes: prtdiag: System Configuration: Sun Microsystems sun4u SUNW,Sun-Blade-1000 (UltraSPARC-III+) System clock frequency: 150 MHZ Memory size: 3GB ==================================== CPUs ==================================== ... (0 Replies)
Discussion started by: tnorth
0 Replies
Login or Register to Ask a Question