fails to build in poudriere CURRENT jail but builds in 14.0-stable jail. There is a problem with number of errors in ld regarding HEIMDAL_ROKEN_1.0. ld: error: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_freehostent' failed: symbol not defined ld: error: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_freeifaddrs' failed: symbol not defined ld: error: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_gai_strerror' failed: symbol not defined ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1
Created attachment 247311 [details] failure log from current jail
Created attachment 247312 [details] success in 14.0-stable jail
adding cy@ to cc, who maintains heimdal in base, and might have some insights
This doesn't just affect only you. It compiles just fine in my 14-stable and 14.0-RELEASE-p4 systems, but not on my 15-current bhyve VM (seeded from 20231228 disk1.iso, but recompiled with today's patches (main-n267336-09af4bf2c98; amd64).
I see the same error on the FreeBSD Poudriere machine beefy18.nyi.freebsd.org. http://beefy18.nyi.freebsd.org/data/main-amd64-default/pf47e590a6da8_sc3268c23de/logs/errors/heimdal-7.8.0_6.log
The workaround I put in place for security/heimdal-devel a while ago was to use LLVM_DEFAULT. Probably not a long term solution but certainly a stopgap until it can be permanently fixed.
I changed the make.conf to this: DEFAULT_VERSIONS+= llvm=15 dbd=18 ssl=openssl31 perl5=5.36 Is this correct? The llvm version does not appear to change the build error.
I found a fix for this problem in the email this morning: https://lists.freebsd.org/archives/freebsd-stable/2024-January/001850.html The preferred way is fixing the port by removing the undefined symbols from the linker version script in the port, but if that is not possible or difficult, add -Wl,--undefined-version to the linker flags suppresses the error. E.g. in the port Makefile: LDFLAGS+= -Wl,--undefined-version This is working for me.
Just upgraded my Poudriere server to 13.3-RELEASE (from 13.2). The same happens here as well. So this is also applicable to 13.3-RELEASE.
Adding LDFLAGS+= -Wl,--undefined-version to the Makefile on 13.3-RELEASE also makes the port succesfully build (on my Poudriere server)
The reason is that certain functions, provided by FreeBSD, are not built by heimdal. But heimdal still provides a version.map file with them. I have a patch here which should fix this. Testing in a jail ATM.
(In reply to rdunkle from comment #8) Removing the symbols from the version script may not scale all that well because different FreeBSD versions may potentially implement others that previous versions of FreeBSD do not. The other problem is that not all symbols are reported first time through. When the first batch are removed a second set are reported. I haven't tried a third go around. I don't think it's worth the effort considering the possibility discussed in the previous paragraph.
I'll take this.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=64f7f98bb61947a72001a84f06840c374b26628d commit 64f7f98bb61947a72001a84f06840c374b26628d Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2024-03-14 21:54:29 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2024-03-14 22:08:38 +0000 security/heimdal: Fix build Fix build due to many undefined symbols listed in version.map. The problem is that the listed functions are conditionally built and since they exist in FreeBSD they are not built but they are still referenced in version.map. PR: 275979 MFH: 2024Q1 Approved by: portmgr (just fix it) security/heimdal/Makefile | 1 + 1 file changed, 1 insertion(+)
A commit in branch 2024Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=41d59911159e830876ddc60d90d3d4bdc16b9cb6 commit 41d59911159e830876ddc60d90d3d4bdc16b9cb6 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2024-03-14 21:54:29 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2024-03-15 00:26:46 +0000 security/heimdal: Fix build Fix build due to many undefined symbols listed in version.map. The problem is that the listed functions are conditionally built and since they exist in FreeBSD they are not built but they are still referenced in version.map. PR: 275979 Approved by: portmgr (just fix it) (cherry picked from commit 64f7f98bb61947a72001a84f06840c374b26628d) security/heimdal/Makefile | 1 + 1 file changed, 1 insertion(+)
*** Bug 276542 has been marked as a duplicate of this bug. ***