On 25.11.2012 18:59, Rick "Zero_Chaos" Farina wrote:
> On 11/25/2012 11:47 AM, Justin wrote:
>> Hi,
> 
>> I would like to introduce a new eclass for packages using the nvidia
>> cuda compiler suite. Currently the eclass simply sanitize the NVCCFLAGS.
>> May be extended in the future.
> 
>> Two problems come up with using nvcc:
> 
>> * Each version only supports a limited number of gcc versions. Therefore
>> we need to pass the path to a supported gcc bindir
> 
>> * nvcc calls CXX but doesn't pass CXXFLAGS on.
> 
> This whole idea seems great but I see two issues.  Issue 1.) I'm stupid
> and don't really understand all the intricacy of the toolchain stuff and
> 2.) you didn't include an example ebuild.
> 
> Fortunately issue 1 can (at least functionally) be solved by providing a
> solution for issue 2.  If you need an ebuild to cuda.eclassify then I am
> happy to provide (or feel free to use a before and after of anything you
> have available).
> 
> https://code.google.com/p/pentoo/source/browse/portage/trunk/app-crypt/cryptohaze-combined/cryptohaze-combined-9999.ebuild
> 
> Thanks!
> Zero
> 

1)
The build fails if you are using a compiler newer then the supported ones.

In file included from /opt/cuda/include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/opt/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU
version! gcc 4.7 and up are not supported!
make[1]: *** [obj/x86_64/release/segmentationTree.cu_13.o] Error 1


or similar. Solution, tell nvcc where to find a compatible compiler.

2)
The underlying call of c compiler doesn't respect CXXFLAGS, therefore we
need to tell nvcc what to use. Otherwise only the plain NVCCFLAGS are used.


How to fix your package, depends on the buildsystem and where and how
they are calling the nvcc. Normally you need to sed it in.

Here as an example the nvidia-cuda-sdk version bump:

https://github.com/gentoo-science/sci/blob/cuda/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild


justin


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to