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

releases: use LLVM 18 for macOS #30022

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented May 2, 2024

Bumps the Guix time-machine to include a bump to LLVM 18.1.4: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=837016fe33e11c6252ec24c423d1b6ae0cd7efd3. Can split this out given it effects all releases.

Needs another patch to Qt. It's internal libpng build is broken with the newer Clang, due to:

A new Clang extension (see here) is enabled for Darwin (Apple platform) targets. Clang now defines TARGET_OS_* macros for these targets, which could break existing code bases with improper checks for the TARGET_OS_ macros.

See https://releases.llvm.org/18.1.0/tools/clang/docs/ReleaseNotes.html?1=#clang-frontend-potentially-breaking-changes.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 2, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29881 (guix: use GCC 13 to builds releases by fanquake)
  • #25573 ([POC] guix: produce a fully -static-pie bitcoind by fanquake)
  • #25391 (guix: Use LTO to build releases by fanquake)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

else
$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-22.04.tar.xz
$(package)_sha256_hash=884ee67d647d77e58740c1e645649e29ae9e8a6fe87c1376be0f3a30f3cc9ab3
$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this download link works but ubuntu-18?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this download link works but ubuntu-18?

This should be fixed in LLVM 19: https://discourse.llvm.org/t/rfc-improve-binary-security/78121/56

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. While using the pre-built bins, we have to take what is available. For some reason the person building the x86_64 bins here has reverted to that. It also means we'll need to revert to installing libtinfo5 in the macOS CI, which is also annoying, because you also can't actually install that on Ubuntu 24.04 (although we currently still use 22.04 here, so it'll work for now).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or waiting after #21778, which should be fine as well, as there is no rush to use clang 18?

@DrahtBot
Copy link
Contributor

DrahtBot commented May 3, 2024

Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

File commit 9d1a286
(master)
commit 651eda7
(master and this pull)
SHA256SUMS.part 17566951047800af... fae6330641c45c8d...
*-aarch64-linux-gnu-debug.tar.gz 28fac1a1669f452c... 1118cb408c370223...
*-aarch64-linux-gnu.tar.gz a29e21c798cb4b36... a43c60c835637192...
*-arm-linux-gnueabihf-debug.tar.gz fdde7fdf88451f95... 80743dce8fe58993...
*-arm-linux-gnueabihf.tar.gz d591d94b2b223257... 6759256e85dbfd86...
*-arm64-apple-darwin-unsigned.tar.gz aaaca486aac0e4e1... 53a6ed37bec4efa6...
*-arm64-apple-darwin-unsigned.zip cd33afb81cc88b58... 5dfc1dba4b57ddfc...
*-arm64-apple-darwin.tar.gz 31e1f7bfa358770d... f10ea9effd939c7e...
*-powerpc64-linux-gnu-debug.tar.gz bae7b182e366fcda... 08d87c06cece0f65...
*-powerpc64-linux-gnu.tar.gz cf8a5742e6da650f... 0704e0beb7c523f4...
*-riscv64-linux-gnu-debug.tar.gz 76b36c63c0cd0ad0... fc3fd5b83f2a8d7a...
*-riscv64-linux-gnu.tar.gz dbd6d4b454300761... 22926181e1d558e8...
*-x86_64-apple-darwin-unsigned.tar.gz dfe6336ef1d750e4... 5c02eb2a80fb6aff...
*-x86_64-apple-darwin-unsigned.zip 9485a1af55218534... 9c2424a76796e6db...
*-x86_64-apple-darwin.tar.gz 5eb6dcea7ad64451... ee0a232311bacfb9...
*-x86_64-linux-gnu-debug.tar.gz 95365a927f96ed56... 9ef4e9e1e489b4cc...
*-x86_64-linux-gnu.tar.gz ae4d52b923fb6ecc... b856109924c3f928...
*.tar.gz 1a3f8d5ec7ae7c45... 84bbe4bdd8e6510f...
guix_build.log 5a726c2f8805dd0d... 9b47b40a6af86983...
guix_build.log.diff a91b8b039c5781c9...

Adjust the security check for:
ld64.lld: warning: Option `-allow_stack_execute' is not yet implemented.
ld64.lld: error: -fixup_chains is incompatible with -no_pie
and to account for the embedding of LLVMs version number.
LLD enables ZERO_AR_DATE by default, setting it to zero would enable
non-determinism, setting it to any other value is ignored.

See:
https://github.com/llvm/llvm-project/blob/main/lld/docs/MachO/ld64-vs-lld.rst.
Patch Qts internal libpng to resolve the failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants