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

ewok ring buffer fails to link when no optimization level is specified #3

Open
curtismuntz opened this issue Aug 22, 2017 · 0 comments

Comments

@curtismuntz
Copy link

Hello @vsu91,

I was trying to work on a more verbose debug build by changing the compiler options specified in the ewok_ring_buffer CMakeLists.txt from ... -g -O3 ... to ... -g -O0 ...

I'm getting the following error during linking when I don't specify an optimization level:

[ 94%] Linking CXX shared library /home/user/catkin_ws/devel/lib/librotors_gazebo_odometry_plugin.so
[ 96%] Built target rotors_gazebo_gps_plugin
CMakeFiles/ring_buffer_example.dir/src/ring_buffer_example.cpp.o: In function `ewok::RaycastRingBuffer<6, short, float, unsigned char>::RaycastRingBuffer(float const&)':
/home/user/catkin_ws/src/ewok/ewok_ring_buffer/include/ewok/raycast_ring_buffer.h:77: undefined reference to `ewok::RaycastRingBuffer<6, short, float, unsigned char>::updated_flag'
CMakeFiles/ring_buffer_example.dir/src/ring_buffer_example.cpp.o: In function `ewok::RingBufferBase<6, short, float>::insideVolume(Eigen::Matrix<int, 3, 1, 0, 3, 1> const&)':
/home/user/catkin_ws/src/ewok/ewok_ring_buffer/include/ewok/ring_buffer_base.h:144: undefined reference to `ewok::RingBufferBase<6, short, float>::_NEG_MASK'
/home/user/catkin_ws/src/ewok/ewok_ring_buffer/include/ewok/ring_buffer_base.h:144: undefined reference to `ewok::RingBufferBase<6, short, float>::_NEG_MASK'
/home/user/catkin_ws/src/ewok/ewok_ring_buffer/include/ewok/ring_buffer_base.h:144: undefined reference to `ewok::RingBufferBase<6, short, float>::_NEG_MASK'
collect2: error: ld returned 1 exit status
ewok/ewok_ring_buffer/CMakeFiles/ring_buffer_example.dir/build.make:156: recipe for target '/home/user/catkin_ws/devel/lib/ewok_ring_buffer/ring_buffer_example' failed
make[2]: *** [/home/user/catkin_ws/devel/lib/ewok_ring_buffer/ring_buffer_example] Error 1
CMakeFiles/Makefile2:3435: recipe for target 'ewok/ewok_ring_buffer/CMakeFiles/ring_buffer_example.dir/all' failed

I don't know why adding optimization flags removes this error. Do you have any ideas?

Thank you,

Curtis

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

1 participant