| Summary: | Building heimdal from source fails on llvm16 and llvm17 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Minsoo Choo <minsoochoo0122> | ||||||
| Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> | ||||||
| Status: | Closed DUPLICATE | ||||||||
| Severity: | Affects Some People | CC: | bugs.freebsd.org, dim, freebsd, m.ne, minsoochoo0122, tatsuki_makino | ||||||
| Priority: | --- | ||||||||
| Version: | Latest | ||||||||
| Hardware: | amd64 | ||||||||
| OS: | Any | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 276104 | ||||||||
| Attachments: |
|
||||||||
|
Description
Minsoo Choo
2024-01-22 22:28:17 UTC
can you reproduce this with our port? The build log is around 2300KB, so I cannot upload it on bugzilla. I can send it through email if needed. .libs/libroken_la-snprintf.o .libs/libroken_la-socket.o .libs/libroken_la-strcollect.o .libs/libroken_la-strerror_r.o .libs/libroken_la-strpool.o .libs/libroken_la-timeval.o .libs/libroken_la-tm2time.o .libs/libroken_la-unvis.o .libs/libroken_la-verify.o .libs/libroken_la-vis.o .libs/libroken_la-warnerr.o .libs/libroken_la-write_pid.o .libs/libroken_la-xfree.o .libs/copyhostent.o .libs/ecalloc.o .libs/emalloc.o .libs/erealloc.o .libs/estrdup.o .libs/strlwr.o .libs/strsep_copy.o .libs/strupr.o -L/usr/local/lib -lcrypt -lpthread -O2 -fstack-protector-strong -Wl,--version-script -Wl,./version-script.map -Wl,-rpath -Wl,/usr/local/lib/heimdal:/usr/lib -fstack-protector-strong -Wl,-soname -Wl,libroken.so.18 -o .libs/libroken.so.18.1.0 ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'cgetcap' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'cgetclose' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'cgetmatch' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'cgetnum' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'cgetset' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'cgetustr' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'err' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'errx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'hex_decode' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'hex_encode' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_asprintf' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_cgetent' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_cgetstr' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_closefrom' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_flock' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_fnmatch' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_freeaddrinfo' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_freehostent' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_freeifaddrs' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_gai_strerror' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_getaddrinfo' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_getifaddrs' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_getipnodebyaddr' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_getipnodebyname' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_getnameinfo' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_getprogname' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_glob' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_globfree' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_inet_ntop' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_inet_pton' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_localtime_r' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_memset_s' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_mkstemp' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_readv' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strerror' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strerror_r' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_setprogname' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strftime' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strlcat' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strlcpy' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strndup' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strnlen' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strptime' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strsvis' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strsvisx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strtoll' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strtoull' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strunvisx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strvis' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_strvisx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_svis' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_timegm' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_tdelete' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_tfind' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_tsearch' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_twalk' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_vasprintf' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_vis' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'rk_vsnprintf' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'simple_execl' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'verr' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'verrx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'vwarn' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'vwarnx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'warn' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'warnx' failed: symbol not defined ld: warning: version script assignment of 'HEIMDAL_ROKEN_1.0' to symbol 'writev' failed: symbol not defined (similar warnings for other .la builds) FreeBSD 14 with llvm16 builds with warnings, which says symbols are not defined. This becomes an error with llvm17. Created attachment 248205 [details] Patch adjusting LDFLAGS to build on newer clang versions After stumbling onto this issue myself, I found a (temporary?) workaround here: https://reviews.llvm.org/D135402 Gathering from the comments there, this issue should be addressed properly upstream, but for the time being the submitted patch should be sufficient. This behavior changes depending on whether configure is able to use --version-script.
Some ports have problems there, but ${WRKSRC}/cf/version-script.m4 of security/heimdal seems to have no problems.
It seems to be fine using clang17.
Almost all of version-script file names in heimdal are version-script.map.
Of these, only ${WRKSRC}/lib/roken/version-script.map seems to have a problem.
The file even contains symbol names that seem to be in the C language specification.
Those unnecessary symbol names will need to be removed.
Created attachment 249056 [details]
security/heimdal: fix build with lld 17
Fixed by https://cgit.freebsd.org/ports/commit/?id=64f7f98bb61947a72001a84f06840c374b26628d for bug 275979. *** This bug has been marked as a duplicate of bug 275979 *** |