Bummer... But only CUPTI/include/generated_cudaGL_meta.h uses the GL headers so removing them from the install in the CUDA easyblock is definitely a possibility I think.
On 08/29/2018 12:15 PM, Caspar van Leeuwen wrote: > Dear all, > > I've been trying to compile Blender with CUDA support. We had a working > EasyConfig in our local repo (see attached), which recently broke. It > now produces the error: > > In file included from > /scratch/shared/jenkins/regression/build/Blender/2.79b/foss-2017b-Python-3.6.3-nvidia/blender-2.79b/intern/ghost/intern/GHOST_ContextGLX.h:41:0, > from > /scratch/shared/jenkins/regression/build/Blender/2.79b/foss-2017b-Python-3.6.3-nvidia/blender-2.79b/intern/ghost/intern/GHOST_WindowX11.cpp:51: > /scratch/shared/jenkins/regression/build/Blender/2.79b/foss-2017b-Python-3.6.3-nvidia/blender-2.79b/extern/glew/include/GL/glxew.h:1758:29: > error: expected initializer before > <E2><80><98>glxewInit<E2><80><99> > GLEWAPI GLenum GLEWAPIENTRY glxewInit (); > > We found out the problem occured since we had recompiled our > CUDA-9.0.176 module. It now prepends the 'extras/CUPTI/include' > directory to the CPATH, since a change in the CUDA EasyBlock about a > year ago or so. This path unfortunately, also includes (rather old) GL > headers. The reason is probably that those are used by CUDA to compile > its examples, but they mess up our installation process for Blender. A > manual install, where we take out this path from the CPATH, worked. > > My question is: how should we solve this? > > 1) Don't have the CUDA module prepend extras/CUPTI/include CPATH > (upside: old GL headers are not picked up anymore. Downside, the actual > CUPTI headers for profiling are also not picked up so user would have to > include these manually). > > 2) Have the CUDA EasyBlock remove (just) the old GL headers from the > extras/CUPTI/include path (downside: not default CUDA installation, > examples may not build. Upside: you can leave CUPTI headers in CPATH) > > 3) 'hack' the Blender EasyConfig (or a Blender EasyBlock) to do a tricky > thing to get extras/CUPTI/include out of the CPATH, e.g. in the > prebuildstep or something. Upside: CUPTI headers can remain prepended in > CPATH in the CUDA module, and the CUDA examples will build 'out of the > box'. Downside: feels very dirty and other software MAY run into the > same, old GL headers. > > What's your opinion? Which option is best? Or is there another, better > option? > > Cheers, > > Caspar van Leeuwen > SURFsara -- Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden Internet: [email protected] Phone: +46 90 7866134 Fax: +46 90-580 14 Mobile: +46 70 7716134 WWW: http://www.hpc2n.umu.se

