Summary: | media-libs/opensubdiv-3.4.3 with cuda fails on gcc 9 or higher | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Austin Kilgore <kilgorephotoshop> |
Component: | Current packages | Assignee: | Adrian <agrigo2001> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | ionen, proxy-maint, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
build.log from edited ebuild |
Description
Austin Kilgore
2021-08-29 23:16:10 UTC
Created attachment 736738 [details]
build.log
I seem to be having some issues emerging support for both opencl and cuda. The thing is I have a AMDGPU iGPU and a Nvidia dGPU so technically I should be able to have both right? So anyways this package builds with -opencl and -cuda fwiw. Not sure if this extra information is helpful to my recent bug reports but I'm trying to dig deeper into these errors and find the root causes to help out if possible. I don't have a nvidia card so I can't really test this with GCC 9+. Could you modify the ebuild in your overlay and see if it works with GCC 9 or 10? Interestingly, I don't see any mention of this upstream. (In reply to Sam James from comment #3) > I don't have a nvidia card so I can't really test this with GCC 9+. > > Could you modify the ebuild in your overlay and see if it works with GCC 9 > or 10? > See https://wiki.gentoo.org/wiki/Custom_ebuild_repository#Creating_a_local_repository for how to do this. Copy the ebuild in once it's created and drop the bits about GCC 9: pkg_pretend() { if use cuda; then [[ $(gcc-major-version) -gt 8 ]] && \ eerror "USE=cuda requires gcc < 9. Run gcc-config to switch your default compiler" && \ die "Need gcc version earlier than 9" fi [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp } You can delete that whole definition of pkg_pretend. (In reply to Sam James from comment #4) > (In reply to Sam James from comment #3) > > I don't have a nvidia card so I can't really test this with GCC 9+. > > > > Could you modify the ebuild in your overlay and see if it works with GCC 9 > > or 10? > > > > See > https://wiki.gentoo.org/wiki/ > Custom_ebuild_repository#Creating_a_local_repository for how to do this. > Copy the ebuild in once it's created and drop the bits about GCC 9: > > pkg_pretend() { > if use cuda; then > [[ $(gcc-major-version) -gt 8 ]] && \ > eerror "USE=cuda requires gcc < 9. Run gcc-config to switch your default > compiler" && \ > die "Need gcc version earlier than 9" > fi > [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp > } > > You can delete that whole definition of pkg_pretend. I wasn't able to setup the custom local ebuild based off that wiki page, it just seemed too confusing to me. What I wound up doing was edit the ebuild that I already had in /var/db/repos/ and remove those lines you said to remove. This was the error I got when I emerged that ebuild: CMake Error at osd_static_gpu_generated_cudaKernel.cu.o.Gentoo.cmake:222 (message): Error generating /var/tmp/portage/media-libs/opensubdiv-3.4.3/work/opensubdiv-3.4.3_build/opensubdiv/CMakeFiles/osd_static_gpu.dir/osd/./osd_static_gpu_generated_cudaKernel.cu.o Created attachment 736750 [details]
build.log from edited ebuild
(In reply to Austin Kilgore from comment #5) > (In reply to Sam James from comment #4) > > (In reply to Sam James from comment #3) > > [snip] > > I wasn't able to setup the custom local ebuild based off that wiki page, it > just seemed too confusing to me. > > What I wound up doing was edit the ebuild that I already had in > /var/db/repos/ and remove those lines you said to remove. No problem, that's fine! So, the real error is: /opt/cuda/bin/nvcc -M -D__CUDACC__ /var/tmp/portage/media-libs/opensubdiv-3.4.3/work/OpenSubdiv-3_4_3/opensubdiv/osd/cudaKernel.cu -o /var/tmp/portage/media-libs/opensubdiv-3.4.3/work/opensubdiv-3.4.3_build/opensubdiv/CMakeFiles/osd_static_gpu.dir/osd/osd_static_gpu_generated_cudaKernel.cu.o.NVCC-depend -ccbin /usr/bin/x86_64-pc-linux-gnu-gcc -m64 -DOPENSUBDIV_VERSION_STRING=\"3.4.3\" -DOPENSUBDIV_HAS_OPENGL -DOSD_USES_INTERNAL_GLAPILOADER -DOPENSUBDIV_HAS_OPENMP -DGLFW_VERSION_3 -DOPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK -DOPENSUBDIV_HAS_GLSL_COMPUTE -DOPENSUBDIV_HAS_CUDA -DCUDA_ENABLE_DEPRECATED=0 -Xcompiler ,\"-march=native\",\"-O3\",\"-pipe\" -Xcompiler -fPIC --gpu-architecture compute_30 -DNVCC -I/opt/cuda/include -I/var/tmp/portage/media-libs/opensubdiv-3.4.3/work/OpenSubdiv-3_4_3/opensubdiv -I/usr/include -I/var/tmp/portage/media-libs/opensubdiv-3.4.3/work/OpenSubdiv-3_4_3/glLoader nvcc fatal : Value 'compute_30' is not defined for option 'gpu-architecture' [31mCMake Error at osd_static_gpu_generated_cudaKernel.cu.o.Gentoo.cmake:222 (message): Error generating /var/tmp/portage/media-libs/opensubdiv-3.4.3/work/opensubdiv-3.4.3_build/opensubdiv/CMakeFiles/osd_static_gpu.dir/osd/./osd_static_gpu_generated_cudaKernel.cu.o which seems to be https://github.com/PixarAnimationStudios/OpenSubdiv/issues/965 ... which seems to be bug 744517. *** This bug has been marked as a duplicate of bug 744517 *** Can you try the workarounds listed in that bug and let me know if it works? You'll need to add something like: -DOSD_CUDA_COMPUTE_CAPABILITIES="compute_30" into 'mycmakeargs'. Just add it as a new line under '-DNO_TUTORIALS=$(usex !tutorials)' but before the ). This is probably what you want to try: MYCMAKEARGS="-DOSD_CUDA_NVCC_FLAGS='--gpu-architecture;sm_35'" \ emerge -1 opensubdiv (In reply to Ionen Wolkens from comment #9) > This is probably what you want to try: > > MYCMAKEARGS="-DOSD_CUDA_NVCC_FLAGS='--gpu-architecture;sm_35'" \ > emerge -1 opensubdiv Oh, that's it. Ugh. Can confirm that fixed it. I definitely need to be more thorough with checking these bugs and not make duplicate reports... |