Bug 246244 - ld.lld in LLVM10 cannot recognize zlib in "compress-debug-sections"
Summary: ld.lld in LLVM10 cannot recognize zlib in "compress-debug-sections"
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-06 03:40 UTC by hyama99@gmail.com
Modified: 2020-05-26 16:15 UTC (History)
2 users (show)

See Also:
koobs: mfc-stable12+
koobs: mfc-stable11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hyama99@gmail.com 2020-05-06 03:40:19 UTC
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
Comment 1 commit-hook freebsd_committer 2020-05-25 16:06:45 UTC
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
Comment 2 commit-hook freebsd_committer 2020-05-26 16:15:08 UTC
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