Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The llvm-18 Ubuntu Jammy (22.04) LTS binary packages don't include LLVMgold.so #87553

Closed
joshuaehill opened this issue Apr 3, 2024 · 18 comments

Comments

@joshuaehill
Copy link

The llvm-18 release binary packages for Ubuntu Jammy (22.04) published on the LLVM Debian/Ubuntu nightly packages don't seem to include the LLVMgold.so plugin required for LTO support.

In prior versions, this was included in the linker-tools package, but this file is not presently included in the llvm-18-linker-tools package.

Using the current package set for llvm-18 when using LTO, the linker complains:
/usr/bin/ld: /usr/lib/llvm-18/bin/../lib/LLVMgold.so: error loading plugin: /usr/lib/llvm-18/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory

@joshuaehill
Copy link
Author

This seems to have been mentioned before, and may be related to #84271.

@MaskRay
Copy link
Member

MaskRay commented Apr 3, 2024

Thanks for the report. I created #87567

@MaskRay
Copy link
Member

MaskRay commented Apr 3, 2024

In prior versions, this was included in the linker-tools package, but this file is not presently included in the llvm-18-linker-tools package.

@sylvestre Do you know who maintains the Ubuntu packages? It seems that they started to use cmake -DLLVM_INSTALL_TOOLCHAIN_ONLY=on ?

@sylvestre
Copy link
Collaborator

sylvestre commented Apr 3, 2024

this is me and no, we don't use LLVM_INSTALL_TOOLCHAIN_ONLY
grep on https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/18/debian/rules return 0

@MaskRay
Copy link
Member

MaskRay commented Apr 4, 2024

I confirm that the llvm-17-linker-tools package contains LLVMgold.so while llvm-18-linker-tools doesn't.

Landed #87567 to install LLVMgold.so (like we install libLTO.so) in LLVM_INSTALL_TOOLCHAIN_ONLY=on builds but @sylvestre said it might be unrelated?

https://apt.llvm.org/mantic/pool/main/l/llvm-toolchain-17/llvm-17-linker-tools_17.0.6~%2B%2B20240124120726%2B6009708b4367-1~exp1~20240124120743.47_amd64.deb

% tar tvf data.tar.zst
drwxr-xr-x root/root         0 2024-01-24 04:07 ./
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/lib/
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/lib/bfd-plugins/
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/lib/llvm-17/
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/lib/llvm-17/lib/
-rw-r--r-- root/root   4021888 2024-01-24 04:07 ./usr/lib/llvm-17/lib/LLVMPolly.so
-rw-r--r-- root/root     89848 2024-01-24 04:07 ./usr/lib/llvm-17/lib/LLVMgold.so
-rw-r--r-- root/root     69576 2024-01-24 04:07 ./usr/lib/llvm-17/lib/libLTO.so.17
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/share/
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-01-24 04:07 ./usr/share/doc/llvm-17-linker-tools/
-rw-r--r-- root/root     35092 2024-01-24 04:07 ./usr/share/doc/llvm-17-linker-tools/changelog.Debian.gz
-rw-r--r-- root/root      6897 2024-01-24 04:07 ./usr/share/doc/llvm-17-linker-tools/copyright
lrwxrwxrwx root/root         0 2024-01-24 04:07 ./usr/lib/bfd-plugins/LLVMgold-17.so -> ../llvm-17/lib/LLVMgold.so

https://apt.llvm.org/mantic/pool/main/l/llvm-toolchain-18/llvm-18-linker-tools_18.1.3~%2B%2B20240322073236%2Bef6d1ec07c69-1~exp1~20240322193248.98_amd64.deb

% tar tvf data.tar.zst
drwxr-xr-x root/root         0 2024-03-22 12:32 ./
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/lib/
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/lib/bfd-plugins/
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/lib/llvm-18/
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/lib/llvm-18/lib/
-rw-r--r-- root/root   3973096 2024-03-22 12:32 ./usr/lib/llvm-18/lib/LLVMPolly.so
-rw-r--r-- root/root     70328 2024-03-22 12:32 ./usr/lib/llvm-18/lib/libLTO.so.18.1
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/share/
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-03-22 12:32 ./usr/share/doc/llvm-18-linker-tools/
-rw-r--r-- root/root     36840 2024-03-22 12:32 ./usr/share/doc/llvm-18-linker-tools/changelog.Debian.gz
-rw-r--r-- root/root      6897 2024-03-22 12:32 ./usr/share/doc/llvm-18-linker-tools/copyright
lrwxrwxrwx root/root         0 2024-03-22 12:32 ./usr/lib/bfd-plugins/LLVMgold-18.so -> ../llvm-18/lib/LLVMgold.so

