-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
darwin.libiconv: switch to libiconvReal and add to darwin-aliases #299613
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this is the first use of the darwin compatibility abi in libiconv. I think that the substituteInPlace should be changed to replace-fail
. looking over the headers it seems that defining LIBICONV_PLUG
almost has the same effect except that the extensions are not defined.
nixpkgs/pkgs/development/libraries/libiconv/default.nix
Lines 38 to 45 in bc06191
for iconv_h_in in iconv.h.in iconv.h.build.in; do | |
substituteInPlace "include/$iconv_h_in" \ | |
--replace "#define iconv libiconv" "" \ | |
--replace "#define iconv_close libiconv_close" "" \ | |
--replace "#define iconv_open libiconv_open" "" \ | |
--replace "#define iconv_open_into libiconv_open_into" "" \ | |
--replace "#define iconvctl libiconvctl" "" \ | |
--replace "#define iconvlist libiconvlist" "" |
looks good otherwise.
I’m not surprised. I added it in anticipation of doing this PR. I originally had it build the compatible ABI unconditionally on Darwin, but it was desired to keep the upstream one the default so that
I can add it as clean up when I get home.
I think I looked at that, but it didn’t do what we need. Darwin needs a stand alone build with system symbol names (for compatibility with what Apple ships). It also needs to reexport |
I didn’t do a full bootstrap, but I did confirm libiconv built after changing it to use |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Description of changes
With #238993 and #299360, it is now possible to deprecate darwin.libiconv and switch Darwin to using upstream libiconv with a compatible ABI. This PR does that and updates packages that were using
darwin.libiconv
to use justlibiconv
.Since this affects the stdenv, I’m targeting staging. I tested by building the stdenv on both platforms and GHC on aarch64-darwin. GHC uses
install_name_tool
to swap libiconv from the system one to the one in nixpkgs, so that it built successfully is a good test of the ABI compatibility implemented. I also confirmed eval locally using ofborg’soutpaths.nix
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.