Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build nfq for Openwrt 14.07 #323

Closed
igodor opened this issue Aug 25, 2024 · 11 comments
Closed

Build nfq for Openwrt 14.07 #323

igodor opened this issue Aug 25, 2024 · 11 comments

Comments

@igodor
Copy link

igodor commented Aug 25, 2024

Пробую собрать бинари для старого роутера Beeline Smart Box на OpenWrt 14.07
При сборке nfqws проходит такая ошибка:

make[3]: Entering directory '/home/user/wrt/rtk_openwrt_sdk/package/zapret/nfqws'
make -C /home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws AR=rsdk-linux-ar AS="rsdk-linux-gcc -c -Os -pipe -march=5281 -fno-caller-saves" LD=rsdk-linux-ld NM=rsdk-linux-nm CC="rsdk-linux-gcc" GCC="rsdk-linux-gcc" CXX="rsdk-linux-g++" RANLIB=rsdk-linux-ranlib STRIP=rsdk-linux-strip OBJCOPY=rsdk-linux-objcopy OBJDUMP=rsdk-linux-objdump SIZE=rsdk-linux-size
make[4]: Entering directory '/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws'
rsdk-linux-gcc -s  -std=gnu99 -O3 -o nfqws *.c crypto/*.c  -lnetfilter_queue -lnfnetlink -lz
darkmagic.c: In function 'rawsend_socket':
darkmagic.c:1643:56: error: 'IP_NODEFRAG' undeclared (first use in this function)
darkmagic.c:1643:56: note: each undeclared identifier is reported only once for each function it appears in
nfqws.c: In function 'nfq_main':
nfqws.c:204:2: warning: implicit declaration of function 'nfq_set_queue_flags' [-Wimplicit-function-declaration]
nfqws.c:204:30: error: 'NFQA_CFG_F_FAIL_OPEN' undeclared (first use in this function)
nfqws.c:204:30: note: each undeclared identifier is reported only once for each function it appears in
Makefile:14: recipe for target 'nfqws' failed
make[4]: *** [nfqws] Error 1
make[4]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws'
Makefile:32: recipe for target '/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws/.built' failed
make[3]: *** [/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws/.built] Error 2
make[3]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk/package/zapret/nfqws'
package/Makefile:173: recipe for target 'package/zapret/nfqws/compile' failed
make[2]: *** [package/zapret/nfqws/compile] Error 2
make[2]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk'
package/Makefile:170: recipe for target '/home/user/wrt/rtk_openwrt_sdk/staging_dir/target-mips-rlx5281-linux/stamp/.package_compile' failed
make[1]: *** [/home/user/wrt/rtk_openwrt_sdk/staging_dir/target-mips-rlx5281-linux/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk'
/home/user/wrt/rtk_openwrt_sdk/include/toplevel.mk:171: ошибка выполнения рецепта для цели «world»
make: *** [world] Ошибка 2

Подскажите какие-нибудь рекомендации?

@bol-van
Copy link
Owner

bol-van commented Aug 26, 2024

Зачем это делать, когда есть статические бинарики под любую архитектуру ?
Они не работают ?

@igodor
Copy link
Author

igodor commented Aug 26, 2024

Да не работают, там процессор Realtek RTL8197D с архитектурой Lexra RLX5281.

@bol-van
Copy link
Owner

bol-van commented Aug 27, 2024

С ходу видно, что используется очень старый SDK и libnetfilter_queue
Откуда вообще взят этот SDK ? С официального или от самоделкиных ?
Ссылку pls

@igodor
Copy link
Author

igodor commented Aug 29, 2024

Вот SDK https://sourceforge.net/projects/rtl819x/
Но я пользовался готовой виртуалкой Ubuntu для vitrualbox отсюда https://disk.yandex.ru/d/8-qC5dafz5Q2P
Еще нашёл репозиторий https://github.com/Vyacheslav-S/openwrt-rtk819

@bol-van
Copy link
Owner

bol-van commented Aug 29, 2024

Это даже не openwrt SDK, а какой-то свой SDK с тулчейном под i386 linux.
IP_NODEFRAG , надеюсь, поправил в сорцах
а NFQA_CFG_F_FAIL_OPEN из-за старой libnetfilter_queue

или можно удалить следующий код из nfqws.c

	// accept packets if they cant be handled
	if (nfq_set_queue_flags(qh, NFQA_CFG_F_FAIL_OPEN , NFQA_CFG_F_FAIL_OPEN))
	{
		DLOG_ERR("can't set queue flags. its OK on linux <3.6\n");
		// dot not fail. not supported on old linuxes <3.6 
	}

@igodor
Copy link
Author

igodor commented Aug 29, 2024

Теперь выводит такое:

make[3]: Entering directory '/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws'
rsdk-linux-gcc -s  -std=gnu99 -O3 -o nfqws *.c crypto/*.c  -lnetfilter_queue -lnfnetlink -lz
In file included from darkmagic.c:12:0:
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:26:3: error: redeclaration of enumerator 'IPPROTO_IP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:33:5: note: previous definition of 'IPPROTO_IP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:27:3: error: redeclaration of enumerator 'IPPROTO_ICMP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:37:5: note: previous definition of 'IPPROTO_ICMP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:28:3: error: redeclaration of enumerator 'IPPROTO_IGMP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:39:5: note: previous definition of 'IPPROTO_IGMP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:29:3: error: redeclaration of enumerator 'IPPROTO_IPIP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:41:5: note: previous definition of 'IPPROTO_IPIP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:30:3: error: redeclaration of enumerator 'IPPROTO_TCP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:43:5: note: previous definition of 'IPPROTO_TCP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:31:3: error: redeclaration of enumerator 'IPPROTO_EGP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:45:5: note: previous definition of 'IPPROTO_EGP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:32:3: error: redeclaration of enumerator 'IPPROTO_PUP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:47:5: note: previous definition of 'IPPROTO_PUP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:33:3: error: redeclaration of enumerator 'IPPROTO_UDP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:49:5: note: previous definition of 'IPPROTO_UDP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:34:3: error: redeclaration of enumerator 'IPPROTO_IDP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:51:5: note: previous definition of 'IPPROTO_IDP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:35:3: error: redeclaration of enumerator 'IPPROTO_DCCP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:55:5: note: previous definition of 'IPPROTO_DCCP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:36:3: error: redeclaration of enumerator 'IPPROTO_RSVP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:63:5: note: previous definition of 'IPPROTO_RSVP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:37:3: error: redeclaration of enumerator 'IPPROTO_GRE'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:65:5: note: previous definition of 'IPPROTO_GRE' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:39:3: error: redeclaration of enumerator 'IPPROTO_IPV6'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:57:5: note: previous definition of 'IPPROTO_IPV6' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:41:3: error: redeclaration of enumerator 'IPPROTO_ESP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:67:5: note: previous definition of 'IPPROTO_ESP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:42:3: error: redeclaration of enumerator 'IPPROTO_AH'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:69:5: note: previous definition of 'IPPROTO_AH' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:44:3: error: redeclaration of enumerator 'IPPROTO_PIM'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:81:5: note: previous definition of 'IPPROTO_PIM' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:46:3: error: redeclaration of enumerator 'IPPROTO_COMP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:83:5: note: previous definition of 'IPPROTO_COMP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:47:3: error: redeclaration of enumerator 'IPPROTO_SCTP'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:85:5: note: previous definition of 'IPPROTO_SCTP' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:48:3: error: redeclaration of enumerator 'IPPROTO_UDPLITE'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:87:5: note: previous definition of 'IPPROTO_UDPLITE' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:50:3: error: redeclaration of enumerator 'IPPROTO_RAW'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:89:5: note: previous definition of 'IPPROTO_RAW' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:51:3: error: redeclaration of enumerator 'IPPROTO_MAX'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:91:5: note: previous definition of 'IPPROTO_MAX' was here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:56:8: error: redefinition of 'struct in_addr'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:141:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:125:8: error: redefinition of 'struct ip_mreq'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:254:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:130:8: error: redefinition of 'struct ip_mreqn'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/bits/in.h:107:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:136:8: error: redefinition of 'struct ip_mreq_source'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:263:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:142:8: error: redefinition of 'struct ip_msfilter'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:313:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:154:8: error: redefinition of 'struct group_req'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:290:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:159:8: error: redefinition of 'struct group_source_req'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:299:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:165:8: error: redefinition of 'struct group_filter'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/netinet/in.h:334:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:177:8: error: redefinition of 'struct in_pktinfo'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/bits/in.h:115:8: note: originally defined here
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/linux/in.h:185:8: error: redefinition of 'struct sockaddr_in'
/home/user/wrt/rtk_openwrt_sdk/staging_dir/rsdk-4.6.4-5281-EB-3.10-0.9.33-m32ub-20141001/bin/../lib/gcc/mips-linux-uclibc/4.6.4/../../../../mips-linux-uclibc/include/sys/socket.h:91:17: note: originally defined here
Makefile:14: recipe for target 'nfqws' failed
make[3]: *** [nfqws] Error 1
make[3]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws'
Makefile:32: recipe for target '/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws/.built' failed
make[2]: *** [/home/user/wrt/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/nfqws/.built] Error 2
make[2]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk/package/zapret/nfqws'
package/Makefile:173: recipe for target 'package/zapret/nfqws/compile' failed
make[1]: *** [package/zapret/nfqws/compile] Error 2
make[1]: Leaving directory '/home/user/wrt/rtk_openwrt_sdk'
/home/user/wrt/rtk_openwrt_sdk/include/toplevel.mk:171: ошибка выполнения рецепта для цели «package/nfqws/compile»
make: *** [package/nfqws/compile] Ошибка 2

@bol-van
Copy link
Owner

bol-van commented Aug 29, 2024

Понятно. Нельзя инклудить linux/*.h
Сделал так

#ifndef IP_NODEFRAG
// for very old toolchains
#define IP_NODEFRAG     22
#endif

должно сработать

@igodor
Copy link
Author

igodor commented Sep 1, 2024

Сборка успешна и работает. Спасибо!
В tpws похожая проблема:

make[3]: Entering directory '/home/user/wrt2/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/tpws'
rsdk-linux-gcc -s  -std=gnu99 -O3 -o tpws *.c  -lz -lpthread
tpws_conn.c: In function 'set_user_timeout':
tpws_conn.c:352:35: error: 'TCP_USER_TIMEOUT' undeclared (first use in this function)
tpws_conn.c:352:35: note: each undeclared identifier is reported only once for each function it appears in
Makefile:10: recipe for target 'tpws' failed
make[3]: *** [tpws] Error 1
make[3]: Leaving directory '/home/user/wrt2/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/tpws'
Makefile:32: recipe for target '/home/user/wrt2/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/tpws/.built' failed
make[2]: *** [/home/user/wrt2/rtk_openwrt_sdk/build_dir/target-mips-rlx5281-linux/tpws/.built] Error 2
make[2]: Leaving directory '/home/user/wrt2/rtk_openwrt_sdk/package/zapret/tpws'
package/Makefile:173: recipe for target 'package/zapret/tpws/compile' failed
make[1]: *** [package/zapret/tpws/compile] Error 2
make[1]: Leaving directory '/home/user/wrt2/rtk_openwrt_sdk'
/home/user/wrt2/rtk_openwrt_sdk/include/toplevel.mk:171: ошибка выполнения рецепта для цели «package/tpws/compile»
make: *** [package/tpws/compile] Ошибка 2

Решил аналогичным способом, объявив константу вручную:

#ifndef TCP_USER_TIMEOUT
// for very old toolchains
#define TCP_USER_TIMEOUT     18
#endif

@A1xdroid
Copy link

A1xdroid commented Sep 18, 2024

А можно сборку "в студию"? Тоже очень хочется свой Smartbox пролечить. Пожалуйста!

@hard-master
Copy link

А можно сборку "в студию"? Тоже очень хочется свой Smartbox пролечить. Пожалуйста!

https://disk.yandex.ru/d/LXOTTu3FJIEyBA

@bol-van
Copy link
Owner

bol-van commented Dec 15, 2024

В релизе v69.8 сделана сборка под lexra средствами github.
Прошу проверить

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@bol-van @igodor @hard-master @A1xdroid and others