@Explorer09
Copy link

I was about to report the similar issue to Debian packages, because this affects my CI build as well (see this build log). Now I cannot use LLVM-18 with LTO anymore.

By the way, the fastest way to verify this is to see this page:
https://packages.debian.org/sid/amd64/llvm-18-linker-tools/filelist
and compare with this:
https://packages.debian.org/sid/amd64/llvm-17-linker-tools/filelist
or this:
https://packages.debian.org/experimental/amd64/llvm-19-linker-tools/filelist

And see the LLVMgold.so file is missing.

@MaskRay
Copy link
Member

MaskRay commented Apr 27, 2024

@sylvestre ^^

@sylvestre
Copy link
Collaborator

yeah, it is now fixed.
I tried to build llvm-toolchain with mold and it caused llvmgold not to be generated?!
@MaskRay do you think it is a LLVM bug ?

@Explorer09
Copy link

Can you guys tell us which version of the package will start including LLVMgold.so back? Because I need to estimate when the llvm-18 build in GitHub Actions CI will work again with LTO.

llvm-18-linker-tools_18.1.3~%2B%2B20240322073153%2Bef6d1ec07c69-1exp120240322193300.86_amd64 surely doesn't have the LLVMgold.so.

@sylvestre
Copy link
Collaborator

Can you guys tell us which version of the package will start including LLVMgold.so back? Because I need to estimate when the llvm-18 build in GitHub Actions CI will work again with LTO.

llvm-18-linker-tools_18.1.3~%2B%2B20240322073153%2Bef6d1ec07c69-1exp120240322193300.86_amd64 surely doesn't have the LLVMgold.so.

i retriggered this build for 18, it should be available in a few hours

geissonator pushed a commit to openbmc/openbmc-build-scripts that referenced this issue Apr 29, 2024
This is going to be another clang-format war around lambdas.  Grrr

llvm/llvm-project#87553

Remove llvm-linker package when the above is resolved

Change-Id: Iea0776aaa7edd483fa395e23de25ebf5a6288f71
Signed-off-by: Ed Tanous <ed@tanous.net>
@yujincheng08
Copy link
Member

yujincheng08 commented Apr 30, 2024

@sylvestre hi, could you please also fix ubuntu 24.04 support? See #90536

@sylvestre sylvestre self-assigned this Apr 30, 2024
@clundquist-stripe
Copy link

@yujincheng08
libclang-rt-dev provides these libraries on 24.04
I think it is a meta package for https://packages.ubuntu.com/eu/noble/libdevel/libclang-rt-18-dev specifically as of this writing.

@TonyXiang8787
Copy link

TonyXiang8787 commented May 3, 2024

@yujincheng08 libclang-rt-dev provides these libraries on 24.04 I think it is a meta package for https://packages.ubuntu.com/eu/noble/libdevel/libclang-rt-18-dev specifically as of this writing.

@clundquist-stripe I have tried to install libclang-rt-18-dev in Ubuntu 24.04. It still does not contain LLVMgold.so.

After some comparison, I found that llvm-17-linker-tools contains LLVMgold.so, while llvm-17-linker-tools not.

https://packages.ubuntu.com/eu/noble/amd64/llvm-17-linker-tools/filelist
https://packages.ubuntu.com/eu/noble/amd64/llvm-18-linker-tools/filelist

Maybe the latest fix is not built yet for 24.04?

@MaskRay
Copy link
Member

MaskRay commented May 9, 2024

https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-18/+bug/2064187 ("llvm-18-linker-tools does not include LLVMgold.so") seems related.

@sylvestre
Copy link
Collaborator

@MaskRay indeed :/ this is the autosync from Debian to Ubuntu. I am following up with Ubuntu to get a fix as noble is a LTS

@illwieckz
Copy link
Contributor

I don't know if it's fixed for Ubuntu Jammy 22.04, but I confirm this is not fixed yet for Mantis 23.10:

johnsonjh added a commit to BAN-AI-Multics/dps8m that referenced this issue May 13, 2024
Ubuntuu has broken LLVM 18 packages, LTO is busted.

No ETA on a fix, but the problem is well known.

Previous experience indicates that a fix may take many
months or never come at all, so disabling LTO in CI for
Ubuntu builds for now, until they get their act together.

https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-18/+bug/2064187
llvm/llvm-project#87553

Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
@Explorer09
Copy link

Ubuntu Jammy (22.04) now has an updated llvm-linker-tools package since May 15th, 2024.

@sylvestre
Copy link
Collaborator

thanks for confirming, i fixed the various issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

9 participants