On Mon, Dec 24, 2001 at 05:20:34AM -0800, Srinivasan Sriram wrote:
> The compiling went off smoothly, but I was taken by
> shock to find out that the executables are running
> on x-86 itself. So I know that some thing has gone
> wrong during the building process. The configure and
> make scripts that I ran are as follows:
> 
> [1]
> ./configure --includedir=/usr/arm-linux/include/
> --oldincludedir=/usr/arm-linux/include/
> --libdir=/usr/arm-linux/lib --bindir=/usr/php-arm/bin
> --sbindir=/usr/php-arm/sbin

--libdir, --bindir, --sbindir,  can be nicely summarised with
"--prefix=/usr/php-arm".

>  --host=i386-linux
> --target=arm-linux --with-mysql
    ^^^^^^
That doesn't work, php is not a tool that generates arm code. You want
--host=arm-linux and --build=i386-linux, which can be summarised as
"arm-linux".

> --with-apache=/usr/arm-linux/include
> --libexec=/usr/php-arm/libexec
> 
> [2]
> make CC="arm-linux-gcc" AS="arm-linux-as"
> CXX="arm-linux-g++" CPP="arm-linux-gcc -E"
> LD="arm-linux-ld" NM="arm-linux-nm -B"
> AR="arm-linux-ar"

That's a nice recipe for failure. The configure script has to know what
the used tools are so it can fill them out in the Makefile. Telling
make later on that you want to use different tools usually fails.

> [3]
> make install
> 
> Can anyone help me with my problem.

This is my recipe that cross compiles 99% of all autoconf'ed packages
out there:

  export CC=arm-linux-gcc
  export CXX=arm-linux-g++
  (export whatever other tools the configure script depends on, but
  usually the C and C++ compiler will do)

  ./configure [flags] arm-linux

In the php case, you want the flags probably to be: 
--prefix=/usr/php-arm --libexec=/usr/php-arm/libexec
--includedir=/usr/arm-linux/include
--oldincludedir=/usr/arm-linux/include
--with-apache=/usr/arm-linux/include

Note that you most probably don't need the --includedir and
--oldincludedir flags.

If the configure script doesn't recognise arm-linux as a valid target
architecture, you might try arm-unknown-linux-gnu.

  make
  make install


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: [EMAIL PROTECTED]
WWW: http://www-ict.its.tudelft.nl/~erik/

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to