-
-
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
impossible to link (ld / clang) liboping on macOS Big Sur 11 Beta #91748
Comments
This is a general issue on Big Sur and not specific to
The issue comes down to the new dyld cache and the subsequent removal of libraries from their usual filesystem locations. I am currently experimenting with updating the linker to address this issue. I will open a PR and mention it here, if I find a solution. |
I updated the linker to version 530 from the cctools port used by Nix. This is the latest version Apple currently provides as open source. However, I cannot get simple C code to link with it. This is the error message:
The same object files link successfully with the linker shipping with Xcode 11.5 (ld version 556.6). It’s possible we have to wait until Apple releases this linker version’s source. |
I created an overlay, with which I can successfully build the
|
Not working
|
Yes, I forgot to explain that properly: You cannot bootstrap my workaround on Big Sur, since it tries to build my hacked |
Thank you, I'm trying with a VM (Catalina) I received this message from Apple Feedback because I opened an issue before opening the issue in this github:
|
I tried your overlay on Catalina and it's not working in my case At each test, I obtain this error… @mroi have you an idea? |
Could you give me a |
@mroi I tried |
I can reproduce the problem here. The newer linker version appears to be more picky regarding its options than the old one. I think we just have to wait for Apple to update their linker’s source release and then integrate it step by step. Unless someone else has a better solution? |
No idea excepted looking at https://opensource.apple.com/source/cctools/ and waiting the release of new version |
@thefloweringash this is fixes is staging right? |
Yeah. It builds and links for me on my Big Sur machine. |
Hi, I just updated to big sur and met this problem. How can I use the new tdb stdenv? |
Same here, is it possible to set the nix channel to |
@nasyxx, @tscholak, I was able to get things working on Big Sur by targeting the But nothing that fancy is required, you should be able to do something like the following:
Do note though that building from |
@malob, It seems that the staging-next branch does not work.
|
@nasyxx, oh no! One thing to note is that I built my config on Catalina using |
I see! |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/is-there-a-plan-that-nix-can-bootstrap-itself-on-macos-big-sur/10043/1 |
@nasyxx once binary cache is available you can just use that. |
@domenkozar Thanks! But which binary is it? Will it be usable if I build nix from source? |
This is quite frustrating. Is there any easy way to boot to Catalina from USB key or sth? So I would be able to build everything from |
it seems works now, after updated to nixpkgs master. |
No, it does not work. Stop on boostrap-tools. The bin of boostrap-tools hasn't updated yet.
|
Closing this since initial support has been added. I opened #104580 with details about the bootstrapping issues. |
I use the following in the make file of my tool
|
This looks like a different issue. Just briefly: Your problem looks like you need to provide the If you still think this is a Nix problem, it’s probably best to open a fresh issue on GitHub. |
Hey, I'm on the latest stable Nix version and am still getting this error when running this simple test:
|
How did you start your Nix shell? When I start one using |
Thanks, I tried starting it like that and still received the same error:
For context, this is on the latest Big Sur. |
Within this shell, what are your
If yours are significantly older, it’s possible that the Nixpkgs 20.09 is simply too old for proper Big Sur support in the compiler toolchain. |
Thanks.
The results look comparable although I notice that mine searches Libsystem-osx instead of Libsystem. Is that potentially an issue? |
Your linker version is too old. I think |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-shell-rust-hello-world-ld-linkage-issue/17381/1 |
Describe the bug
Compilation fail
To Reproduce
Steps to reproduce the behavior:
~/.config/nixpkgs/config.nix
otherwise it's impossible to install on macOS:Expected behavior
Don't fail and arrive to do the linking (ld)
Output
Notify maintainers
Contributors from https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/liboping/default.nix:
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result."x86_64-darwin"
Darwin 20.0.0, macOS 10.16
no
no
nix-env (Nix) 2.3.6
"nixpkgs-20.09pre231837.2cd2e7267e5"
/Users/sycured/.nix-defexpr/channels/nixpkgs
host os detected isn't real because it's macOS 11.0 Beta, not 10.16 :
![Screen Shot 2020-06-28 at 23 00 37](https://user-images.githubusercontent.com/60801403/85971686-73a8e100-b993-11ea-87c9-e3ebecf5ebde.png)
The text was updated successfully, but these errors were encountered: