Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888039 - sci-libs/caffe2-1.12.0[cuda] fails to find the right GCC for CUDA
Summary: sci-libs/caffe2-1.12.0[cuda] fails to find the right GCC for CUDA
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tupone Alfredo
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-12-22 21:01 UTC by Ștefan Talpalaru
Modified: 2023-02-27 07:23 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ștefan Talpalaru 2022-12-22 21:01:36 UTC
Fix:

--- /usr/portage/sci-libs/caffe2/caffe2-1.12.0.ebuild	2022-12-16 17:10:12.000000000 +0100
+++ caffe2-1.12.0-r1.ebuild	2022-12-22 21:45:25.044767232 +0100
@@ -4,7 +4,7 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{8..10} )
-inherit python-r1 cmake flag-o-matic
+inherit python-r1 cmake cuda flag-o-matic
 
 MYPN=pytorch
 MYP=${MYPN}-${PV}
@@ -140,7 +140,14 @@
 		-DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir)
 	)
 
-	use cuda && addpredict "/dev/nvidiactl" # bug 867706
+	if use cuda; then
+		addpredict "/dev/nvidiactl" # bug 867706
+
+		mycmakeargs+=(
+			-DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")"
+		)
+	fi
+
 	cmake_src_configure
 }

A working ebuild is available in my overlay.

Reproducible: Always
Comment 1 Larry the Git Cow gentoo-dev 2023-02-27 07:23:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f1c73d1190c41edc24667ebd0c2505c62a6706

commit 04f1c73d1190c41edc24667ebd0c2505c62a6706
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2023-02-27 07:13:55 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2023-02-27 07:23:15 +0000

    sci-libs/caffe2: find the right GCC for CUDA
    
    Closes: https://bugs.gentoo.org/888039
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 sci-libs/caffe2/caffe2-1.13.1-r1.ebuild | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)