zyxmon / entware-arm

GNU General Public License v2.0
41 stars 13 forks source link

iproute2 (request) #10

Closed thewilliamchen closed 9 years ago

thewilliamchen commented 9 years ago

Hi. I've got an error with compiling iproute2 (I'd like it because dd-wrt has a nerfed version of the binary). It looks like it's trying to compile the kernel, and further down there's an "error: static declaration of 'setns' follows non-static declaration"

Are you able to compile iproute2 and push it to the repo? Thanks.

make package/network/utils/iproute2/compile V=s

make[1]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/toolchain' make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/toolchain' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/firmware/linux-firmware' make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/firmware/linux-firmware' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/kernel/linux' can't open file '/home/bchen88c/entwarearm/openwrt_trunk/../cross/.build/src/linux-2.6.36.4/.config' at /home/bchen88c/entwarearm/openwrt_trunk/scripts/kconfig.pl line 32. if [ -f /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install.clean ]; then rm -f /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install.clean; fi; echo "kernel" >> /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/kernel/linux' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/libnl-tiny' make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/libnl-tiny' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/network/utils/iproute2' CFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/include -I/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/include " CXXFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/include -I/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/include " LDFLAGS="-L/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/lib -L/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/lib -Wl,--dynamic-linker=/opt/lib/ld-linux.so.3 -Wl,-rpath,/opt/lib -Wl,-rpath-link=/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/lib -L/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/lib -L/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/lib " make -C /home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0 AR="arm-unknown-linux-gnueabi-ar" AS="arm-unknown-linux-gnueabi-gcc -c -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections" LD=arm-unknown-linux-gnueabi-ld NM="arm-unknown-linux-gnueabi-nm" CC="arm-unknown-linux-gnueabi-gcc" GCC="arm-unknown-linux-gnueabi-gcc" CXX="arm-unknown-linux-gnueabi-g++" RANLIB="arm-unknown-linux-gnueabi-ranlib" STRIP=arm-unknown-linux-gnueabi-strip OBJCOPY=arm-unknown-linux-gnueabi-objcopy OBJDUMP=arm-unknown-linux-gnueabi-objdump SIZE=arm-unknown-linux-gnueabi-size CROSS="arm-unknown-linux-gnueabi-" ARCH="arm" EXTRA_CCOPTS="-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I../include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/usr/include/libnl-tiny" KERNEL_INCLUDE="/home/bchen88c/entwarearm/openwrt_trunk/../cross/.build/src/linux-2.6.36.4/include" SHARED_LIBS="" LDFLAGS="-Wl,--gc-sections" IP_CONFIG_TINY= FPIC="-fpic" make[3]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0' make[4]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/lib' arm-unknown-linux-gnueabi-gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I../include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/usr/include/libnl-tiny -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DNO_SHARED_LIBS -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -fpic -c -o utils.o utils.c In file included from utils.c:34:0: ../include/namespace.h:34:19: error: static declaration of 'setns' follows non-static declaration static inline int setns(int fd, int nstype) ^ In file included from /home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/include/sched.h:43:0, from ../include/namespace.h:4, from utils.c:34: /home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/include/bits/sched.h:91:12: note: previous declaration of 'setns' was here extern int setns (int fd, int nstype) __THROW; ^

: recipe for target 'utils.o' failed make[4]: **\* [utils.o] Error 1 make[4]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/lib' Makefile:45: recipe for target 'all' failed make[3]: **\* [all] Error 2 make[3]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0' Makefile:148: recipe for target '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/.built' failed make[2]: **\* [/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/.built] Error 2 make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/network/utils/iproute2' package/Makefile:174: recipe for target 'package/network/utils/iproute2/compile' failed make[1]: **\* [package/network/utils/iproute2/compile] Error 2 make[1]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk' /home/bchen88c/entwarearm/openwrt_trunk/include/toplevel.mk:179: recipe for target 'package/network/utils/iproute2/compile' failed make: **\* [package/network/utils/iproute2/compile] Error I tried to compile iproute2, but it looks like make wants to compile the kernel which seems to have not have a .config. Also, further down, there was an "error: static declaration of 'setns' follows non-static declaration". Are you able to compile the package make package/network/utils/iproute2/compile V=s make[1]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/toolchain' make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/toolchain' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/firmware/linux-firmware' make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/firmware/linux-firmware' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/kernel/linux' can't open file '/home/bchen88c/entwarearm/openwrt_trunk/../cross/.build/src/linux-2.6.36.4/.config' at /home/bchen88c/entwarearm/openwrt_trunk/scripts/kconfig.pl line 32. if [ -f /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install.clean ]; then rm -f /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install.clean; fi; echo "kernel" >> /home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/pkginfo/linux.default.install make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/kernel/linux' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/libnl-tiny' make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/libs/libnl-tiny' make[2]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/package/network/utils/iproute2' CFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/include -I/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/include " CXXFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/include -I/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/include " LDFLAGS="-L/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/lib -L/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/lib -Wl,--dynamic-linker=/opt/lib/ld-linux.so.3 -Wl,-rpath,/opt/lib -Wl,-rpath-link=/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/opt/lib -L/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/lib -L/home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/usr/lib " make -C /home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0 AR="arm-unknown-linux-gnueabi-ar" AS="arm-unknown-linux-gnueabi-gcc -c -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections" LD=arm-unknown-linux-gnueabi-ld NM="arm-unknown-linux-gnueabi-nm" CC="arm-unknown-linux-gnueabi-gcc" GCC="arm-unknown-linux-gnueabi-gcc" CXX="arm-unknown-linux-gnueabi-g++" RANLIB="arm-unknown-linux-gnueabi-ranlib" STRIP=arm-unknown-linux-gnueabi-strip OBJCOPY=arm-unknown-linux-gnueabi-objcopy OBJDUMP=arm-unknown-linux-gnueabi-objdump SIZE=arm-unknown-linux-gnueabi-size CROSS="arm-unknown-linux-gnueabi-" ARCH="arm" EXTRA_CCOPTS="-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I../include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/usr/include/libnl-tiny" KERNEL_INCLUDE="/home/bchen88c/entwarearm/openwrt_trunk/../cross/.build/src/linux-2.6.36.4/include" SHARED_LIBS="" LDFLAGS="-Wl,--gc-sections" IP_CONFIG_TINY= FPIC="-fpic" make[3]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0' make[4]: Entering directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/lib' arm-unknown-linux-gnueabi-gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -mfloat-abi=soft -ffunction-sections -fdata-sections -I../include -I/home/bchen88c/entwarearm/openwrt_trunk/staging_dir/target-arm-openwrt-linux-gnueabi/usr/include/libnl-tiny -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DNO_SHARED_LIBS -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -fpic -c -o utils.o utils.c In file included from utils.c:34:0: ../include/namespace.h:34:19: error: static declaration of 'setns' follows non-static declaration static inline int setns(int fd, int nstype) ^ In file included from /home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/include/sched.h:43:0, from ../include/namespace.h:4, from utils.c:34: /home/bchen88c/entwarearm/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/include/bits/sched.h:91:12: note: previous declaration of 'setns' was here extern int setns (int __fd, int __nstype) __THROW; ^ : recipe for target 'utils.o' failed make[4]: **\* [utils.o] Error 1 make[4]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/lib' Makefile:45: recipe for target 'all' failed make[3]: **\* [all] Error 2 make[3]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0' Makefile:148: recipe for target '/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/.built' failed make[2]: **\* [/home/bchen88c/entwarearm/openwrt_trunk/build_dir/target-arm-openwrt-linux-gnueabi/iproute2-/iproute2-3.19.0/.built] Error 2 make[2]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk/package/network/utils/iproute2' package/Makefile:174: recipe for target 'package/network/utils/iproute2/compile' failed make[1]: **\* [package/network/utils/iproute2/compile] Error 2 make[1]: Leaving directory '/home/bchen88c/entwarearm/openwrt_trunk' /home/bchen88c/entwarearm/openwrt_trunk/include/toplevel.mk:179: recipe for target 'package/network/utils/iproute2/compile' failed make: **\* [package/network/utils/iproute2/compile] Error 2
zyxmon commented 9 years ago

iproute2 is already in the repo. It is a part of rtn feed https://github.com/zyxmon/rtndev-arm/tree/master/iproute2-legacy

Three packages can be installed

root@ws880:/tmp/home/root# opkg list | grep legacy
genl-legacy - 2.6.39-1 - General netlink utility frontend
ip-legacy - 2.6.39-1 - Routing control utility
tc-legacy - 2.6.39-1 - Traffic control utility

AFAIR this is the last ifroute2 version successfully compiled in Entware