dmd -run fails with Nix on macOS Mojave
Thomas Mader
thomas.mader at gmail.com
Sat Feb 23 18:54:09 UTC 2019
I now know a little bit more. It fails at [1] and after the
d_do_test.d object is created with:
/private/var/folders/wq/m1dnr42s42n5msqk2v8l0lfc0000gn/T/nix-build-dmd-2.084.1.drv-49/dmd/generated/osx/release/64/dmd -conf= -m64 -fPIC -g -unittest -run tools/d_do_test.d
the linking part in the newly created process with fork fails.
This is the linking command:
clang++ d_do_test.o -o /var/tmp/dmd_runNGJfCU -g -m64 -Xlinker
-no_compact_unwind -L../../phobos/generated/osx/release/64
-lphobos2 -lpthread -lm
The file /var/tmp/dmd_runNGJfCU is created with rw permissions
for my user.
If I replace the "childpid = fork();" line with "childpid = 0;"
it works.
So there seems to be something wrong with the permissions of the
child process.
[1]
https://github.com/dlang/dmd/blob/73fcf82ae1d6f0582c19e8c2ae0d09f319745521/src/dmd/link.d#L692
More information about the Digitalmars-d
mailing list