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

PyCLBlast fails to build due to clblast_c.h not found #252

Closed
enzomich opened this issue Mar 2, 2018 · 11 comments
Closed

PyCLBlast fails to build due to clblast_c.h not found #252

enzomich opened this issue Mar 2, 2018 · 11 comments

Comments

@enzomich
Copy link

enzomich commented Mar 2, 2018

I'm running on Manjaro-Cinnamon 17.1.4 and have installed CLBlast through its package manager Pamac; the file clblast_c.h is under /usr/include/CLBlast :

$ ls -l /usr/include/CLBlast/clblast_c.h 
-rw-r--r-- 1 root root 131484 Feb 26 16:33 /usr/include/CLBlast/clblast_c.h

However, sudo pip install pyclblast fails because gcc can't find it:

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -I/usr/include/python3.6m -c src/pyclblast.cpp -o build/temp.linux-x86_64-3.6/src/pyclblast.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    src/pyclblast.cpp:537:10: fatal error: clblast_c.h: No such file or directory
     #include "clblast_c.h"
              ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
@CNugteren
Copy link
Owner

Thanks for reporting. So it seems you've installed CLBlast in a non-default path, but that's maybe the fault of the package manager? What if you copy clblast_c.h into /usr/include instead?

Do you have a reference to the CLBlast package in Pamac? I'm not maintaining that myself, so not sure how to change anything there.

@enzomich
Copy link
Author

enzomich commented Mar 3, 2018

Hi Cedric,
Thanks for the prompt reply. The installation does complete successfully after creating suitable symbolic links:
sudo ln -s /usr/include/CLBlast/clblast* /usr/include/

The CLBlast package installed by Pamac, clblast-git, is actually sourced not from the Manjaro repository but from AUR, the Arch User Archive (Manjaro is a derivative from the Arch distribution). Here is its page: https://aur.archlinux.org/packages/clblast-git .
Upon registration, from that page it's possible to submit requests to the package maintainer.

@CNugteren
Copy link
Owner

OK, good to hear, and thanks for the link - I'll add it to the CLBlast README as well.

Alternatively, I can ship a clblast_c.h with the Python package, perhaps that's a better idea? I've seen other cases (e.g. pyclblas) where this is done.

@enzomich
Copy link
Author

enzomich commented Mar 3, 2018

Alternatively, I can ship a clblast_c.h with the Python package, perhaps that's a better idea? I've seen other cases (e.g. pyclblas) where this is done.

That would work, but then you'd have to keep it aligned with any change in the original clblast_c.h . I'd rather try to persuade the maintainer of the AUR package to place the header files in standard locations...

@Schmetzler
Copy link

I changed the PKGBUILD it should now install in the standard location. I had a reason why I put it in this non-standard location, but I forgot it.

@CNugteren
Copy link
Owner

@Schmetzler Thanks for the quick fix!

@enzomich Can you confirm that this is solved and close the issue if this is indeed the case?

@enzomich
Copy link
Author

enzomich commented Mar 6, 2018

Yes, I confirm. Thank you @Schmetzler!

@JaniKallankari
Copy link

In Windows 10 this error is still present in pip-19.0.2-py2.py3-none-any.whl :

src\pyclblast.cpp(538): fatal error C1083: Cannot open include file: 'clblast_c.h': No such file or directory

Do you have any ideas how to fix this in windows?

@Schmetzler
Copy link

In Windows 10 this error is still present in pip-19.0.2-py2.py3-none-any.whl :

src\pyclblast.cpp(538): fatal error C1083: Cannot open include file: 'clblast_c.h': No such file or directory

Do you have any ideas how to fix this in windows?

This seems not like an issue like the original post. I think it is a problem that clblast is not correctly installed or it is not in the path..

I guess this is more or less a windows issue, as in windows the libraries (and header files) are not in a common location but somewhere in the system. My advice is that you should check the installation of clblast first and put the directory -- where the clblast_c.h is located -- to the PATH.

@robotics-dev-0101
Copy link

robotics-dev-0101 commented Feb 19, 2020

I didn't manage to install the pyclblast in windows I always get this error:

src\pyclblast.cpp(611): fatal error C1083: Cannot open include file: 'clblast_c.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2

ERROR: Failed building wheel for pyclblast

could anyone help please?

@CNugteren
Copy link
Owner

CNugteren commented Feb 19, 2020

But did you indeed install CLBlast itself first? And if so, are the paths properly set as mentioned above? Again, this is unrelated to the original issue.

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

No branches or pull requests

5 participants