Tough question: errors while cross compiling to MIPS

Luther138 barrowsr at
Tue Jul 17 20:30:40 GMT 2007

I hope someone might be able to help with this, but it is pretty specific and
I am fairly new to these kinds of things so bear with me...
So I am attempting to cross compile Samba-3.0.25b for a MIPS platform.
These are the flags I use for the configure:

CC=$(CC) ./configure \
                --target=$(MACHINE)-linux \
                --host=$(MACHINE)-linux \
                --build=`/bin/arch`-linux \
                --with-configdir=/var/smb \
                --with-smbmount \
                --with-cifsmount \
                --disable-cups \
                --disable-iprint \
                --disable-pie \
                --disable-fam \

but this will not work on it's own because it is required that you manually
set some variables other wise you will get a "error: cannot run test program
while cross compiling".  So I modified the ./configure to set these
variables manually:


That seems to satisfy all of those error messages.  So now the issue is the
vfs_default.o seems to have a problem linking properly.  The linker I am
using is GNU ld version 20070128.  I don't understand why it
cannot find the following references. 

modules/vfs_default.o: In function `vfswrap_linux_setlease':
vfs_default.c:(.text+0x102c): undefined reference to
vfs_default.c:(.text+0x104c): undefined reference to `linux_setlease'
collect2: ld returned 1 exit status
make[5]: *** [bin/smbd] Error 1

Does anyone have any experience with cross-compiling samba to different
platforms?  Also, is there a reason that the configure script is made in
such a way that it always will fail if you try to cross-compile?  Any
guesses/suggestions would be greatly appretiated.
View this message in context:
Sent from the Samba - samba-technical mailing list archive at

More information about the samba-technical mailing list