Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 497862 - dev-python/pycuda-2013.1.1 - src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
Summary: dev-python/pycuda-2013.1.1 - src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-01-12 08:04 UTC by kPbIC
Modified: 2020-03-28 17:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
output of emerge --info '=dev-python/pycuda-2013.1.1' (emerge--info.lzma,2.80 KB, application/x-lzma)
2014-01-12 08:04 UTC, kPbIC
Details
Output of emerge -pqv =dev-python/pycuda-2013.1.1 (emerge-pqv.lzma,317 bytes, application/x-lzma)
2014-01-12 08:06 UTC, kPbIC
Details
failed emerge log (failed.emerge.log.lzma,1.92 KB, application/x-lzma)
2014-01-12 08:09 UTC, kPbIC
Details
Cure for the bug (diff,405 bytes, patch)
2014-01-12 08:13 UTC, kPbIC
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kPbIC 2014-01-12 08:04:59 UTC
Created attachment 367684 [details]
output of emerge --info '=dev-python/pycuda-2013.1.1'

=dev-python/pycuda-2013.1.1 does not compile under Python2.7 if cuda.h is not in include path. Emerge log fragment:

creating /tmp/portage/dev-python/pycuda-2013.1.1-r1/work/pycuda-2013.1.1-python2_7/temp.linux-x86_64-2.7/bpl-subset/bpl_subset/libs/thread/src/pthread
x86_64-pc-linux-gnu-g++ -pthread -O2 -march=native -pipe -fPIC -DBOOST_PYTHON_SOURCE=1 -DHAVE_CURAND=1 -DPYGPU_PACKAGE=pycuda -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PYCUDA=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_THREAD_BUILD_DLL=1 -Dboost=pycudaboost -DBOOST_ALL_NO_LIB=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/usr/local/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c src/cpp/cuda.cpp -o /tmp/portage/dev-python/pycuda-2013.1.1-r1/work/pycuda-2013.1.1-python2_7/temp.linux-x86_64-2.7/src/cpp/cuda.o
In file included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1

I found a cure for this disease. siteconf.py (generated by python_configure() ) should be copied to ${S}. See attached ebuild diff

Steps to reproduce the bug:
1) enable python 2.7 
2) make sure cuda.h is not available. 

echo '#include <cuda.h>'|gcc -xc - -o a.out

The command should fail:

<stdin>:1:18: fatal error: cuda.h: No such file or directory

3) update package.mask to allow =dev-python/pycuda-2013.1.1
4) emerge =dev-python/pycuda-2013.1.1. Result: error in src_compile()
Comment 1 kPbIC 2014-01-12 08:06:37 UTC
Created attachment 367686 [details]
Output of emerge -pqv =dev-python/pycuda-2013.1.1
Comment 2 kPbIC 2014-01-12 08:09:05 UTC
Created attachment 367688 [details]
failed emerge log
Comment 3 kPbIC 2014-01-12 08:13:31 UTC
Created attachment 367690 [details, diff]
Cure for the bug

Fixed ebuild compiles successfully

The trick is to put most of generated siteconf.py into directory containing setup.py (which happens to be ${S})

The grep command removes python version information from siteconf.py and sends the file to $S/siteconf.py
Comment 4 kPbIC 2014-01-12 08:27:00 UTC
By the way, pycuda-2012.1 fails, too. Same symptom
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2014-01-13 08:04:05 UTC
Thanks for the report, I will look into it.
Comment 6 Marius Brehler 2014-11-30 14:37:37 UTC
Neither a problem with pycuda-2013.1.1 and nvidia-cuda-toolkit-6.5.19, nor with nvidia-cuda-toolkit-6.5.14.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-03-28 17:24:45 UTC
Old version removed.  Please reopen if it still happens.