I am getting this build failure for mk-livestatus-1.2.8p25 on FreeBSD 13 and 12.2: --- livestatus.so --- ranlib livestatus.so --- livestatus.o --- c++: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument] ld: error: duplicate symbol: g_mainthread_id The 13.x build details are at: https://services.unixathome.org/poudriere/data/13amd64-dvl-git/2021-07-13_17h53m17s/logs/errors/mk-livestatus-1.2.8p25_2.log I also see pkg fallout here pkg-fallout: https://lists.freebsd.org/archives/freebsd-pkg-fallout/2021-July/050399.html
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?