dlangide icon indicating copy to clipboard operation
dlangide copied to clipboard

Build from IDE using dmd failed.

Open nicesai opened this issue 7 years ago • 4 comments

When building sample dlangui project, I get the following error:

Running (in C:\xxxxxx\DLang\newworkspace\newproject): C:\xxxxxx\dlang\dlangide-v0_8_5\dub.exe build --arch=x86 --compiler=dmd --build-mode=allAtOnce --build=debug Performing "debug" build using dmd for x86. derelict-util 2.0.6: building configuration "library"... Error: cannot create directory ..\..\..\..\..\..\..\..\..\Users\uuuu\AppData\Roaming\dub\packages\derelict-util-2.0.6\derelict-util\.dub\build\library-debug-windows-x86-dmd_2077-E5ED9D2A904628E158192DAC595A9DDE dmd failed with exit code 1. Builder finished with result

But when built from command line as "dub build" it works OK. Any idea why the IDE fails to build it and what is the fix? Using DMD 2.077, dlangide 0.8.5

nicesai avatar Nov 26 '17 20:11 nicesai

Do you have non-ASCII characters in user name?

buggins avatar Dec 04 '17 04:12 buggins

No, I don't have non-ascii chars in my username, I just removed it from path as I use my company laptop to test this program and want to remove my username :)

nicesai avatar Dec 05 '17 03:12 nicesai

I think I figured out the problem. The compilation fails with 'files not found' errors as indicated above if the path is too long. I suspect the path is getting truncated somewhere. If I copied the sources closer to the root of the path, I don't get the error and compilation succeeds.

But I don't know where the bug is, all I know that the compilation fails to find files if the working directory is this long (some words replaced, sorry, but the length is the same): C:\xxxxxxxxx\yyyyyyyyyyyy\zzz\aaaaaaaaaaaaaaaa\bbbb\cccccccccc\dddddddddddddddd\dlang\eeeeeeeee

But it is successful if the path is: C:\xxxxxxxxx\yyyyyyyyyyy\dproj\hello\newworkspace\hello_proj

nicesai avatar Jan 25 '18 15:01 nicesai

Probably related to this issue:

https://forum.dlang.org/thread/[email protected]

nicesai avatar Sep 19 '18 18:09 nicesai