You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A DUB project with only kernel files cannot be built #61
When I run dub on such a project, I get the error message below:
Performing "debug" build using ldc2 for x86_64.
dcompute-library ~master: building configuration "library"...
/usr/local/include/d/core/internal/array/equality.d(73,119): Error: can only call functions from other @compute modules in @compute code
/usr/local/include/d/core/internal/array/equality.d(79,23): Error: can only call functions from other @compute modules in @compute code
/usr/local/include/d/core/internal/array/equality.d(79,37): Error: can only call functions from other @compute modules in @compute code
ldc2 failed with exit code 1.
What are you trying to do? Can you minimise the project that causes this problem?
That line (73)is return () @trusted { return memcmp(cast(void*)lhs.ptr, cast(void*)rhs.ptr, lhs.length * U1.sizeof) == 0; }();, which makes sense, you could mark core.stdc.string@compute(CompileFor.hostAndDevice). Please try that and report back.
It seems that the semantic analysis delves into if(__ctfe) code which I will need to fix.
Activity
thewilsonator commentedon Dec 9, 2019
What are you trying to do? Can you minimise the project that causes this problem?
That line (73)is
return () @trusted { return memcmp(cast(void*)lhs.ptr, cast(void*)rhs.ptr, lhs.length * U1.sizeof) == 0; }();, which makes sense, you could markcore.stdc.string@compute(CompileFor.hostAndDevice). Please try that and report back.It seems that the semantic analysis delves into
if(__ctfe)code which I will need to fix.thewilsonator commentedon Dec 9, 2019
ldc-developers/ldc#3253 fixes the
__ctfeissue.thewilsonator commentedon Dec 9, 2019
can you use
dub -vto print the command line? I want to see what else is on it.[-]A project with only kernel files cannot be built[/-][+]A DUB project with only kernel files cannot be built[/+]