Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in make: rasterise_egl.cu.o fail #6

Closed
staffhorn opened this issue Dec 10, 2018 · 7 comments
Closed

error in make: rasterise_egl.cu.o fail #6

staffhorn opened this issue Dec 10, 2018 · 7 comments

Comments

@staffhorn
Copy link

This appeared after some automatic upgrade of libraries, and I haven't been able to sort it out, yet.

1 error detected in the compilation of "/tmp/tmpxft_00003f30_00000000-6_rasterise_egl.cpp1.ii".
CMakeFiles/rasterise.dir/build.make:86: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

@staffhorn
Copy link
Author

Update: The error was in
tensorflow/include/absl/strings/string_view.h(496): error: constexpr function return is non-constant

The error is described here, and there are workarounds.

Closing

@gsygsy96
Copy link

gsygsy96 commented Apr 14, 2019

Soory... I'm new foir Cmake. Could you tell me your solution?

@threedlife
Copy link

following up this thread, i came across similar issues while building Dirt from source.

Any idea how to resolve this? Appreciate it!

/home/toz/ouyang/dirt/venv/local/lib/python2.7/site-packages/tensorflow/include/google/protobuf/arena_impl.h(52): warning: integer conversion resulted in a change of sign

/home/toz/ouyang/dirt/venv/local/lib/python2.7/site-packages/tensorflow/include/google/protobuf/arena_impl.h(147): warning: integer conversion resulted in a change of sign

/home/toz/ouyang/dirt/venv/local/lib/python2.7/site-packages/tensorflow/include/google/protobuf/arena_impl.h(52): warning: integer conversion resulted in a change of sign

/home/toz/ouyang/dirt/venv/local/lib/python2.7/site-packages/tensorflow/include/google/protobuf/arena_impl.h(147): warning: integer conversion resulted in a change of sign

/home/toz/ouyang/dirt/venv/local/lib/python2.7/site-packages/tensorflow/include/google/protobuf/generated_message_reflection.h(689): warning: variable "unused" was set but never used

/home/toz/ouyang/dirt/csrc/rasterise_grad_egl.cu(62) (col. 26): error: Internal Compiler Error (codegen): "function-scope static variables cannot be initialized!"

CMakeFiles/rasterise.dir/build.make:101: recipe for target 'CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o] Error 2
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@pmh47
Copy link
Owner

pmh47 commented May 7, 2019

@threedlife This seems to be a separate issue, maybe specific to your cuda compiler version. What version of gcc, nvcc, and tensorflow are you using?
As a hack to fix it, try changing constexpr to just const at dirt/csrc/rasterise_grad_egl.cu line 62

@pmh47 pmh47 mentioned this issue May 8, 2019
@threedlife
Copy link

@threedlife This seems to be a separate issue, maybe specific to your cuda compiler version. What version of gcc, nvcc, and tensorflow are you using?
As a hack to fix it, try changing constexpr to just const at dirt/csrc/rasterise_grad_egl.cu line 62

Thanks @pmh47

I using CUDA 8.0, nvcc v8.0.61, gcc 5.4.0, python 2.7.12, cmake 3.14.3, and tensorflow 1.4.

I didn't found constexpr in line 62 of rasterise_grad_egl.cu. Might it be somewhere else to change?

@pmh47
Copy link
Owner

pmh47 commented May 10, 2019

@threedlife Sorry, I misread where the error was occurring. In fact, I'm not sure why this problem is happening (I can't reproduce it); it may be a bug using that exact version of nvcc with that exact version of gcc. You could try upgrading nvcc, if possible.

Alternatively, try moving the definition of struct Vec3 { ... }; (rasterise_grad_egl.cu, lines 63-101) to just above the function assemble_grads that it's currently inside (so put the struct at line 55). That shouldn't affect the functionality, but makes the code 'easier' for the compiler.

@threedlife
Copy link

@threedlife Sorry, I misread where the error was occurring. In fact, I'm not sure why this problem is happening (I can't reproduce it); it may be a bug using that exact version of nvcc with that exact version of gcc. You could try upgrading nvcc, if possible.

Alternatively, try moving the definition of struct Vec3 { ... }; (rasterise_grad_egl.cu, lines 63-101) to just above the function assemble_grads that it's currently inside (so put the struct at line 55). That shouldn't affect the functionality, but makes the code 'easier' for the compiler.

@pmh47 moving struct Vec3 above assemble_grads worked! Thanks.

pmh47 added a commit that referenced this issue Jul 1, 2019
namespace outside assemble_grads, as this apparently fixes a compile
error on specific nvcc/gcc versions (comments around 2019-05-10 from #6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants