When building gfortran and other packages which make use of ccWrapper, it's attempting to coerce a null (dyld) to a string:
$ nix-env -f $HOME/pure-darwin -iA gfortran
installing ‘gfortran-wrapper-4.8.4’
error: cannot coerce null to a string, at "/Users/anelson/pure-darwin/pkgs/build-support/cc-wrapper/default.nix":249:50
(use ‘--show-trace’ to show detailed location information)
Looking at the source, dyld is an optional argument in cc-wrapper/default.nix, and is used in the definition of dynamicLinker:
dynamicLinker =
if !nativeLibc then
(if stdenv.system == "i686-linux" then "ld-linux.so.2" else
if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else
# ARM with a wildcard, which can be "" or "-armhf".
if stdenv.isArm then "ld-linux*.so.3" else
if stdenv.system == "powerpc-linux" then "ld.so.1" else
if stdenv.system == "mips64el-linux" then "ld.so.1" else
if stdenv.system == "x86_64-darwin" then "${dyld}/lib/dyld" else
abort "Don't know the name of the dynamic linker for this platform.")
else "";
However, in the definition of gfortran, we eventually find our way to this:
wrapCCWith = ccWrapper: libc: baseCC: ccWrapper {
nativeTools = stdenv.cc.nativeTools or false;
nativeLibc = stdenv.cc.nativeLibc or false;
nativePrefix = stdenv.cc.nativePrefix or "";
cc = baseCC;
libc = libc;
inherit stdenv binutils coreutils zlib;
};
Where the ccWrapper is being supplied as cc-wrapper. So, it seems we're not passing a dyld argument in. Unfortunately I've been unable to figure out where to find such an object to pass it. It doesn't seem to exist in stdenv.
When building
gfortran
and other packages which make use ofccWrapper
, it's attempting to coerce a null (dyld
) to a string:Looking at the source,
dyld
is an optional argument incc-wrapper/default.nix
, and is used in the definition ofdynamicLinker
:However, in the definition of
gfortran
, we eventually find our way to this:Where the
ccWrapper
is being supplied ascc-wrapper
. So, it seems we're not passing adyld
argument in. Unfortunately I've been unable to figure out where to find such an object to pass it. It doesn't seem to exist instdenv
.