openwrt / openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Other
20.25k stars 10.48k forks source link

FS#3353 - iproute2 compilation fails due to dynsyms syntax error #8605

Closed openwrt-bot closed 2 years ago

openwrt-bot commented 4 years ago

xnoreq:

Building master:

files="e_bpf.c em_canid.c em_cmp.c em_ipset.c em_ipt.c em_meta.c em_nbyte.c em_u32.c f_basic.c f_bpf.c f_cgroup.c f_flow.c f_flower.c f_fw.c f_matchall.c f_route.c f_rsvp.c f_tcindex.c f_u32.c m_action.c m_bpf.c m_connmark.c m_csum.c m_ct.c m_ctinfo.c m_ematch.c m_estimator.c m_gact.c m_gate.c m_ife.c m_ipt.c m_mirred.c m_mpls.c m_nat.c m_pedit.c m_police.c m_sample.c m_simple.c m_skbedit.c m_skbmod.c m_tunnel_key.c m_vlan.c m_xt_old.c p_eth.c p_icmp.c p_ip.c p_ip 6.c p_tcp.c p_udp.c q_atm.c q_cake.c q_cbq.c q_cbs.c q_choke.c q_clsact.c q_codel.c q_drr.c q_dsmark.c q_etf.c q_ets.c q_fifo.c q_fq.c q_fq_codel.c q_fq_pie.c q_gred.c q_hfsc.c q_hhf.c q_htb.c q_ingress.c q_mqprio.c q_multiq.c q_netem .c q_pie.c q_plug.c q_prio.c q_qfq.c q_red.c q_rr.c q_sfb.c q_sfq.c q_skbprio.c q_taprio.c q_tbf.c static-syms.c tc.c tc_cbq.c tc_class.c tc_core.c tc_estimator.c tc_exec.c tc_filter.c tc_monitor.c tc_qdisc.c tc_red.c tc_stab.c tc_uti l.c" ; \ echo "{" > dynsyms.list ; \ for s in grep -B 3 '\<dlsym' $files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}' ; do \ sed -n '/'$s'[^ ] =/{s:. ([^ ]'$s'[^ ]) .*:\1;:;p}' $files ; \ done >> dynsyms.list ; \ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> dynsyms.list CC m_xt.so In file included from ../include/uapi/linux/netfilter_ipv4/ip_tables.h:21, from m_xt.c:19: ../include/uapi/linux/if.h:134: warning: "IFF_VOLATILE" redefined

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from m_xt.c:16: /home/user/dev/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/include/net/if.h:48: note: this is the location of the previous definition

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

CC       emp_ematch.tab.o

/home/user/dev/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/bin/ld:dynsyms.list:0: syntax error in dynamic list collect2: error: ld returned 1 exit status make[5]: *** [Makefile:174: m_xt.so] Error 1

The dynsyms file contains: $ cat ./build_dir/target-mips_24kc_musl/linux-ath79_generic/iproute2-tc/iproute2-5.8.0/tc/dynsyms.list { bpf_action_util; connmark_action_util; csum_action_util; ct_action_util; ctinfo_action_util; gact_action_util; gate_action_util; ife_action_util; ipt_action_util; mirred_action_util; mpls_action_util; nat_action_util; pedit_action_util; police_action_util; sample_action_util; simple_action_util; skbedit_action_util; skbmod_action_util; tunnel_key_action_util; vlan_action_util; ipt_action_util; canid_ematch_util; cmp_ematch_util; ipset_ematch_util; ipt_ematch_util; meta_ematch_util; nbyte_ematch_util; u32_ematch_util; p_pedit_eth; p_pedit_icmp; p_pedit_ip; p_pedit_ip6; p_pedit_tcp; p_pedit_udp; atm_qdisc_util; cake_qdisc_util; cbq_qdisc_util; cbs_qdisc_util; choke_qdisc_util; clsact_qdisc_util; codel_qdisc_util; drr_qdisc_util; dsmark_qdisc_util; etf_qdisc_util; ets_qdisc_util; bfifo_qdisc_util; pfifo_qdisc_util; pfifo_head_drop_qdisc_util; pfifo_fast_qdisc_util; fq_qdisc_util; fq_codel_qdisc_util; fq_pie_qdisc_util; gred_qdisc_util; hfsc_qdisc_util; hhf_qdisc_util; htb_qdisc_util; ingress_qdisc_util; mqprio_qdisc_util; multiq_qdisc_util; netem_qdisc_util; pie_qdisc_util; plug_qdisc_util; prio_qdisc_util; qfq_qdisc_util; red_qdisc_util; rr_qdisc_util; sfb_qdisc_util; sfq_qdisc_util; skbprio_qdisc_util; taprio_qdisc_util; tbf_qdisc_util; basic_filter_util; bpf_filter_util; cgroup_filter_util; flow_filter_util; flower_filter_util; fw_filter_util; matchall_filter_util; route_filter_util; rsvp_filter_util; rsvp6_filter_util; tcindex_filter_util; u32_filter_util; bpf_exec_util; show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };

openwrt-bot commented 4 years ago

aaronjg:

dupe of https://bugs.openwrt.org/index.php?do=details&task_id=3340

openwrt-bot commented 4 years ago

xnoreq:

@aaronjg: not sure if this is really a duplicate, this is a linker error, the other one a compilation error

openwrt-bot commented 3 years ago

ynezz:

Spotted today by the buildbot as well http://buildbot.openwrt.org/master/images/builders/realtek%2Fgeneric/builds/40/steps/pkgbuild

mv -f .deps/libjoolnl_la-stats.Tpo .deps/libjoolnl_la-stats.Plo CC em_ipset.o In file included from tc_util.h:7, from m_ematch.h:11, from em_ipt.c:16: ../include/uapi/linux/if.h:134: warning: "IFF_VOLATILE" redefined

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from ../include/xtables.h:17, from em_ipt.c:15: /builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include/net/if.h:48: note: this is the location of the previous definition

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

CC       tc_core.o
CC       tc_red.o

In file included from tc_util.h:7, from m_ematch.h:11, from em_ipset.c:42: ../include/uapi/linux/if.h:134: warning: "IFF_VOLATILE" redefined

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from ../include/xtables.h:17, from em_ipset.c:26: /builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include/net/if.h:48: note: this is the location of the previous definition

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

CC       tc_cbq.o

