Summary: | net-mgmt/mk-livestatus: ld: error: duplicate symbol: g_mainthread_id | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Dan Langille <dvl> | ||||
Component: | Individual Port(s) | Assignee: | Vinícius Zavam <egypcio> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | peo | ||||
Priority: | --- | Flags: | egypcio:
maintainer-feedback+
|
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Dan Langille
2021-07-13 19:20:04 UTC
ACK. thanks for sharing! I shall also update this port to a newer version I'm having issues to bring this one up to date. would report it back ASAP -- must rebuild my local poudriere-testing-env. should any1 be able to get it before me, I give the blessing. Created attachment 228774 [details]
Fix building with clang 11 ("ld: error: duplicate symbol: g_mainthread_id")
hello there! truly sorry about such a long time on the line to patch this one; good news is that we came up with a fix :)
as adopted by other ports, like:
- net-mgmt/argus3;
- net-mgmt/argus3-clients;
- net-mgmt/bandwidthd;
- and others ...
we now use CFLAGS with -fcommon to workaround it.
soon should the patch land in tree!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b1fe2ae52311869265eb74a9940a1dd502bd1e74 commit b1fe2ae52311869265eb74a9940a1dd502bd1e74 Author: Vinícius Zavam <egypcio@FreeBSD.org> AuthorDate: 2021-10-17 07:53:55 +0000 Commit: Vinícius Zavam <egypcio@FreeBSD.org> CommitDate: 2021-10-17 07:53:55 +0000 net-mgmt/mk-livestatus: fix "ld: error: duplicate symbol: g_mainthread_id" - add '-fcommon' to our CFLAGS in order to build with clang 11; - fix used by other ports as well (mentioned a few on original PR); - this is applied in a conditional way, checking OSVERSION; - while here, also added new DISTSITES. Reported by: dvl@, pkg-fallout PR: 257162 net-mgmt/mk-livestatus/Makefile | 18 ++++++++++++------ net-mgmt/mk-livestatus/distinfo | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) Same error with 12.3-STABLE and cland 12. changing .if ${OSVERSION} >= 1300000 to .if ${OSVERSION} >= 1200000 fixes it. Perhaps update the patch? |