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

NixOs on Mac M1 got confused between /lib and /lib64 #27

Closed
tobiasBora opened this issue Sep 1, 2022 · 6 comments
Closed

NixOs on Mac M1 got confused between /lib and /lib64 #27

tobiasBora opened this issue Sep 1, 2022 · 6 comments

Comments

@tobiasBora
Copy link

As I was trying to help someone here to use nix-ld, it seems that on the Mac M1 hardware nix-ld creates a /lib folder while softwares try to launch softwares in /lib64. So I guess that the Mac architecture should be added to the list in https://github.com/Mic92/nix-ld/blob/c25cc4b5ec65f03c2bb96f927ae724a59c51d7ee/nix-ld.nix But as I'm not an expert I may misunderstood something.

@tobiasBora
Copy link
Author

And I'm also curious: if I have a 64 bits computer but want to run 32 bits binaries, shouldn't we also populate the folder /lib even on 64 bits hardwares?

@tobiasBora
Copy link
Author

Ok, seems like M1 it actually an arm plateform so the problem comes from the package that tried to be run. That said I'm still interested to know more about how I could run 32 bits software on a 64 bits plateform.

@Mic92
Copy link
Owner

Mic92 commented Sep 2, 2022

Some processors allow 32-bit ARM code in 64-bit operating systems. Not sure if this is the case for M1.

@tobiasBora
Copy link
Author

On intel (x86_64) it is the case that 32 bit applications can run on 64 bit softwares, right? Should we create therefore an appropriate loader for this case as well? Should I open another issue?

@Mic92
Copy link
Owner

Mic92 commented Sep 3, 2022

nix-ld should already operate. It's just the nixos module that would need to be symlinked to the path where 32-bit glibc-based applications expect it.

@tobiasBora
Copy link
Author

Thanks. When you say that nix-ld should already operate you mean that the binary should work but that the module should still be modified to point to it? I created a new issue for this problem #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants