$ poudriere jail -cj clang7 -a amd64 -v projects/clang700-import -m svn+https $ poudriere testport -j clang7 astro/kstars [...] ld: error: unknown -z value: nodump c++: error: linker command failed with exit code 1 (use -v to see invocation) http://package18.nyi.freebsd.org/data/headamd64PR230355-default/2018-08-11_19h01m06s/logs/errors/kstars-2.9.7_1,1.log
Can be worked around via LLD_UNSAFE.
Created attachment 196188 [details] untested patch Hi there Could you give the attached (untested) patch a try? mfg Tobias
Created attachment 196189 [details] v2 (fix typo)
Comment on attachment 196189 [details] v2 (fix typo) Still fails: https://ptpb.pw/o_rN ld: error: unknown -z value: nodump c++: error: linker command failed with exit code 1 (use -v to see invocation)
Looks like LLD < 7 silently accepts any -z argument: $ cc -Wl,-z,whatever /path/to/test.c
Comment on attachment 196189 [details] v2 (fix typo) >++ execute_process(COMMAND ${CMAKE_LINKER} "-v" OUTPUT_VARIABLE LD_VERSION) CMakeCache.txt contains CMAKE_LINKER:FILEPATH=/usr/local/bin/ld. Did you mean ${CMAKE_CXX_COMPILER} "-Wl,--version" ? The build doesn't invoke linker directly.
(In reply to Jan Beich from comment #5) > Looks like LLD < 7 silently accepts any -z argument: > > $ cc -Wl,-z,whatever /path/to/test.c Old behavior was similar to BFD linker. $ cc -fuse-ld=bfd -Wl,-z,whatever /path/to/test.c $ cc -fuse-ld=/usr/local/bin/ld.bfd -Wl,-z,whatever /path/to/test.c /usr/local/bin/ld.bfd: warning: -z whatever ignored. $ cc -fuse-ld=gold -Wl,-z,whatever /path/to/test.c /usr/local/bin/ld.gold: whatever: unknown -z option /usr/local/bin/ld.gold: use the --help option for usage information cc: error: linker command failed with exit code 1 (use -v to see invocation)
(In reply to Jan Beich from comment #7) Yes, older lld silently ignored unknown -z options while 7.x exits with an error. interpose - marks the object as an interposer nodump - marks the object as not available to dldump
lld -z nodump patch in https://reviews.freebsd.org/D17173
And upstream patch posted for review: https://reviews.llvm.org/D52096 But after writing the patch Mark found that dldump was apparently added only for emacs: http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01022.html Thus IMO the patch attached to this PR is the right way to go: just drop the flag from the linking invocation.
Created attachment 200521 [details] v2 another try.
A commit references this bug: Author: tcberner Date: Sat Dec 29 18:47:12 UTC 2018 New revision: 488682 URL: https://svnweb.freebsd.org/changeset/ports/488682 Log: astro/kstars: fix linking with lld7 kstars tries to pass -z nodump to the linker, which is not supported by lld7. This patch adds a little CMake function to check whether the linker accepts that flag, and if not does not add it. PR: 230603 Reported by: jbeich Changes: head/astro/kstars/files/ head/astro/kstars/files/patch-git_b7d677a