Created attachment 217323 [details] Fix build with -fno-common (clang 11 and gcc 10) In base r364284, I imported clang 11 into head. Like gcc 10, it now defaults to -fno-common, meaning that duplicated global symbols will most likely lead to link errors. Here is a patch to fix this port's duplicated global symbols.
Hi, The patch doesn't look fully right. Can you double check that the symbols in question gets declared somewhere? Else it won't be possible to load this library, due to missing symbols. --HPS
(In reply to Hans Petter Selasky from comment #1) Yes, the symbols get defined in lib/libdvbv5/dvb-v5.c. They were doubly defined in a .h file, which is incorrect. The symbols for which I changed the declarations in the .h file to extern are in the .so: % nm -D /usr/local/lib/libdvbv5.so.0.0.0 | grep -F -e delivery_system_name -e dvb_v5_name -e fe_bandwidth_name -e fe_code_rate_name -e fe_guard_interval_name -e fe_hierarchy_name -e fe_inversion_name -e fe_modulation_name -e fe_pilot_name -e fe_rolloff_name -e fe_tone_name -e fe_transmission_mode_name -e fe_voltage_name 00000000000558b0 D delivery_system_name 0000000000055670 D dvb_v5_name 000000000001e360 R fe_bandwidth_name 00000000000553f0 D fe_code_rate_name 0000000000055530 D fe_guard_interval_name 0000000000055590 D fe_hierarchy_name 0000000000055600 D fe_inversion_name 0000000000055460 D fe_modulation_name 0000000000055620 D fe_pilot_name 0000000000055640 D fe_rolloff_name 00000000000555e0 D fe_tone_name 00000000000554e0 D fe_transmission_mode_name 00000000000555c0 D fe_voltage_name
Perfect. Need to submit this patch upstream too. I'll see if I can handle. Approved.
Upstream patch: commit afb123618b087f3ca2305b84fb004624662e52f0 Author: David Seifert <soap@gentoo.org> Date: Wed Feb 26 11:07:29 2020 +0100 Fix GCC 10 / -fno-common * GCC 10 switches its default symbol emission mode to cause linker errors when an object is defined more than once. Bug: https://bugs.gentoo.org/706756 Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
A commit references this bug: Author: zeising Date: Wed Aug 19 21:16:38 UTC 2020 New revision: 545453 URL: https://svnweb.freebsd.org/changeset/ports/545453 Log: multimeida/libv4l: Fix build with -fno-common Add a patch from upstream to fix the build of multimedia/libv4l with -fno-common, which is the default with llvm 11. PR: 248738 Reported by: dim MFH: 2020Q3 Changes: head/multimedia/libv4l/files/patch-afb12361.c
Committed with upstream patch. Awaiting MFH
A commit references this bug: Author: zeising Date: Thu Aug 20 19:26:59 UTC 2020 New revision: 545554 URL: https://svnweb.freebsd.org/changeset/ports/545554 Log: MFH: r545453 multimeida/libv4l: Fix build with -fno-common Add a patch from upstream to fix the build of multimedia/libv4l with -fno-common, which is the default with llvm 11. PR: 248738 Reported by: dim Approved by: ports-secteam (joenum) Changes: _U branches/2020Q3/ branches/2020Q3/multimedia/libv4l/files/patch-afb12361.c
All done and merged.