[Samba] Cannot cross-compile 3.0.20b from i686 to mipsel

Martin Zielinski mz at seh.de
Mon Nov 7 08:17:46 GMT 2005


Alexander Skwar wrote:
> Hi.
> 
> I'm trying to compile 3.0.20b on my i686 host to run on a
> mipsel host. For this, I got a cross compile toolchain from
> <http://linkstationwiki.org/Projects/CrossToolchains>. The
> toolchain is installed at /usr/local/linkstation/gcc-3.3.5-glibc-2.3.2/mipsel-hdhlan-linux
> 
> I ran configure with the help of a little wrapper script:
> 
> version=gcc-3.4.4-glibc-2.3.5
> #version=gcc-3.3.5-glibc-2.3.2

[...]
> 
> ./configure --host=$target --target=$target     \
>         --disable-cups --without-ldap --without-ads     \
>         && make AR=mipsel-hdhlan-linux-ar CC=mipsel-hdhlan-linux-gcc	\
> 	 LD=mipsel-hdhlan-linux-ld NM=mipsel-hdhlan-linux-nm 	\
> 	OBJDUMP=mipsel-hdhlan-linux-objdump
> 
> configure failed with this error message:
> 
> checking for open64... yes
> checking for _open64... no
> checking for __open64... yes
> checking for creat64... yes
> checking for prctl... yes
> configure: error: cannot run test program while cross compiling
> See `config.log' for more details.
[...]

> 
> What do I do now?
Hello Alexander,

these are quite normal messages when trying to cross-compile bigger 
projects.

Actually you'll find in the config.log, that the configure script tried 
to execute a programm it has recently build.
Running a mips binary on a i686 fails of course.

To fix it, you have either to hack the configure script or - better -
pre-set the variables the configure script wants to figure out.

On my arm plattform it looks like this:

export samba_cv_HAVE_MEMORY_KEYTAB=yes
export samba_cv_USE_SETEUID=no
...

Sometimes it's a bit tricky to find the right variables but searching 
the configure script for those "cannot run test program ..." is allways 
a good start.

Bye,

Martin

-- 
Martin Zielinski             mz at seh.de
Software Development
SEH Computertechnik GmbH     www.seh.de


More information about the samba mailing list