Skip to content

ld on MacOS X 10.9 doesn't accept -E and -rpath options anymore #1157

@nougad

Description

@nougad
$ nix-env -i ghc-7.6.3
...
building libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a
"rm" -f libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a.contents
echo libraries/ghc-prim/dist-install/build/GHC/Classes.o libraries/ghc-prim/dist-install/build/GHC/CString.o libraries/ghc-prim/dist-install/build/GHC/Debug.o libraries/ghc-prim/dist-install/build/GHC/Magic.o libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o libraries/ghc-prim/dist-install/build/GHC/IntWord64.o libraries/ghc-prim/dist-install/build/GHC/Tuple.o libraries/ghc-prim/dist-install/build/GHC/Types.o   libraries/ghc-prim/dist-install/build/cbits/debug.o libraries/ghc-prim/dist-install/build/cbits/longlong.o libraries/ghc-prim/dist-install/build/cbits/popcnt.o     >> libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a.contents
"xargs"  "/nix/store/3y3300pb3zwywb7qh5mzvxp1gf7za8l1-native-darwin-cctools-wrapper/bin/ar" clqs  libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a < libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a.contents
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a(longlong.o) has no symbols
"rm" -f libraries/ghc-prim/dist-install/build/libHSghc-prim-0.3.0.0.a.contents
building libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o
  LD libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
make[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1
make: *** [all] Error 2
builder for `/nix/store/wy8yjzihrfykr7lssngl2sfa051g975f-ghc-7.6.3.drv' failed with exit code 2
error: build of `/nix/store/wy8yjzihrfykr7lssngl2sfa051g975f-ghc-7.6.3.drv' failed

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: darwinRunning or building packages on Darwin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions