dmd -run fails with Nix on macOS Mojave
Thomas Mader
thomas.mader at gmail.com
Tue Feb 19 21:27:19 UTC 2019
On Tuesday, 19 February 2019 at 21:06:29 UTC, Jonathan Marler
wrote:
> On Tuesday, 19 February 2019 at 20:37:48 UTC, Thomas Mader
> wrote:
>> On Tuesday, 19 February 2019 at 20:32:32 UTC, Thomas Mader
>> wrote:
>>> I don't know what the compiler wants to write to
>>> /var/tmp/dmd_runNVSCJp and why that fails with a Permission
>>> denied.
>>
>> Ok I found it, it's created in link.d
>
> Not sure if macos does this, but on linux you can mount
> directories as "noexec" which means you can't run executables
> that live inside those mounts. On linux you could check this
> with "mount | grep /var/tmp", not sure if it's the same on
> MacOS.
>
> (Related Issue: https://github.com/dragon-lang/rund/issues/17)
No that's not the problem.
Nix does not change mounts when a binary is run. All it's doing
is specify it's own directories and this also includes the System
Libs of macOS.
That's also the reason why official dmd package still works as
all Nix stuff is contained in one directory and is only used by
Nix executables.
Probably it's something with the C environment.
With this I could explain the thread error but the permission
denied leaves me clueless because the directory is clearly
writable.
I also already tried to patch link.d so P_tmpdir is not used
anymore but a custom dir I defined but it did not change anything.
More information about the Digitalmars-d
mailing list