Gentoo Archives: gentoo-dev

From: Justin <jlec@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New eclass cuda.eclass
Date: Sun, 25 Nov 2012 19:14:58
Message-Id: 50B26E02.9010006@gentoo.org
In Reply to: Re: [gentoo-dev] New eclass cuda.eclass by "Rick \\\"Zero_Chaos\\\" Farina"
1 On 25.11.2012 18:59, Rick "Zero_Chaos" Farina wrote:
2 > On 11/25/2012 11:47 AM, Justin wrote:
3 >> Hi,
4 >
5 >> I would like to introduce a new eclass for packages using the nvidia
6 >> cuda compiler suite. Currently the eclass simply sanitize the NVCCFLAGS.
7 >> May be extended in the future.
8 >
9 >> Two problems come up with using nvcc:
10 >
11 >> * Each version only supports a limited number of gcc versions. Therefore
12 >> we need to pass the path to a supported gcc bindir
13 >
14 >> * nvcc calls CXX but doesn't pass CXXFLAGS on.
15 >
16 > This whole idea seems great but I see two issues. Issue 1.) I'm stupid
17 > and don't really understand all the intricacy of the toolchain stuff and
18 > 2.) you didn't include an example ebuild.
19 >
20 > Fortunately issue 1 can (at least functionally) be solved by providing a
21 > solution for issue 2. If you need an ebuild to cuda.eclassify then I am
22 > happy to provide (or feel free to use a before and after of anything you
23 > have available).
24 >
25 > https://code.google.com/p/pentoo/source/browse/portage/trunk/app-crypt/cryptohaze-combined/cryptohaze-combined-9999.ebuild
26 >
27 > Thanks!
28 > Zero
29 >
30
31 1)
32 The build fails if you are using a compiler newer then the supported ones.
33
34 In file included from /opt/cuda/include/cuda_runtime.h:59:0,
35 from <command-line>:0:
36 /opt/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU
37 version! gcc 4.7 and up are not supported!
38 make[1]: *** [obj/x86_64/release/segmentationTree.cu_13.o] Error 1
39
40
41 or similar. Solution, tell nvcc where to find a compatible compiler.
42
43 2)
44 The underlying call of c compiler doesn't respect CXXFLAGS, therefore we
45 need to tell nvcc what to use. Otherwise only the plain NVCCFLAGS are used.
46
47
48 How to fix your package, depends on the buildsystem and where and how
49 they are calling the nvcc. Normally you need to sed it in.
50
51 Here as an example the nvidia-cuda-sdk version bump:
52
53 https://github.com/gentoo-science/sci/blob/cuda/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild
54
55
56 justin

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] New eclass cuda.eclass "Rick \\\"Zero_Chaos\\\" Farina" <zerochaos@g.o>