--- In "David L. Martin" <> wrote:
> Doesn't the prefix effect the paths stored in the internal executable as
> well as the installation?
Yes. Here's my build script for php; I just set up the prefix for the
target fs and then copy the needed files manually. See the end of the
script.
Build script
==============================
#!/bin/sh
echo Starting
export CFLAGS="-msoft-float -L$ROOTDIR/$PLATFORM/lib
-I$ROOTDIR/../include"
export CC=arm-linux-gcc
export MING_DIR="../ming-0.3.0/"
make clean
./configure \
--host=arm-linux \
--target=arm-linux \
--build=i686-pc-linux-gnu \
--with-zlib-dir=$ROOTDIR/$PLATFORM/lib \
--disable-all \
--enable-xml \
--enable-session \
--with-ming=$ROOTDIR/../ming-0.3.0/php_ext \
--prefix=/ \
--exec-prefix=/ \
\
&& make \
&& cp sapi/cgi/php $ROOTDIR/$PLATFORM/bin \
&& arm-linux-strip $ROOTDIR/$PLATFORM/bin/php
=============================
It assumes that all of the arm-linux- stuff is in your path. Also, I
am building with ming, so you probably want to edit that out. Heck
you probably want to edit the configure part altogether.
$ROOTDIR/$PLATFORM/ is the rootfs of the target platform
$ROOTDIR/../include is what would normally be in /usr/include on the
target, but I moved it out of the fs tree altogether, as I don't need
it on the final product.
> > One word: cheat. :-)
> >
> > All you need to do is to take out a few exit 1 lines in the configure
> > script and php4 will compile just fine.
>
> That was the first thing I did, unfortunately that didn't work.
> Although the results differed from versions of PHP.
>
> > I am in the final stages of building my own little build environment;
> > I should be able to post a patch to php-4.4.2 configure that allows it
> > to cross-compile.
>
> That would be great.
OK, here's the patch:
--- /home/local/src/php-4.4.2/configure 2006-01-12 10:24:23.000000000
-0800
+++ configure 2006-08-15 10:34:01.000000000 -0700
@@ -14359,7 +14359,7 @@
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross
compiling" 1>&2; exit 1; }
+ { echo "configure: error: can not run test program while cross
compiling" 1>&2; }
else
cat > conftest.$ac_ext <<EOF
#line 14366 "configure"
@@ -15608,7 +15608,7 @@
if { (eval echo configure:15609: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross
compiling" 1>&2; exit 1; }
+ { echo "configure: error: can not run test program while cross
compiling" 1>&2; }
else
cat > conftest.$ac_ext <<EOF
#line 15615 "configure"
@@ -19401,7 +19401,7 @@
fi
if test -z "$ZLIB_DIR"; then
- { echo "configure: error: Cannot find libz" 1>&2; exit 1; }
+ { echo "configure: error: Cannot find libz" 1>&2; }
fi
>
> > If you want to give it a try, find the test where it is failing, then
> > take out the 'exit 1;' in the if condition.
>
> I'll try again today. Maybe I'll have better luck.
:-) may the genies of computerdom be with you....
--Yan
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|