linux - Cross Compiling Samba 4.0.5 i686 to MIPS -


i've been assigned cross compile samba 4.0.5 i686 mips in order port on board later. i'm compiling in ubuntu 13.04 .

the error is:

lib/sysquotas_4a.c: in function ‘sys_get_vfs_quota’: lib/sysquotas_4a.c:107:10: error: ‘struct dqblk’ has no member named ‘dqb_curblocks’ lib/sysquotas_4a.c:124:10: error: ‘struct dqblk’ has no member named ‘dqb_curblocks’ lib/sysquotas_4a.c:170:29: error: ‘struct dqblk’ has no member named ‘dqb_curblocks’ following command failed: cc -fno-builtin -d_largefile_source -d_file_offset_bits=64 -d_reentrant  -d_posix_pthread_semantics -i.  -i/home/constantine/software_forge/2013/5_month/samba/samba-4.0.5/source3  -i/home/constantine/software_forge/2013/5_month/samba/samba-4.0.5/source3/../lib/popt  -i/home/constantine/software_forge/2013/5_month/samba/samba-4.0.5/source3/../lib/iniparser/src  -iinclude/autoconf -iautoconf -iautoconf/source3 -iinclude -i./include   -i. -i. -i./../lib/replace -i./../lib/tevent -i../lib/ccan/.. -i./librpc -i./..  -i./../lib/tdb_compat -i./../lib/talloc -i../lib/tdb/include -i../lib/ntdb  -dhave_config_h  -i/~/opt/buildroot-gcc342/include -iinclude/autoconf -iautoconf  -iautoconf/source3 -iinclude -i./include -i. -i. -i./../lib/replace -i./../lib/tevent -i../lib/ccan/..  -i./librpc -i./.. -i./../lib/tdb_compat -i./../lib/popt -dldap_deprecated   -i/home/constantine/software_forge/2013/5_month/samba/samba-4.0.5/source3/lib -i..  -i./../lib/ldb/include -d_samba_build_=3 -d_samba_build_=3 -fpie -c lib/sysquotas_4a.c -o lib/sysquotas_4a.o 

i run

./configure --target=mips-linux-uclibc --host=i686

and before run these:

export ld_libary_path=~/opt/buildroot-gcc342/lib export ldflags=-l/~/opt/buildroot-gcc342/lib export cppflags=-i/~/opt/buildroot-gcc342/include export cc=~/opt/buildroot-gcc342/bin/mipsel-linux-uclib-gcc 

also, i've installed quota package, removed -w flag (as friends os/x suggested) , yet it's still same. compile native architecture. i've looked sources , saw these

#if _linux_quota_version < 2 struct dqblk{    ...    u_int32_t dqb_curblocks;    ... } #else #define qif_blimits     1 #define qif_space       2 ... struct dqblk{    ... } #endif 

and checked includes, , should working. new linux , cross compiling, i'm terribly sorry if question stupid. yet somehow google search results can't me far.

alright, i've found solution , i'll leave answer if encounters similar situation.

the above steps correct. yet 1 should make sure headers taken mips compiler directory. changed source code of sysquotas_4a.c specifying full path quota.h in case /opt/buildroot-gcc342/include/sys/quota.h , works fine.

cheers, constantine


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -