在openwrt上编译libffi致命错误:sys / xattr.h:没有这样的文件或目录

时间:2018-03-20 13:35:53

标签: openwrt

当我在由linkit smart 7688转发的SDK上构建libffi时,错误就出来了,我无法通过搜索找到任何帮助。 libattr / attr_copy_fd.c:25:24:致命错误:sys / xattr.h:没有这样的文件或目录

Config-build.in:12603:warning: defaults for choice values not supported
Config-build.in:12619:warning: defaults for choice values not supported
Config-build.in:14019:warning: defaults for choice values not supported
Config-build.in:14499:warning: defaults for choice values not supported
warning: (boost-libs-all) selects boost-coroutine2 which has unmet direct dependencies (PACKAGE_boost && !GCC_VERSION_4_8)
warning: (boost-libs-all) selects boost-coroutine2 which has unmet direct dependencies (PACKAGE_boost && !GCC_VERSION_4_8)
\#
\# configuration written to .config
\#
make[1]: Entering directory '/home/color/mt7688'
make[2]: Entering directory '/home/color/mt7688/feeds/packages/libs/glib2'
make[2]: Leaving directory '/home/color/mt7688/feeds/packages/libs/glib2'
make[1]: Leaving directory '/home/color/mt7688'
Config-build.in:12603:warning: defaults for choice values not supported
Config-build.in:12619:warning: defaults for choice values not supported
Config-build.in:14019:warning: defaults for choice values not supported
Config-build.in:14499:warning: defaults for choice values not supported
warning: (boost-libs-all) selects boost-coroutine2 which has unmet direct dependencies (PACKAGE_boost && !GCC_VERSION_4_8)
warning: (boost-libs-all) selects boost-coroutine2 which has unmet direct dependencies (PACKAGE_boost && !GCC_VERSION_4_8)
\#
\# configuration written to .config
\#
make[1]: Entering directory '/home/color/mt7688'
make[2]: Entering directory '/home/color/mt7688/feeds/packages/utils/attr'
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -I/home/color/mt7688/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/home/color/mt7688/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/home/color/mt7688/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/color/mt7688/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -I/home/color/mt7688/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/home/color/mt7688/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/home/color/mt7688/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/color/mt7688/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/color/mt7688/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -L/home/color/mt7688/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lib -L/home/color/mt7688/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/color/mt7688/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib " make -j1 -C /home/color/mt7688/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/attr-20170915/. AR="mipsel-openwrt-linux-uclibc-gcc-ar" AS="ccache_cc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" LD=mipsel-openwrt-linux-uclibc-ld NM="mipsel-openwrt-linux-uclibc-gcc-nm" CC="ccache_cc" GCC="ccache_cc" CXX="ccache_cxx" RANLIB="mipsel-openwrt-linux-uclibc-gcc-ranlib" STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size CROSS="mipsel-openwrt-linux-uclibc-" ARCH="mipsel" ;
make[3]: Entering directory '/home/color/mt7688/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/attr-20170915'
CC libattr/libattr_la-attr_copy_fd.lo
****libattr/attr_copy_fd.c:25:24: fatal error: sys/xattr.h: No such file or directory
\# include <sys/xattr.h>
\^****
compilation terminated.
Makefile:929: recipe for target 'libattr/libattr_la-attr_copy_fd.lo' failed
make[3]: * [libattr/libattr_la-attr_copy_fd.lo] Error 1
make[3]: Leaving directory '/home/color/mt7688/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/attr-20170915'
Makefile:93: recipe for target '/home/color/mt7688/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/attr-20170915/.built' failed
make[2]: * [/home/color/mt7688/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/attr-20170915/.built] Error 2
make[2]: Leaving directory '/home/color/mt7688/feeds/packages/utils/attr'
package/Makefile:191: recipe for target 'package/feeds/packages/attr/compile' failed
make[1]: * [package/feeds/packages/attr/compile] Error 2
make[1]: Leaving directory '/home/color/mt7688'
/home/color/mt7688/include/toplevel.mk:174: recipe for target 'package/feeds/packages/glib2/compile' failed
make: * [package/feeds/packages/glib2/compile] Error 2

1 个答案:

答案 0 :(得分:0)

默认情况下,您正在寻找的库似乎未包含在OpenWrt SDK中。 这样你就应该寻找它并手动添加它。在我的情况下,我在文件夹$ROOT_DIR/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include中有库,因此您应该找到并添加mannualy xattr.h并将其移至$ROOT_DIR/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include/sys