我已经被分配到将i686交叉编译samba 4.0.5到MIPS,以便稍后将其移植到板上。我正在编译ubuntu 13.04。
我得到的错误是:
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’
The 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
我跑
./ configure --target = mips-linux-uclibc --host = i686
在此之前我运行这些:
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
另外,我已经安装了配额包,删除了-w标志(作为OS / X建议的朋友),但它仍然是相同的。它确实为本机架构编译。我也看了一下消息来源,我看到了这些
#if _LINUX_QUOTA_VERSION < 2
struct dqblk{
...
u_int32_t dqb_curblocks;
...
}
#else
#define QIF_BLIMITS 1
#define QIF_SPACE 2
...
struct dqblk{
...
}
#endif
并检查了包含,它应该正常工作。 我是linux和交叉编译的新手,所以如果这个问题很愚蠢的话,我非常抱歉。然而谷歌的搜索结果到目前为止无法帮助我。
答案 0 :(得分:0)
好吧,我找到了一个解决方案,如果有人遇到类似的情况,我会留下答案。
以上步骤完全正确。然而,应该确保标头取自MIPS编译器目录。所以我通过指定 quota.h 的完整路径更改了 sysquotas_4A.c 的源代码,在我的情况下是 / opt / buildroot-gcc342 / include /sys/quota.h 它运作得很好。
干杯, 君士坦丁