Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 523142 - dev-util/nvidia-cuda-sdk-6.5.14 - nvcc fatal : redefinition of argument 'compiler-bindir'
Summary: dev-util/nvidia-cuda-sdk-6.5.14 - nvcc fatal : redefinition of argument 'co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-09-18 16:26 UTC by Richard Li
Modified: 2014-10-09 18:18 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,6.40 KB, text/plain)
2014-09-18 16:26 UTC, Richard Li
Details
emerge --info (emerge-info.txt,18.23 KB, text/plain)
2014-09-18 16:27 UTC, Richard Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Li 2014-09-18 16:26:31 UTC
Created attachment 385050 [details]
build.log

make -j4 -l5 cuda-install=/opt/cuda CUDA_PATH=/opt/cuda/ MPI_GCC=10 verbose=1 
make[1]: Entering directory '/var/tmp/portage/dev-util/nvidia-cuda-sdk-6.5.14/work/cuda-samples/0_Simple/simpleTextureDrv'
make[1]: Entering directory '/var/tmp/portage/dev-util/nvidia-cuda-sdk-6.5.14/work/cuda-samples/0_Simple/inlinePTX'
make[1]: Entering directory '/var/tmp/portage/dev-util/nvidia-cuda-sdk-6.5.14/work/cuda-samples/0_Simple/simpleLayeredTexture'
make[1]: Entering directory '/var/tmp/portage/dev-util/nvidia-cuda-sdk-6.5.14/work/cuda-samples/0_Simple/simpleAtomicIntrinsics'
/opt/cuda//bin/nvcc -ccbin x86_64-pc-linux-gnu-g++ -I../../common/inc  -O2 -v --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3" --compiler-options="-O2 -march=native -fno-stack-protector -U_FORTIFY_SOURCE" --linker-options="-O1,--as-needed"  -m64     -gencode arch=compute_11,code=sm_11 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -o simpleAtomicIntrinsics.o -c simpleAtomicIntrinsics.cu
/opt/cuda//bin/nvcc -ccbin x86_64-pc-linux-gnu-g++ -I../../common/inc  -O2 -v --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3" --compiler-options="-O2 -march=native -fno-stack-protector -U_FORTIFY_SOURCE" --linker-options="-O1,--as-needed"  -m64     -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -o simpleLayeredTexture.o -c simpleLayeredTexture.cu
/opt/cuda//bin/nvcc -ccbin x86_64-pc-linux-gnu-g++ -I../../common/inc  -O2 -v --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3" --compiler-options="-O2 -march=native -fno-stack-protector -U_FORTIFY_SOURCE" --linker-options="-O1,--as-needed"  -m64     -gencode arch=compute_11,code=sm_11 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -o inlinePTX.o -c inlinePTX.cu
nvcc fatal   : redefinition of argument 'compiler-bindir'
Makefile:196: recipe for target 'simpleAtomicIntrinsics.o' failed
make[1]: *** [simpleAtomicIntrinsics.o] Error 1
Comment 1 Richard Li 2014-09-18 16:27:39 UTC
Created attachment 385052 [details]
emerge --info
Comment 2 Richard Li 2014-09-18 23:00:14 UTC
Apparently, -ccbin and --compiler-bindir can't both be set. The following patch solves the problem for me:

--- nvidia-cuda-sdk-6.5.14.ebuild       2014-09-19 06:53:57.118470681 +0800
+++ nvidia-cuda-sdk-6.5.14.ebuild       2014-09-19 06:56:11.958603140 +0800
@@ -55,6 +55,7 @@
        export RAWLDFLAGS="$(raw-ldflags)"
 #      epatch "${FILESDIR}"/${P}-asneeded.patch
 
+       NVCCFLAGS="$(echo "$NVCCFLAGS" | sed -e 's:--compiler-bindir=[^ ]*::')"
        sed \
                -e 's:-O2::g' \
                -e 's:-O3::g' \
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2014-09-19 08:18:19 UTC
Thanks for the report. But I think we need to remove ccbin as it will break otherwise with gcc-4.9. But I will look into it.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2014-09-19 09:17:18 UTC
+  19 Sep 2014; Justin Lecher <jlec@gentoo.org> nvidia-cuda-sdk-6.5.14.ebuild:
+  Fix double definition of c++ compiler, #523142
+