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

glew related errors at compile time,i.e "undefined reference to `__glewBindBuffer' " #233

Open
hamsterasu opened this issue May 31, 2020 · 1 comment

Comments

@hamsterasu
Copy link

Hi friends!

When trying to compile the package with OpenGL scene, I keep getting glew-related errors.
I installed the prerequisites beforehand:

sudo apt-get install freeglut3-dev
sudo apt-get install libglew-dev

Then I ran the command:
catkin build rovio --cmake-args -DCMAKE_BUILD_TYPE=Release -DMAKE_SCENE=ON

This is my console output:

Profile:                     default
Extending:             [env] /opt/ros/kinetic
Workspace:                   /home/hansel/catkin_build_ws
-----------------------------------------------------------------------
Build Space:        [exists] /home/hansel/catkin_build_ws/build
Devel Space:        [exists] /home/hansel/catkin_build_ws/devel
Install Space:      [unused] /home/hansel/catkin_build_ws/install
Log Space:         [missing] /home/hansel/catkin_build_ws/logs
Source Space:       [exists] /home/hansel/catkin_build_ws/src
DESTDIR:            [unused] None
-----------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-----------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=Release -DMAKE_SCENE=ON
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
-----------------------------------------------------------------------
[build] Found '2' packages in 0.0 seconds.                                                                
[build] Updating package table.                                                                           
Starting  >>> catkin_tools_prebuild                                                                       
Finished  <<< catkin_tools_prebuild                [ 1.6 seconds ]                                        
Starting  >>> kindr                                                                                       
Finished  <<< kindr                                [ 1.0 seconds ]                                        
Starting  >>> rovio                                                                                       
__________________________________________________________________________________________________________
Errors     << rovio:make /home/hansel/catkin_build_ws/logs/rovio/build.make.000.log                       
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewBindBuffer'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetUniformLocation'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetShaderInfoLog'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetProgramiv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewBufferData'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGenBuffers'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `glewGetErrorString'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniformMatrix4fv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewDisableVertexAttribArray'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCreateProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetShaderiv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCompileShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform1f'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform1i'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform3f'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetProgramInfoLog'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewAttachShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewLinkProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewShaderSource'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewValidateProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewEnableVertexAttribArray'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCreateShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewVertexAttribPointer'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewActiveTexture'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUseProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `glewInit'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/hansel/catkin_build_ws/devel/.private/rovio/lib/rovio/feature_tracker_node] Error 1
make[1]: *** [CMakeFiles/feature_tracker_node.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewBindBuffer'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewBufferData'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetShaderiv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewDisableVertexAttribArray'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform1f'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform3f'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewShaderSource'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewValidateProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewVertexAttribPointer'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUseProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetUniformLocation'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetProgramiv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetShaderInfoLog'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGenBuffers'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `glewGetErrorString'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniformMatrix4fv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCreateProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCompileShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform1i'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewAttachShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetProgramInfoLog'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewLinkProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewEnableVertexAttribArray'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCreateShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewActiveTexture'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `glewInit'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/hansel/catkin_build_ws/devel/.private/rovio/lib/rovio/rovio_node] Error 1
make[1]: *** [CMakeFiles/rovio_node.dir/all] Error 2
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewBindBuffer'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewBufferData'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetShaderiv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewDisableVertexAttribArray'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform1f'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform3f'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewShaderSource'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewValidateProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewVertexAttribPointer'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUseProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetUniformLocation'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetProgramiv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetShaderInfoLog'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGenBuffers'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `glewGetErrorString'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniformMatrix4fv'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCreateProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCompileShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewUniform1i'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewAttachShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewGetProgramInfoLog'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewLinkProgram'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewEnableVertexAttribArray'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewCreateShader'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `__glewActiveTexture'
/home/hansel/catkin_build_ws/devel/.private/rovio/lib/librovio.so: undefined reference to `glewInit'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/hansel/catkin_build_ws/devel/.private/rovio/lib/rovio/rovio_rosbag_loader] Error 1
make[1]: *** [CMakeFiles/rovio_rosbag_loader.dir/all] Error 2
make: *** [all] Error 2
cd /home/hansel/catkin_build_ws/build/rovio; catkin build --get-env rovio | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
..........................................................................................................
Failed     << rovio:make                           [ Exited with code 2 ]                                 
Failed    <<< rovio                                [ 3 minutes and 15.6 seconds ]                         
[build] Summary: 2 of 3 packages succeeded.                                                               
[build]   Ignored:   None.                                                                                
[build]   Warnings:  None.                                                                                
[build]   Abandoned: None.                                                                                
[build]   Failed:    1 packages failed.                                                                   
[build] Runtime: 3 minutes and 18.5 seconds total.                                                        
[build] Note: Workspace packages have changed, please re-source setup files to use them.

Did anyone get this error too?

@JulioLP
Copy link

JulioLP commented Dec 14, 2020

I fixed it changing ${GLEW_LIBRARY} to ${GLEW_LIBRARIES} in the CMakeLists.txt.

I guess this is related to the use of Ubuntu18, or a new version of the glew library. Maybe a PR fixing this could be useful?

katafoxi added a commit to katafoxi/rovio2 that referenced this issue Jun 6, 2024
sedith added a commit to ntnu-arl/rovio that referenced this issue Jun 30, 2024
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

2 participants