I encountered this problem when I tried to build Redmine 4.1.1 on FreeBSD 12.1 STABLE. ld.lld in LLVM10 cannot recognize zlib but ld.lld in LLVM8 can recognize it as follows: # ld.lld --compress-debug-sections=zlib ld.lld: error: --compress-debug-sections: zlib is not available My environment is as follows: % ld.lld -version LLD 10.0.0 (FreeBSD llvmorg-10.0.0-0-gd32170dbd5b-1200011) (compatible with GNU linkers) % uname -aK FreeBSD XXXXXX 12.1-STABLE FreeBSD 12.1-STABLE r360560 GENERIC amd64 1201515 ld.lld in LLVM8 is no problem. % /usr/local/llvm80/bin/ld.lld --compress-debug-sections=zlib ld.lld: error: no input files Variable 'none' is recognized in LLVM10. % /usr/local/llvm80/bin/ld.lld --compress-debug-sections=zlib ld.lld: error: no input files In order to escape this problem, I temporally make a symbolic link from /usr/local/llvm80/bin/ld.lld to /usr/bin/ld. Hideki Yamamoto
A commit references this bug: Author: dim Date: Mon May 25 16:06:32 UTC 2020 New revision: 361465 URL: https://svnweb.freebsd.org/changeset/base/361465 Log: Regenerate llvm config headers to correctly enable zlib support During the initial upgrade to 10.0.0 in r357120, I generated these headers once, but they were missing zlib-related settings at that time. These should have been regenerated again during the merge of the final 10.0.0 release. Direct commit to stable/{11,12}, since head has gotten 10.0.1 in the mean time, with up-to-date generated headers. Reported by: hyama99@gmail.com PR: 246244 Changes: stable/11/lib/clang/include/clang/Config/config.h stable/11/lib/clang/include/llvm/Config/config.h stable/11/lib/clang/include/llvm/Config/llvm-config.h stable/12/lib/clang/include/clang/Config/config.h stable/12/lib/clang/include/llvm/Config/config.h stable/12/lib/clang/include/llvm/Config/llvm-config.h
A commit references this bug: Author: dim Date: Tue May 26 16:14:22 UTC 2020 New revision: 361531 URL: https://svnweb.freebsd.org/changeset/base/361531 Log: MF11 r361465: Regenerate llvm config headers to correctly enable zlib support During the initial upgrade to 10.0.0 in r357120, I generated these headers once, but they were missing zlib-related settings at that time. These should have been regenerated again during the merge of the final 10.0.0 release. Direct commit to stable/{11,12}, since head has gotten 10.0.1 in the mean time, with up-to-date generated headers. Approved by: re (gjb) Reported by: hyama99@gmail.com PR: 246244 Changes: _U releng/11.4/ releng/11.4/lib/clang/include/clang/Config/config.h releng/11.4/lib/clang/include/llvm/Config/config.h releng/11.4/lib/clang/include/llvm/Config/llvm-config.h