Alexander Skwar
2005-Nov-06 12:09 UTC
[Samba] Cannot cross-compile 3.0.20b from i686 to mipsel
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 xd=/usr/local/linkstation/$version/mipsel-hdhlan-linux/bin export PATH=$PATH:$xd target=mipsel-hdhlan-linux CC=$xd/mipsel-hdhlan-linux-gcc CPP=$xd/mipsel-hdhlan-linux-cpp LD=$xd/mipsel-hdhlan-linux-ld AR=$xd/mipsel-hdhlan-linux-ar NM=$xd/mipsel-hdhlan-linux-nm OBJDUMP=$xd/mipsel-hdhlan-linux-objdump export CC CPP LD AR NM OBJDUMP ./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. In config.log I find the following error: configure:19052: checking for _open64 configure:19109: /usr/local/linkstation/gcc-3.4.4-glibc-2.3.5/mipsel-hdhlan-linux/bin/mipsel-hdhlan-linux-gcc -o conftest -O -D_SAMBA_BUILD_ conftest.c -lnsl -ldl >&5 /tmp/ccaUm9zZ.o(.text+0x18): In function `main': : undefined reference to `_open64' /tmp/ccaUm9zZ.o(.data.rel+0x0): undefined reference to `_open64' collect2: ld returned 1 exit status configure:19115: $? = 1 configure: failed program was: What do I do now? Thanks, Alexander Skwar -- Blessed is he who expects nothing, for he shall never be disappointed. -- Alexander Pope
Martin Zielinski
2005-Nov-07 08:16 UTC
[Samba] Cannot cross-compile 3.0.20b from i686 to mipsel
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@seh.de Software Development SEH Computertechnik GmbH www.seh.de