Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build with LDC 1.9.0 on Windows 10 x64 #47

Open
IvanZinkevich opened this issue May 11, 2018 · 5 comments
Open

Can not build with LDC 1.9.0 on Windows 10 x64 #47

IvanZinkevich opened this issue May 11, 2018 · 5 comments

Comments

@IvanZinkevich
Copy link

Building package dcompute in C:\Users\ivan\AppData\Local\dub\packages\dcompute-0.1.0\dcompute\
Performing "debug" build using C:\LDC\bin\ldc2.exe for x86_64.
dcompute 0.1.0: building configuration "library"...
C:\LDC\bin\..\import\std\array.d(2850,13): Error: TypeInfo cannot be used with -betterC
C:\LDC\bin\ldc2.exe failed with exit code 1.
@thewilsonator
Copy link
Collaborator

Why is it trying to build with -betterC? that broke a while ago.

@IvanZinkevich
Copy link
Author

I've got the exactly same question. I'll check the dependencies later. Maybe they require the betterC option?

@IvanZinkevich
Copy link
Author

IvanZinkevich commented May 11, 2018

It looks like dcompute package 0.1.0 on code.dlang.org has it in options. Using ~master for now. But this should be either fixed or mentioned in the documentation. How can I help with that?

@thewilsonator
Copy link
Collaborator

Looks like i need to either update that release or add a new release. Thanks for the offer though.

If you want to help (one of) the next things on my list is to add the OpenCL & CUDA API requirements as contracts (or just plain asserts) to the wrapper so that it is obvious where one using the library has stuffed up.

e.g. OpenCL's create buffer should become (from the documentation section on errors):

Buffer!T createBuffer(T)(T[] arr,Memory.Flags flags = (Memory.Flags.useHostPointer | Memory.Flags.readWrite))
{
    import std.stdio;
    assert(raw); // valid context
    assert(EnumMembers!(Memory.Flags).canFind(flags); // valid flags
    if(flags == Memory.Flags.useHostPtr || flags == Memory.Flags.copyHostPtr)
          assert(arr); // need non-null buffer if using host buffer
    else
         assert(arr is null); // 
    Buffer!T ret;
    auto len = memSize(arr);
    ret.raw = clCreateBuffer(raw,flags,len,arr.ptr,cast(int*)&status);
    ret.hostMemory = arr;
    checkErrors(); // allocation can still fail or we could be OOM
    return ret;
}

@Aphexus
Copy link

Aphexus commented Feb 28, 2019

Any news on this? Getting the same error. Maybe it's time to add a new release and fix all of it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants