dmd -run fails with Nix on macOS Mojave

Thomas Mader thomas.mader at gmail.com
Tue Feb 19 22:07:58 UTC 2019


On Tuesday, 19 February 2019 at 21:34:30 UTC, Jonathan Marler 
wrote:
> Yes I'm pretty familair with how Nix works.  I'm not talking 
> about Nix changing mount settings or installing files in places 
> it shouldn't, I'm talking about where dmd stores the executable 
> its going to run.  Of course I don't know if this is the issue 
> you're running into, but if it is then it's not necessarily a 
> problem with Nix, it could just be a configuration issue with 
> DMD as to where it store temporary executables.

I ruled out that idea by now because:

- I changed dmd to use a tmpdir I created in the home dir of the 
running user and I got the same error.

- If the temporary file can not be created I think that dmd 
should output a dedicated error message: 
https://github.com/dlang/dmd/blob/6151bf8bfb21416b5857a64ab7fd8ae318ca02fb/src/dmd/link.d#L464

- The ThreadError seems to be connected to fork and the call to 
fork comes after the creation of the file in runLINK

I never tried to debug dmd with a debugger but I think it's time 
to start.


More information about the Digitalmars-d mailing list