Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711470 - =sci-physics/root-6.20.0[cuda] should depend on dev-libs/cudnn
Summary: =sci-physics/root-6.20.0[cuda] should depend on dev-libs/cudnn
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Guilherme Amadio
Depends on:
Reported: 2020-03-04 02:15 UTC by Oliver Freyermuth
Modified: 2020-03-16 13:32 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2020-03-04 02:15:54 UTC
If cudnn is not installed, it fails to build with:

In file included from input_line_11:65:                                                                                                                                                                                                      
In file included from /var/tmp/portage/sci-physics/root-6.20.00/work/root-6.20.00_build/include/TMVA/MethodDL.h:51:                                                                                                                          
In file included from /var/tmp/portage/sci-physics/root-6.20.00/work/root-6.20.00_build/include/TMVA/DNN/Architectures/Cuda.h:31:                                                                                                            
/var/tmp/portage/sci-physics/root-6.20.00/work/root-6.20.00_build/include/TMVA/DNN/Architectures/Cuda/CudaTensor.h:23:10: fatal error: 'cudnn.h' file not found                                                                              
#include "cudnn.h"                                                                                                                                                                                                                           

Reproducible: Always

Steps to Reproduce:
USE="cuda" emerge =sci-physics/root-6.20.0

Actually, it's not fully clear if this is the correct approach. 
CMake outputs:
-- cudnn not found - use only Cuda+Cublas
at the configure stage. 
So probably, the breakage is upstream, and also a CUDA-only build should be supported - in which case a separate cudnn USE flag should be introduced in addition to fixing this issue.
Comment 1 Oliver Freyermuth 2020-03-04 02:23:51 UTC
Note also this upstream bug report:
since the build system does not handle this case correctly (either cudnn should be a separate feature and there should be a -Dcudnn=OFF switch, or it should be a hard dependency if CUDA is activated - neither is done, currently cudnn seems to be an automagic dependency if CUDA is on).
Comment 2 Oliver Freyermuth 2020-03-04 19:36:03 UTC
Note that upstream already provides a patch in the linked issue, which might be sufficient in the current status for portage if a cudnn USE flag is added. 
Build still breaks if CUDA is on and cudnn is left at default with the current patch, though (see comments on upstream issue).
Comment 3 Guilherme Amadio gentoo-dev 2020-03-06 09:19:43 UTC
The fix has just been pushed upstream for this. Rather than fixing this in Gentoo, I will wait for the next patch release which should come out in a few days and do a version bump.
Comment 4 Oliver Freyermuth 2020-03-06 09:45:12 UTC
That sounds like a good idea, thanks for taking care of this!
Comment 5 Larry the Git Cow gentoo-dev 2020-03-16 13:32:58 UTC
The bug has been closed via the following commit(s):

commit fd9d97bc8d9d3522d9b16d68c107bdb68d39c264
Author:     Guilherme Amadio <>
AuthorDate: 2020-03-16 12:25:16 +0000
Commit:     Guilherme Amadio <>
CommitDate: 2020-03-16 13:32:39 +0000

    sci-physics/root: version bump to 6.20.02
    The dependency on media-libs/cudnn when USE=cuda has been made
    optional upstream.
    Package-Manager: Portage-2.3.94, Repoman-2.3.21
    Signed-off-by: Guilherme Amadio <>

 sci-physics/root/Manifest                                     |  2 +-
 .../root/{root-6.20.00-r1.ebuild => root-6.20.02.ebuild}      | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)