ROCm / ROCm-Device-Libs

ROCm Device Libraries
97 stars 60 forks source link

Build errors #54

Closed behindthepixels closed 6 years ago

behindthepixels commented 6 years ago

Hi,

I am trying to build this library and link it with clang opencl compiler.

However I am having a bunch of errors like the following. First several project won't build for error like this: D:\Coding\CoolProjects\ROCm-Device-Libs\opencl\src\workgroup\wgscratch.ll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x244

Other projects failed because this error: ..\utils\prepare-builtins\RelWithDebInfo\prepare-builtins.exe: no such file or directory I checked that prepare-builtins.exe is asking a bunch of .bc files, like oclc_isa_version_701.lib.bc for example. Where can I find these files? They don't seem to be in this repo.

Thanks!

yxsamliu commented 6 years ago

theoretically it should work on windows, but it is not tested on windows. linux should work.

behindthepixels commented 6 years ago

I currently don't have a linux system.

After digging more, the first issue seems to be that I am missing some files. For example, to build irif_lib, it invokes the following command: ..\utils\prepare-builtins\RelWithDebInfo\prepare-builtins.exe irif.lib.bc -o irif.amdgcn.bc

And in all the repo, I couldn't find the irif.lib.bc file, which is the 2nd parameter of the command above.

So in linux build, where is irif.lib.bc generated?

yxsamliu commented 6 years ago

Normally it should be built at irif/irif.lib.bc under your build directory. If it is not there probably there is some compilation error happening earlier.

behindthepixels commented 6 years ago

Thanks. I switched to using linux and it worked. However I am trying to used the built binaries directly on a windows system and bumped in to error: https://github.com/RadeonOpenCompute/clang-ocl/issues/4

Would you mind taking a look? @yxsamliu Thanks!