-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
ld on MacOS X 10.9 doesn't accept -E and -rpath options anymore #1157
Comments
Could you please verify that the error is gone after applying this patch to your local copy of Nixpkgs? |
Does this error occur with GHC only? There should be plenty of builds in Nixpkgs that use the |
Sorry, I'm completely new to nix. So I only installed a few packages. GHC-7.6.3 and lua-5.2.2 fails for me. I tried to apply the patch but still fails:
problem for lua-5.2.2:
|
Something about your MacOS machine is different from the boxes we normally use to build Nixpkgs. Neither of these errors occurs when Hydra builds ghc or lua. I'm not a Darwin expert, I'm afraid, so I can't help much resolving this. |
I run newest Mac os x. I have installed brew in parallel with gcc/ghc/.. but I take care that this doesn't affect nix. I tried to delete whole nix but no success. Build still fails. I have no idea what I can try. I think I rebuild ghc 20 times with all modifications. But no idea. Anyway thanks for your help. If you have no problems then I's maybe me environment and you can close the ticket. |
I'm just speculating (I don't access to Darwin), but my guess is that the latest MacOS X changed in a way that affects those Nix builds, i.e. by using different a different |
We seem to have this problem on Hydra already http://hydra.nixos.org/build/6731928 |
Well, the error looks a bit different, but I suppose it's related. |
No, this looks exactly the same as my error. See my second comment on this bug. |
Ah, I see, that's probably because the build is after @peti pushed a patch -- it changed a little. |
@nougad, my patch adds the shell command
to the GHC build, but apparently that isn't good enough. Could you please edit the patched file
instead? Maybe that improves matters? |
nope. =10.9 leads to the same error:
|
OK. I have a new idea. Could you please apply this patch to a fresh version of Nixpkgs and try building GHC one more time? In case the build does not succeed, please look for a line
in the |
Sorry, it seams that I doing something wrong:
|
Oops, my mistake. I misspelled the name of the configure option. Here is a corrected patch that should work better. Sorry! |
The
I changed the But then I get again the error
So I added again:
But this leads to the same error again:
|
My guess is that this build won't succeed as long as ./configure says
I'm not sure why it won't accept that deployment target. Maybe someone else knows? Anyway, |
Hmm, maybe b579f4f is the reason why the deployment target isn't recognized ... I'm beginning to feel like the best way to deal with this situation for now is to just remove the use of @nougad, please try this patch. That one should fix the build for good, possibly at the expense of breaking shared library support, though. |
This line only occurs without the symlink I made. If I create the symlink it says: checking Mac OS X deployment target... 10.9 (/Developer/SDKs/MacOSX10.9.sdk) But the build still fails with the error. xcodebuild is for determining the xcode version and doing workarounds for <3.2 and version 4.2. But due xcodebuild binary is not found the version is set to 0.0 which is < 3.2 and so maybe this leads to an error? I don't know what |
Well, you can make The |
Ok I give up. I switch back to homebrew. Nix is not made for osx. I tried the following combinations: build symlink: :
But to change native-darwin-cctools-wrapper I needed to delete my complete
So I can't test the last two combinations with enabled xcodebuild. |
Well, there's been very little effort to make things work on MacOS, that's IMO the main reason. On homebrew there was surely much work done to make stuff work OK. Most of these tweaks should be directly portable to nix, so it's not like starting all over, but someone would have to do it first. AFAIK almost none of the most active contributors own/use a Mac, so it's very difficult for them to fix things -- they only have Hydra for detecting some build problems, with a prohibitive latency and cluttering the repo history. |
Sorry if this sounded offending. I really thank you for your help! I like the idea of nix a lot. It is a way better approach then brew. Especially all the haskell packages are interesting for me. But I think I tried compiling ghc (and other packages for example lua as well) about 30 times without any success. This is not your fault. The new mac os x is only a few weeks old and not everything is ported. I can fully understand this. Maybe I try it in the future again. |
I did not take it as offending -- I was just explaining my view why it's in this state. But a few people does seem to use nix on Macs lately, submitting pull requests, so I hope it's slowly getting better. |
Sorry, I currently have no access to any mac os x. I will try it again when I got a mac again. |
I found that ghc is buildable without xcodebuild patch in stdenv if I applied the previous patches. See d8eb6cb with which I installed ghc. I am going to make a pull request for ghc on darwin soon based on these patches. |
@wavewave, it would be great if you could submit a pull request that contains exactly those changes required to compile GHC on Darwin, but nothing else. Then it would be easier for other people to take a look at the changes. |
@peti I made a squashed pull request for this, which annihilated xcodebuild change in native-darwin-cctools-wrapper (i.e. no change there. ) |
Is this still broken? |
The original issue with GHC is fixed. I don't know about other packages that might run into this problem. |
Closing until a known issue pops up. |
Co-authored-by: Milo123459 <[email protected]> Co-authored-by: Jake Runzer <[email protected]>
when I export
MACOSX_DEPLOYMENT_TARGET=10.9
then ld doesn't complains about-rpath
but it seams that nix deletes this variable before building ghc. So even if I set the variable before I get the same error.The text was updated successfully, but these errors were encountered: