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

glibc: fix Darwin cross compilation for 2.32 #107744

Merged
merged 1 commit into from Dec 30, 2020

Conversation

mroi
Copy link
Contributor

@mroi mroi commented Dec 27, 2020

This PR fixes cross compilation on Darwin: some parts of the current patch are no longer needed. For the rest, I updated the line numbers so patch applies cleanly again.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 11-100 10.rebuild-linux: 0 labels Dec 27, 2020
@Gaelan
Copy link
Contributor

Gaelan commented Dec 27, 2020

Have you tried running a resulting binary on Linux? In #103517 (which I think this might be a dupe of), I needed another fix to make that work.

edit: oops, running, not building

@mroi
Copy link
Contributor Author

mroi commented Dec 28, 2020

Thanks for making me aware of this other pull request. So far I was using the cross compiler to build a Linux kernel on Darwin and this works with just the change I PR’d here. So I guess these two things (the change mentioned here and the additional change in #103517) are somewhat independent.

@Gaelan
Copy link
Contributor

Gaelan commented Dec 28, 2020

Oh, dang, you got a kernel building? Please share!

@mroi
Copy link
Contributor Author

mroi commented Dec 28, 2020

This should work (with adjustments, but I guess you can figure that out):
https://gist.github.com/mroi/de2adc196e5926ab6dae936042ae4b61

I am using this old kernel version, because I am working to get linuxkit-nix running and move forward from the last state there in baby steps. I would hope newer versions work as well.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107744 run on x86_64-darwin 1

49 packages marked as broken and skipped:
  • bareos
  • daemontools
  • librealsenseWithCuda
  • lua51Packages.lrexlib-posix
  • lua52Packages.lrexlib-posix
  • lua53Packages.lrexlib-posix
  • luaPackages.lrexlib-posix
  • luajitPackages.lrexlib-posix
  • magma
  • perl530Packages.Po4a
  • perl530Packages.TextWrapI18N
  • perl532Packages.Po4a
  • perl532Packages.TextWrapI18N
  • python37Packages.baselines
  • python37Packages.guestfs
  • python37Packages.gym
  • python37Packages.ignite
  • python37Packages.pulsectl
  • python37Packages.pycuda
  • python37Packages.pyglet
  • python37Packages.pynvml
  • python37Packages.pyrealsense2WithCuda
  • python37Packages.pytmx
  • python37Packages.rl-coach
  • python37Packages.roboschool
  • python38Packages.guestfs
  • python38Packages.gym
  • python38Packages.ignite
  • python38Packages.pulsectl
  • python38Packages.pycuda
  • python38Packages.pyglet
  • python38Packages.pynvml
  • python38Packages.pyrealsense2WithCuda
  • python38Packages.pytmx
  • python38Packages.roboschool
  • python39Packages.guestfs
  • python39Packages.gym
  • python39Packages.ignite
  • python39Packages.pulsectl
  • python39Packages.pycuda
  • python39Packages.pyglet
  • python39Packages.pynvml
  • python39Packages.pyrealsense2WithCuda
  • python39Packages.pytmx
  • python39Packages.roboschool
  • qemu_xen
  • qemu_xen_4_10
  • spark
  • statserial

@matthewbauer matthewbauer merged commit 9656774 into NixOS:master Dec 30, 2020
@mroi mroi deleted the patch-glibc branch December 30, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants