-
Notifications
You must be signed in to change notification settings - Fork 135
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
Error when building OpenCL ICD Loader using MinGW #11
Comments
Thanks for the link and description of the MinGW issue. Will you be able to create a pull request with a fix? There is an existing pull request that adds an option to compile a static library. I will consider merging it. |
Unsure if this is related, however seems worth mentioning. successful x64 build log:
unsuccessful x32 build log:
|
I should add that MINGW had been built with these patches |
I am not sure what fix is needed here. I haven't had the bandwidth yet to install MinGW and try building with it. I am happy to take patches from someone who knows what's going on with the build. Marking this as enhancement for now. |
I recently added w64-MinGW SEH gcc 4.9 to 8 to the AppVeyor CI matrix of my Conan package. For anyone interested in building for MinGW by themselves, there is a patch series that fixes compilation to For others who "just want the ICD loader": The compiled binaries are being pushed to Bintray. Either check the CI logs for the hash of the config that you are interested in or just download it via the Conan client. In short, this is (mostly) an upstream MinGW problem. There are declarations missing in the headers. There was a minor problem wrt. cross builds from Linux in that I'm therefore unsure whether we should add those patches here. I'd rather fix MinGW upstream, but in the meantime this is obviously less than ideal for people depending on upstream ICD to work on MinGW. |
@mmha is there is any MinGW issue for this? It would be nice if they could fix it, and start delivering compiled OpenCL ICD loader. |
This issue was automatically closed when #64 was merged. Reopening. |
Also getting this, but interestingly it only affects the i686 build, x86_64 is fine.
Any idea why? |
Hello, just FYI we've been making a lot of progress getting the OpenCL ICD loader building on MinGW, please follow the discussion here: KhronosGroup/OpenCL-SDK#58 PR #186 has the latest changes and appears to build correctly for both 64-bit and 32- bit builds (with OpenCLon12 disabled) but I'm still getting some linker warnings. I've yet to determine if these are something that needs to be fixed or not. Hopefully we're getting close to fixing this (very old) issue. Thanks! |
Compilation of OpenCL ICD Loader using MinGW gcc fails. Compiler complains about missing
InitOnceExecuteOnce
function, then linker complains about missing dl lib. More details about this problem and workaround needed to get libOpenCL.a are in this thread on StackOverflow. Please fix this.BTW, please also add some option to easily get static lib instead of shared one. I am going to link this lib with app used for computations on one of BOINC projects. It is easier to link everything statically and distribute single binary than having to provide additional libs.
The text was updated successfully, but these errors were encountered: