Skip to content

A DUB project with only kernel files cannot be built #61

Open

Description

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.

Activity

  1. thewilsonator commented on Dec 9, 2019

    @thewilsonator
    Collaborator

    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.

  2. thewilsonator commented on Dec 9, 2019

    @thewilsonator
    Collaborator

    ldc-developers/ldc#3253 fixes the __ctfe issue.

  3. thewilsonator commented on Dec 9, 2019

    @thewilsonator
    Collaborator

    can you use dub -v to print the command line? I want to see what else is on it.

  4. changed the title [-]A project with only kernel files cannot be built[/-] [+]A DUB project with only kernel files cannot be built[/+] on Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions