Created attachment 247181 [details] Patch to remove errant symbol Build fails on my system. To me, it looks like the system has accidentally included something from the unit test system. The build worked for me after removing the reference to this symbol in the lds-gen.py script. Dependent ports built too, but I don't know enough about the services this port provides to test functionality. Build script and patch attached.
Created attachment 247182 [details] Build Script
Hi! Thanks for reporting. In poudriere, the build succeed as there is no python3, and the python script is not used. Locally, I've built the librdkafka with python3 to replicate your error, but error message is only a warning, so I can successfully build it. Are you enabling -Werror maybe? The offending symbol doesn't seem accidentally but explicitly included by the python script, so I'm not inclined in removing it. What do yo think?
Thanks. No, I'm not (knowingly) using -Werror. Nothing in my make.conf that could conceivably cause that. And it clearly states it as an error, not a warning. Based on the info you gave me, I got it to build by defining "WITH_LDS=n" in the make args. Interesting to know how the build changes when it uses, or doesn't use, this script. --- a/net/librdkafka/Makefile +++ b/net/librdkafka/Makefile @@ -25,7 +25,7 @@ USE_GITHUB= yes GH_ACCOUNT= edenhill GNU_CONFIGURE= yes -MAKE_ARGS= pkgconfigdir=${PREFIX}/libdata/pkgconfig +MAKE_ARGS= pkgconfigdir=${PREFIX}/libdata/pkgconfig WITH_LDS=n CONFIGURE_ARGS+= --disable-sasl \ --enable-ssl \ --enable-strip
I just got this error trying to build it. Has this been resolved yet? Based on a web search, it may also be an issue only with llvm17+. When I added in CC=clang15 (which happened to already be on my system) it also built without errors.
Created attachment 253476 [details] net/librdkafka: work around undefined version symbol error I'm seeing this too when doing a non-poudriere build. I guess it is easiest to add -Wl,--undefined-version to LDFLAGS.
The patch in this pull request - https://github.com/confluentinc/librdkafka/pull/4862 - also fixes the problem for me in FreeBSD 14.1-RELEASE-p5.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=148d4c8dd90e2fbd7d4ed05eabf06f647790b395 commit 148d4c8dd90e2fbd7d4ed05eabf06f647790b395 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-09-10 08:04:03 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-11-01 17:47:13 +0000 net/librdkafka: work around undefined version symbol error When building outside of poudriere, net/librdkafka can fail to link, with an error similar to: ld: error: version script assignment of 'global' to symbol 'rd_ut_coverage_check' failed: symbol not defined Work around this by adding -Wl,--undefined-version to LDFLAGS. While here, pet portlint. PR: 275866 Approved by: maintainer timeout (2 weeks) MFH: 2024Q4 net/librdkafka/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
A commit in branch 2024Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=27efb93a3b82722272a9af4458bc41a56d4386a5 commit 27efb93a3b82722272a9af4458bc41a56d4386a5 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-09-10 08:04:03 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-11-01 17:48:16 +0000 net/librdkafka: work around undefined version symbol error When building outside of poudriere, net/librdkafka can fail to link, with an error similar to: ld: error: version script assignment of 'global' to symbol 'rd_ut_coverage_check' failed: symbol not defined Work around this by adding -Wl,--undefined-version to LDFLAGS. While here, pet portlint. PR: 275866 Approved by: maintainer timeout (2 weeks) MFH: 2024Q4 (cherry picked from commit 148d4c8dd90e2fbd7d4ed05eabf06f647790b395) net/librdkafka/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)