#1  
Old 11th May 2010, 14:13
bkent bkent is offline
Junior Member
 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cross-compiling PHP

Hi

I'm a bit of a newbie with this stuff, so I'm not 100% sure where to post this.

Anyway I have a mini arm based PC for which I am trying to compile a php binary in cgi-mode, which supports sqlite.

I am trying to cross compile from a Ubuntu PC.

My code is as follows (from the unzipped PHP directory):

$ export CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc
$ export CXX=/usr/local/arm/3.4.1/bin/arm-linux-cpp
$ ./configure --host=i386-linux-gnu --prefix=/usr/home/ben/Desktop/php_bin --enable-ftp --target=arm --without-pear --disable-simplexml --disable-mbregex --enable-sockets --enable-pdo --with-pdo-sqlite --with-sqlite3 --disable-all
$ make
$ make install

It runs through the ./configure fine until the make command, where it falls over with the following error:

.....Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo main/internal_functions.lo -lcrypt -lcrypt -lrt -lm -lcrypt -lcrypt -o sapi/cgi/php-cgi ext/date/lib/parse_date.o: could not read symbols: Input/output error collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

I went into to php-5.3.2/ext/date/lib and sure enough the parse_date.o file hangs the OS when I try and open it.

I re-downloaded the php 5.3.2 tarball, (thinking it could be a corrupt download) and php-5.3.2/ext/date/lib/parse_date.o doesn't exist, and I get the same error anyway.

I've been researching online a bit and .o files are made during installations....

If anyone can see what I'm doing wrong I'd be eternally grateful!
Reply With Quote
Sponsored Links
  #2  
Old 11th May 2010, 17:32
id10t id10t is offline
Senior Member
 
Join Date: Nov 2008
Posts: 240
Thanks: 2
Thanked 22 Times in 22 Posts
Default

Before you start compiling I'd check the debian releases to see if there is a binary for your architecture already...
__________________
I'm a very happy linode.com customer, I'm sure you will be too!
Reply With Quote
  #3  
Old 12th May 2010, 21:02
bkent bkent is offline
Junior Member
 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK cheers for that, id10t. The delay in my response represents me looking through the Debian releases and trying to apply them to my little arm-based PC.

It opens up a whole other can of worms , as I have found 2 packages for the arm architecture, one php5-cgi, and one php5-sqlite.

The package names if you're interested are:

php5-cgi_5.2.0+dfsg-8+etch16_arm.deb

and

php5-sqlite_5.2.0+dfsg-8+etch16_arm.deb


Now, I've tried my best to get the cgi binary running as per my example php cgi from the manufacturers of the arm-PC, and I just can't.

I believe the php5-sqlite is going to be an addon - and that the pdo_sqlite.so and sqlite.so need to be placed in some kind of shared /lib/ directory.

So it's no surprise that I can't get the two packages working in conjunction.

Anyway I can't seem to find any documentation on how to use the packages debian, so if you can throw any light on this then please do!
Reply With Quote
  #4  
Old 14th May 2010, 13:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
 
Default

Why don't you use apt to install the .deb packages?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when install ISPConfig 2 with components built from source X-admin Installation/Configuration 5 30th April 2010 13:22
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 08:20
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 00:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.