-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Minimalist iOS fixes #110101
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
Minimalist iOS fixes #110101
Conversation
This may be a better or worse solution than PR #100686 |
@@ -11624,6 +11624,7 @@ in | |||
bingrep = callPackage ../development/tools/analysis/bingrep { }; | |||
|
|||
binutils-unwrapped = callPackage ../development/tools/misc/binutils { | |||
autoreconfHook = if targetPlatform.isiOS then autoreconfHook269 else autoreconfHook; |
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.
This is annoying! When do you need to build binutils-unwrapped?
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.
It seems to get built as part of the local bootstrapping procedure after you’ve fulfilled the XCode dependency by adding it to the store. If you build the hello app you get the error, it’s pretty reproducible.
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.
@matthewbauer I think for the other tools beyond the cctools ones.
pkgs/top-level/all-packages.nix
Outdated
@@ -11869,6 +11870,7 @@ in | |||
# Can only do this is in the native case, otherwise we might get infinite | |||
# recursion if `targetPackages.stdenv.cc.cc` itself uses `gccForLibs`. | |||
then targetPackages.stdenv.cc.cc | |||
else if targetPlatform.isiOS then null |
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.
Instead, could you add this condition to https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/default.nix#L64. This way we can keep the android / ios stuff in one place.
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.
Done. If there’s a way to fix gcc compilation instead, that might be preferred - it looks like “real” libs (eg eigen and cxxopts) have some issues being built with the current toolchain (missing header files) after I’ve gotten past these errors. I don’t think a lack of gcc is the issue there, but I don’t 100% understand how building works, so I can’t rule it out.
To be clear, they initially have the same errors as hello, but whereas these changes seem to be sufficient for building hello, more may be needed for libraries which need to link libmath or include .
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.
So gccForLibs is just the gcc c++ and other runtime libraries. You shouldn’t need these on iOS where libc++ is provided.
Motivation for this change
Fix errors encountered when executing
Will also require #100687 to do a full iOS build with modern XCode. I've tried to constrain the changes to iOS as much as possible.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)