reggae icon indicating copy to clipboard operation
reggae copied to clipboard

doesnt compile on windows

Open logicfish opened this issue 6 years ago • 4 comments

Fetching unit-threaded 0.7.28 (getting selected version)... Performing "debug" build using dmd for x86. reggae 0.5.13: building configuration "executable"... payload\reggae\rules\common.d(307,9): Error: static assert "Can only create static libraries on Posix" dmd failed with exit code 1.

logicfish avatar Jul 29 '17 09:07 logicfish

This is due to a dmd bug. Basically, currently reggae can't be compiled on Windows. And then if it were I'd have to go fix the many bugs due to assumptions of running on Linux. Fortunately there are tests and they'd fail.

atilaneves avatar Jul 30 '17 12:07 atilaneves

I've got it to build now by commenting the assert. I also edited reggae.d:

private bool isExecutable(in char[] path) @trusted nothrow @nogc //TODO: @safe { version(Posix) { import core.sys.posix.unistd; import std.internal.cstring; return (access(path.tempCString(), X_OK) == 0); } version(Windows) { import core.sys.windows.shellapi; import core.sys.windows.windef; char res[MAX_PATH]; return (cast(ulong)FindExecutableA(path.ptr,null,res.ptr)>32); } }

and call.d: getConfigurations replacing array[1..$] with ".drop(1)" from std.range.

The error now is:

Couldn't execute ./dcompile ... ... '.' is not regcognized as an internal or external command, operable program or batch file.

logicfish avatar Aug 01 '17 03:08 logicfish

dub test reggae

Error: Could not execute dub describe -c unittest: Unknown build configuration: unittest

logicfish avatar Aug 01 '17 03:08 logicfish

Fixed by #114.

kinke avatar Jan 14 '21 12:01 kinke