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

emacs: fix native compilaton on Darwin #361752

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

reckenrode
Copy link
Contributor

Fixes #360412.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@reckenrode reckenrode added the backport release-24.11 Backport PR automatically label Dec 4, 2024
@github-actions github-actions bot added the 6.topic: emacs Text editor label Dec 4, 2024
@github-actions github-actions bot added 10.rebuild-darwin: 5001+ 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 4, 2024
@antifuchs
Copy link
Contributor

I'm building this right now to test. Bit unfortunate how the way the emacs package is structured doesn't make it easy to just patch this in, but we should know more in a few hours (:

Copy link
Contributor

@jian-lin jian-lin left a comment

Choose a reason for hiding this comment

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

LGTM. I have tested it with pkgs.emacs on darwin.

@jian-lin
Copy link
Contributor

jian-lin commented Dec 4, 2024

Please re-target it to the staging branch.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 4, 2024
@antifuchs
Copy link
Contributor

While this needs some work on the emacs-overlay side, it does work with the emacs package in nixpkgs, so 👍 from me!

@github-actions github-actions bot added 6.topic: python 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: haskell 6.topic: qt/kde 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: rust 6.topic: golang 6.topic: ruby 6.topic: vim 6.topic: ocaml 6.topic: stdenv Standard environment labels Dec 4, 2024
@github-actions github-actions bot removed 6.topic: ruby 6.topic: vim 6.topic: ocaml 6.topic: stdenv Standard environment 6.topic: nodejs 6.topic: TeX Issues regarding texlive and TeX in general 6.topic: lua 6.topic: testing Tooling for automated testing of packages and modules 6.topic: java Including JDK, tooling, other languages, other VMs 6.topic: cuda Parallel computing platform and API 6.topic: lib The Nixpkgs function library 6.topic: games 6.topic: php 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 6.topic: dotnet Language: .NET 6.topic: flutter labels Dec 4, 2024
@jian-lin jian-lin added backport staging-24.11 Backport PR automatically and removed backport release-24.11 Backport PR automatically labels Dec 4, 2024
@jian-lin
Copy link
Contributor

jian-lin commented Dec 4, 2024

I re-targeted this PR to the staging branch and changed the backport label accordingly.

@github-actions github-actions bot added 10.rebuild-linux: 5001+ and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 4, 2024
@jian-lin jian-lin merged commit 454ac74 into NixOS:staging Dec 4, 2024
25 of 28 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Dec 4, 2024

Successfully created backport PR for staging-24.11:

@reckenrode reckenrode deleted the push-kzsxmymkmpov branch December 4, 2024 19:17
jian-lin added a commit to nix-community/emacs-overlay that referenced this pull request Dec 4, 2024
This mirrors NixOS/nixpkgs#361752 and removes
the warning emitted about a malfunctioning libgccjit on Darwin when
building emacs from git.

Co-authored-by: Lin Jian <me@linj.tech>
@haze
Copy link

haze commented Dec 12, 2024

@antifuchs How were you able to get this to work? I can confirm that my native-comp-driver-options contains the lib path included by this change, but I still get the compilation errors:

image

EDIT: I just checked, and /nix/store/...libSystem-B/{lib,bin} is empty.

@jian-lin
Copy link
Contributor

jian-lin commented Dec 12, 2024

@haze I failed to see the path this PR added in your picture.

nix-repl> "${pkgs.apple-sdk.sdkroot}/usr/lib"
"/nix/store/hash-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib"

Please note that this PR has not reached both nixos-24.11 and nixos-unstable channels. You can check the progress here:

To apply this fix right now, one way is to use the emacs-overlay.

@haze
Copy link

haze commented Dec 12, 2024

Ah, I had mistakingly thought that this was merged into master. Apologies for the alarm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: emacs Text editor 10.rebuild-darwin: 5001+ 10.rebuild-linux: 5001+ 12.approvals: 1 This PR was reviewed and approved by one reputable person backport staging-24.11 Backport PR automatically
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Emacs fails with libgccjit.so: error invoking gcc driver
5 participants