Tough question: errors while cross compiling to MIPS

James Peach jpeach at samba.org
Tue Jul 17 20:51:11 GMT 2007


On Jul 17, 2007, at 1:30 PM, Luther138 wrote:

>
> 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 \
>                --prefix=$(ROMFSDIR)/usr;
>
> 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:
>
> SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes
> libreplace_cv_READDIR_GETDIRENTRIES=no
> libreplace_cv_READDIR_GETDENTS=no
> linux_getgrouplist_ok=no
> samba_cv_REPLACE_READDIR=no
> samba_cv_HAVE_WRFILE_KEYTAB=no

The right way to do this is to create a config.site file to preset the  
result of any configure test that depends on the result of an  
AC_TRY_RUN.

>
>
> 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 2.17.50.0.12 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
> `linux_set_lease_sighandler'
> vfs_default.c:(.text+0x104c): undefined reference to `linux_setlease'
> collect2: ld returned 1 exit status
> make[5]: *** [bin/smbd] Error 1

You need to figure out which configure variable has the result of the  
Linux lease support and preset it's value in config.site.

--
James Peach | jpeach at samba.org



More information about the samba-technical mailing list