Skip to content

Commit

Permalink
llvmPackages: 11 -> 16 on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
reckenrode committed Sep 21, 2023
1 parent a8be39d commit bcbdb80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16641,7 +16641,7 @@ with pkgs;
# This returns the minimum supported version for the platform. The
# assumption is that or any later version is good.
choose = platform:
/**/ if platform.isDarwin then 11
/**/ if platform.isDarwin then 16
else if platform.isFreeBSD then 12
else if platform.isAndroid then 12
else if platform.isLinux then 11
Expand Down

5 comments on commit bcbdb80

@purcell
Copy link
Member

Choose a reason for hiding this comment

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

After a long git bisect I found that after this commit, Emacs versions from 25.1 to 27.x built with nixpkgs tooling on macOS immediately segfault on startup. I found that if I set dontStrip = true then there is no crash. I suspect that a different llvm-strip gets applied that is somehow more aggressive. I don't suppose you're aware of any such issues, or how to resolve them?

@reckenrode
Copy link
Contributor Author

Choose a reason for hiding this comment

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

#271459 and #234868 both needed different strip flags due to the way llvm-strip interacted with assembly code they were trying to link. Is this happening on x86_64-darwin, aarch64-darwin, or both?

@reckenrode
Copy link
Contributor Author

@reckenrode reckenrode commented on bcbdb80 Jan 11, 2024

Choose a reason for hiding this comment

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

Another one: #265935 required the strip from cctools be used because GCC expected flags that aren’t supported at all by llvm-strip, and trying to update old GCC versions to work with newer toolchains would have been far too much work.

@purcell
Copy link
Member

Choose a reason for hiding this comment

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

Thanks so much for the reply! I found a couple of these workarounds for llvm-strip flags when searching. In my case, Nix is constructing and running the strip command (ultimately llvm-strip -S). I think perhaps I need to set stripDebugFlags in order to strip less aggressively.

Is this happening on x86_64-darwin, aarch64-darwin, or both?

Just x86_64-darwin, but it might affect both: the problematic derivations already didn't build on aarch64-darwin for unrelated reasons (patches for the old source code would have been required).

@purcell
Copy link
Member

Choose a reason for hiding this comment

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

Using the strip from cctools seems to work for me too, so I'm going to adopt that as my local workaround. It's unsatisfying to not understand why it broke, but c'est la vie. Really appreciate your hints.

Please sign in to comment.