Bug 1793502 - suricata fails to build with gcc 10: multiple definition of `flow_config' and many others
Summary: suricata fails to build with gcc 10: multiple definition of `flow_config' and...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: suricata
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS PYTHON39 GCC10
TreeView+ depends on / blocked
 
Reported: 2020-01-21 13:44 UTC by Miro Hrončok
Modified: 2020-02-13 21:10 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-02-13 21:10:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-21 13:44:58 UTC
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:97: multiple definition of `flow_config'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:97: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:96: multiple definition of `flow_hash'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:96: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:94: multiple definition of `flow_recycle_q'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:94: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:91: multiple definition of `flow_spare_q'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:91: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:88: multiple definition of `flow_freefuncs'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:88: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:87: multiple definition of `flow_timeouts_emerg'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:87: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:86: multiple definition of `flow_timeouts_normal'; alert-fastlog.o:/builddir/build/BUILD/suricata-5.0.1/src/flow-private.h:86: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/tm-modules.h:73: multiple definition of `tmm_modules'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/tm-modules.h:73: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:134: multiple definition of `host_prune_idx_sc_atomic__'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:134: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:133: multiple definition of `host_counter_sc_atomic__'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:133: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:132: multiple definition of `host_memuse_sc_atomic__'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:132: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:131: multiple definition of `host_config'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:131: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:90: multiple definition of `host_hash'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/host.h:90: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/util-spm.h:74: multiple definition of `spm_table'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/util-spm.h:74: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/util-mpm.h:170: multiple definition of `mpm_default_matcher'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/util-mpm.h:170: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/util-mpm.h:169: multiple definition of `mpm_table'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/util-mpm.h:169: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/suricata.h:131: multiple definition of `trans_q'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/suricata.h:131: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/runmodes.h:112: multiple definition of `threading_set_cpu_affinity'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/runmodes.h:112: first defined here
/usr/bin/ld: detect-parse.o:/builddir/build/BUILD/suricata-5.0.1/src/unix-manager.h:30: multiple definition of `unix_manager_ctrl_mutex'; alert-debuglog.o:/builddir/build/BUILD/suricata-5.0.1/src/unix-manager.h:30: first defined here

... and many more ...

This blocks the Python 3.9 rebuild of the package.

See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/RYVPP45PMWPXYBBDKXO3CI7YGL7CDQG6/ and https://gcc.gnu.org/gcc-10/porting_to.html#common for more information about the failure.

Comment 1 Steve Grubb 2020-01-21 18:37:45 UTC
rpmbuild -ba ../suricata/suricata.spec > out.log 2>&1
cat out.log | grep 'multiple definition' | awk '{ print $6 }' | sort | uniq

`cert_id_sc_atomic__';
`default_packet_size';
`defrag_config';
`defrag_memuse_sc_atomic__';
`defragtracker_counter_sc_atomic__';
`defragtracker_hash';
`defragtracker_prune_idx_sc_atomic__';
`flow_config';
`flow_freefuncs';
`flow_hash';
`flow_manager_ctrl_cond';
`flow_manager_ctrl_mutex';
`flow_memuse_sc_atomic__';
`flow_recycle_q';
`flow_recycler_ctrl_cond';
`flow_recycler_ctrl_mutex';
`flow_spare_q';
`flow_timeouts_emerg';
`flow_timeouts_normal';
`host_config';
`host_counter_sc_atomic__';
`host_hash';
`host_memuse_sc_atomic__';
`host_hash';
`host_memuse_sc_atomic__';
`host_prune_idx_sc_atomic__';
`htp_config_flags_sc_atomic__';
`ippair_config';
`ippair_counter_sc_atomic__';
`ippair_hash';
`ippair_memuse_sc_atomic__';
`ippair_prune_idx_sc_atomic__';
`known_proto';
`mpm_default_matcher';
`mpm_table';
`sigmatch_table';
`spm_table';
`stats_decoder_events_prefix';
`stream_config';
`threading_set_cpu_affinity';
`tmm_modules';
`tmqh_table';
`trans_q';
`unix_manager_ctrl_cond';
`unix_manager_ctrl_mutex';

Simply adding extern leads to problems like:
/home/sgrubb/working/BUILD/suricata-5.0.1/src/util-mpm.c:315: undefined reference to `mpm_table'
/usr/bin/ld: util-proto-name.o: in function `SCProtoNameDeInit':
/home/sgrubb/working/BUILD/suricata-5.0.1/src/util-proto-name.c:109: undefined reference to `known_proto'
/usr/bin/ld: util-spm-bm.o: in function `SpmBMRegister':
/home/sgrubb/working/BUILD/suricata-5.0.1/src/util-spm-bm.c:504: undefined reference to `spm_table

This will take a while to sort out.

Comment 2 Ben Cotton 2020-02-11 17:30:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 3 Steve Grubb 2020-02-13 19:23:32 UTC
suricata-5.0.2 has a fix in it for the -fno-common gcc options. It has been built into rawhide and F32.


Note You need to log in before you can comment on or make changes to this bug.