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()
Created attachment 367686 [details] Output of emerge -pqv =dev-python/pycuda-2013.1.1
Created attachment 367688 [details] failed emerge log
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
By the way, pycuda-2012.1 fails, too. Same symptom
Thanks for the report, I will look into it.
Neither a problem with pycuda-2013.1.1 and nvidia-cuda-toolkit-6.5.19, nor with nvidia-cuda-toolkit-6.5.14.
Old version removed. Please reopen if it still happens.