libtool: compile: mips-openwrt-linux-musl-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.4\" "-DPACKAGE_STRING=\"Jool 4.1.4\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_POW=1 -DHAVE_LIBARGP=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/usr/include -I/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include/fortify -I/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include -Wall -pedantic -std=gnu11 -I../../../src -I/builder/shared-workdir/build/staging_dir/target-mips_4kec_musl/usr/include/libnl3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=4kec -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/build_dir/target-mips_4kec_musl/linux-realtek_generic/jool-4.1.4=jool-4.1.4 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -MT libjoolnl_la-wrapper-global.lo -MD -MP -MF .deps/libjoolnl_la-wrapper-global.Tpo -c wrapper-global.c -o libjoolnl_la-wrapper-global.o CC tc_stab.o CC tc_qevent.o CC tc_estimator.o libtool: compile: mips-openwrt-linux-musl-gcc -DPACKAGE_NAME=\"Jool\" -DPACKAGE_TARNAME=\"jool\" -DPACKAGE_VERSION=\"4.1.4\" "-DPACKAGE_STRING=\"Jool 4.1.4\"" -DPACKAGE_BUGREPORT=\"jool@nic.mx\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jool\" -DVERSION=\"4.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_INET_NTOA=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRTOL=1 -DHAVE_POW=1 -DHAVE_LIBARGP=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/usr/include -I/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include/fortify -I/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include -Wall -pedantic -std=gnu11 -I../../../src -I/builder/shared-workdir/build/staging_dir/target-mips_4kec_musl/usr/include/libnl3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=4kec -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -ffile-prefix-map=/builder/shared-workdir/build/build_dir/target-mips_4kec_musl/linux-realtek_generic/jool-4.1.4=jool-4.1.4 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -MT libjoolnl_la-wrapper-types.lo -MD -MP -MF .deps/libjoolnl_la-wrapper-types.Tpo -c wrapper-types.c -o libjoolnl_la-wrapper-types.o files="q_fifo.c q_pie.c tc_estimator.c m_mirred.c p_udp.c m_ctinfo.c q_taprio.c em_ipt.c q_clsact.c q_fq_codel.c f_bpf.c m_csum.c q_dsmark.c tc_monitor.c m_nat.c m_ematch.c q_fq.c tc_cbq.c m_action.c p_ip6.c q_drr.c m_simple.c q_plug.c tc_qevent.c f_cgroup.c f_matchall.c p_ip.c f_flow.c q_choke.c f_rsvp.c q_htb.c m_ipt.c q_tbf.c m_ife.c tc_util.c m_gate.c tc_qdisc.c m_mpls.c m_sample.c q_qfq.c em_cmp.c q_hfsc.c em_nbyte.c q_skbprio.c q_rr.c em_meta.c m_estimator.c static-syms.c m_pedit.c f_basic.c em_ipset.c q_cbs.c p_tcp.c f_tcindex.c m_gact.c f_flower.c em_canid.c p_icmp.c tc_stab.c q_ets.c q_multiq.c q_etf.c q_atm.c tc_red.c q_gred.c q_codel.c tc_exec.c p_eth.c f_route.c m_connmark.c f_fw.c q_cbq.c f_u32.c tc.c q_prio.c q_cake.c q_ingress.c q_hhf.c em_u32.c m_ct.c m_vlan.c tc_filter.c q_sfb.c tc_core.c q_netem.c m_skbmod.c tc_class.c m_bpf.c m_skbedit.c q_red.c q_mqprio.c q_fq_pie.c m_police.c m_xt_old.c m_tunnel_key.c q_sfq.c e_bpf.c" ; \ echo "{" > dynsyms.list ; \ for s in grep -B 3 '\<dlsym' $files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}' ; do \ sed -n '/'$s'[^ ] =/{s:. ([^ ]'$s'[^ ]) .*:\1;:;p}' $files ; \ done >> dynsyms.list ; \ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> dynsyms.list CC m_xt.so In file included from ../include/uapi/linux/netfilter_ipv4/ip_tables.h:21, from m_xt.c:19: ../include/uapi/linux/if.h:134: warning: "IFF_VOLATILE" redefined

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\

In file included from m_xt.c:16: /builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/include/net/if.h:48: note: this is the location of the previous definition

define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| \

CC       emp_ematch.tab.o
CC       emp_ematch.lex.o

/builder/shared-workdir/build/staging_dir/toolchain-mips_4kec_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/../../../../mips-openwrt-linux-musl/bin/ld:dynsyms.list:0: syntax error in dynamic list collect2: error: ld returned 1 exit status Makefile:175: recipe for target 'm_xt.so' failed make[4]: [m_xt.so] Error 1 make[4]: Waiting for unfinished jobs.... mv -f .deps/libjoolnl_la-wrapper-types.Tpo .deps/libjoolnl_la-wrapper-types.Plo rm emp_ematch.lex.c Makefile:64: recipe for target 'all' failed make[3]: [all] Error 2 make[3]: Leaving directory '/builder/shared-workdir/build/build_dir/target-mips_4kec_musl/linux-realtek_generic/iproute2-tc/iproute2-5.10.0' Makefile:201: recipe for target '/builder/shared-workdir/build/build_dir/target-mips_4kec_musl/linux-realtek_generic/iproute2-tc/iproute2-5.10.0/.built' failed make[2]: [/builder/shared-workdir/build/build_dir/target-mips_4kec_musl/linux-realtek_generic/iproute2-tc/iproute2-5.10.0/.built] Error 2 make[2]: Leaving directory '/builder/shared-workdir/build/package/network/utils/iproute2' time: package/network/utils/iproute2/tc/compile#33.69#1.85#23.31 ERROR: package/network/utils/iproute2 failed to build (build variant: tc). package/Makefile:112: recipe for target 'package/network/utils/iproute2/compile' failed

openwrt-bot commented 3 years ago

guidosarducci:

I routinely rebuild iproute2 and don't see this error. Is it still occurring, and is it related to the mips_4kec arch? It would also be helpful to have a minimal reproducible config for the error if it's still being observed.

jow- commented 2 years ago

Fixed by edd53df16843a0a6380920ed17b88bfe7d26d71b