我被分配将 samba 4.0.5 从 i686 交叉编译到 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 和交叉编译的新手,所以如果这个问题很愚蠢,我非常抱歉。然而到目前为止,不知何故谷歌搜索结果无法帮助我。