changwoonchoi / 3Doodle

Official implementation of 3Doodle: Compact Abstraction of Objects with 3D Strokes (SIGGRAPH 24', Journal track)
https://changwoonchoi.github.io/3Doodle/
Other
71 stars 6 forks source link

Can't built the repo due to diffvg compilation errors. Are the versions in environment.yml and activate.sh correct/consistant? #8

Closed pkanyuk closed 1 month ago

pkanyuk commented 1 month ago

Hello, thanks for the great paper/project! I was attempting to get this running, but I've been having a very hard time getting the build steps running. I noticed the environment.yml file is expecting cudatoolkit 11.3, but the activate.sh script is looking for cuda 11.8. I happen to have cuda 11.3 installed, so I changed activate.sh to use 11.3 and followed the steps, but I get compile errors sugging my version of gcc is too new:

             from /usr/anim/ono/global/ml/3Doodle_versions/v10/3Doodle/diffvg/scene.cpp:1:

/d2/sets/vfx2022.005/packages/cuda-11.3/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. 139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this versirect run time execution. Use at your own risk. | ^~~~~ on check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. | ^~~~~ CMake Error at diffvg_generated_scene.cpp.o.Release.cmake:220 (message): Error generating /usr/anim/ono/global/ml/3Doodle_versions/v10/3Doodle/diffvg/build/temp.linux-x86_64-cpython-39/CMakeFiles/diffvg.dir//./diffvg_generated_scene.cpp.o

By default it appears my system uses g++ (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2). If I roll back to 9.5.0-19, I think get a swarm of compile errors in the form of:

/usr/anim/ono/global/ml/envs/3Doodle_v11/x86_64-conda-linux-gnu/include/c++/9.5.0/type_traits(2915): error: "constexpr" is not valid here

/usr/anim/ono/global/ml/envs/3Doodle_v11/x86_64-conda-linux-gnu/include/c++/9.5.0/type_traits(2918): error: "is_copy_constructible_v" is not a function or static data member

/usr/anim/ono/global/ml/envs/3Doodle_v11/x86_64-conda-linux-gnu/include/c++/9.5.0/type_traits(2918): error: "constexpr" is not valid here

Error limit reached. 100 errors detected in the compilation of "/usr/anim/ono/global/ml/3Doodle_versions/v11/3Doodle/diffvg/scene.cpp". Compilation terminated. CMake Error at diffvg_generated_scene.cpp.o.Release.cmake:280 (message): Error generating file /usr/anim/ono/global/ml/3Doodle_versions/v11/3Doodle/diffvg/build/temp.linux-x86_64-cpython-39/CMakeFiles/diffvg.dir//./diffvg_generated_scene.cpp.o

I'm a bit at a loss what to do here. Do I really need to have cuda 11.8 installed, but use a conda environment with toolkit 11.3 as the evironment.yml/activate.sh combo suggests? Also, the gcc veresion isn't specificed in evironment.yml, what version are you using?

Thanks! -- Paul

pkanyuk commented 1 month ago

Following up, I kind of found a solution, but it's not pretty. The deal is, I'm on a RHEL9 system and it appears any gcc version greater than 7 causes compile errors in diffvg. I found in an older RHEL7 system that has gcc 6.3.1, I can build diffvg just fine, but then I can't install open3d. I had to comment out the sfm bits to avoid open3d and I was able to get the bezier-only mc example to work. superquadrics appear to fail. Anyway, this is enough for me to experiment, but it sounds like RHEL systems may be out of luck given that it's too modern for old gccs, but old OSs or too old for open3d. Based on the other comments sounds like Ubuntu may be the way to go? Anyway, I don't blame this repo, and I really appreciate this all being open source. But if we were to improve thigns, it's diffvg that appears to be the most fragile component.

changwoonchoi commented 1 month ago

Hi Paul, thank you for your interest in our project. We only tested our code in ubuntu environment so I have no experience in red hat environment. But your detouring solution would be beneficial to others who want to try in red hat environment. Thank you!

changwoonchoi commented 1 month ago

By the way, we used gcc 9.4 and CUDA 11.3 or 11.8.