Error while compiling the gst-omx example

Mariem mariem.mhiri.ext at valeo.com
Tue Jun 6 07:54:09 UTC 2017


Hello,

I am trying to compile the gst-omx example "testegl.c" on a board that
has an arm64 architecture and uses a customized Linux distribution.

I am using my own command line and not the build systems provided by gst-omx

At first, when I launched the below gcc command

$gcc -Wall testegl.c -o testegl $(pkg-config --cflags --libs gstreamer-1.0) -lm

I got this:

testegl.o: In function `init_ogl':
testegl.c:(.text+0x7d4): undefined reference to `eglGetDisplay'
testegl.c:(.text+0x828): undefined reference to `eglInitialize'
testegl.c:(.text+0x88c): undefined reference to `eglChooseConfig'
testegl.c:(.text+0x8b4): undefined reference to `eglCreateContext'
testegl.c:(.text+0x90c): undefined reference to `eglCreateWindowSurface'
testegl.c:(.text+0x978): undefined reference to `eglMakeCurrent'
testegl.c:(.text+0x9b8): undefined reference to
`gst_gl_display_egl_new_with_egl_display'
testegl.c:(.text+0x9d0): undefined reference to `gst_gl_display_get_type'
testegl.c:(.text+0x9fc): undefined reference to `gst_gl_context_new_wrapped'
testegl.o: In function `init_model_proj':
testegl.c:(.text+0xa30): undefined reference to `glCreateShader'
testegl.c:(.text+0xa64): undefined reference to `glShaderSource'
testegl.c:(.text+0xa70): undefined reference to `glCompileShader'
testegl.c:(.text+0xa74): undefined reference to `glGetError'
testegl.c:(.text+0xaa8): undefined reference to `glCreateShader'
testegl.c:(.text+0xadc): undefined reference to `glShaderSource'
testegl.c:(.text+0xae8): undefined reference to `glCompileShader'
testegl.c:(.text+0xaec): undefined reference to `glGetError'
testegl.c:(.text+0xb1c): undefined reference to `glCreateProgram'
testegl.c:(.text+0xb48): undefined reference to `glAttachShader'
testegl.c:(.text+0xb68): undefined reference to `glAttachShader'
testegl.c:(.text+0xb8c): undefined reference to `glBindAttribLocation'
testegl.c:(.text+0xbb0): undefined reference to `glBindAttribLocation'
testegl.c:(.text+0xbbc): undefined reference to `glLinkProgram'
testegl.c:(.text+0xbdc): undefined reference to `glGetProgramiv'
testegl.c:(.text+0xc18): undefined reference to `glUseProgram'
testegl.c:(.text+0xc38): undefined reference to `glGetUniformLocation'
testegl.c:(.text+0xc64): undefined reference to `glGetUniformLocation'
testegl.c:(.text+0xc90): undefined reference to `glGetUniformLocation'
testegl.c:(.text+0xcbc): undefined reference to `glGetUniformLocation'
testegl.c:(.text+0xce8): undefined reference to `glGetUniformLocation'
testegl.o:testegl.c:(.text+0xd14): more undefined references to
`glGetUniformLocation' follow
testegl.o: In function `init_model_proj':
testegl.c:(.text+0xd48): undefined reference to `glViewport'
testegl.o: In function `redraw_scene':
testegl.c:(.text+0xf6c): undefined reference to `glBindFramebuffer'
testegl.c:(.text+0xf74): undefined reference to `glEnable'
testegl.c:(.text+0xf7c): undefined reference to `glEnable'
testegl.c:(.text+0xf94): undefined reference to `glClearColor'
testegl.c:(.text+0xf9c): undefined reference to `glClear'
testegl.c:(.text+0xfa8): undefined reference to `glUseProgram'
testegl.c:(.text+0xfcc): undefined reference to `glVertexAttribPointer'
testegl.c:(.text+0xff0): undefined reference to `glVertexAttribPointer'
testegl.c:(.text+0xff8): undefined reference to `glEnableVertexAttribArray'
testegl.c:(.text+0x1000): undefined reference to `glEnableVertexAttribArray'
testegl.c:(.text+0x1008): undefined reference to `glActiveTexture'
testegl.c:(.text+0x101c): undefined reference to `glBindTexture'
testegl.c:(.text+0x102c): undefined reference to `glUniform1i'
testegl.c:(.text+0x1044): undefined reference to `glUniform1f'
testegl.c:(.text+0x105c): undefined reference to `glUniform1f'
testegl.c:(.text+0x1074): undefined reference to `glUniform1f'
testegl.c:(.text+0x1098): undefined reference to `glUniformMatrix4fv'
testegl.c:(.text+0x10bc): undefined reference to `glUniformMatrix4fv'
testegl.c:(.text+0x10cc): undefined reference to `glDrawArrays'
testegl.c:(.text+0x10dc): undefined reference to `glDrawArrays'
testegl.c:(.text+0x10ec): undefined reference to `glDrawArrays'
testegl.c:(.text+0x10fc): undefined reference to `glDrawArrays'
testegl.c:(.text+0x110c): undefined reference to `glDrawArrays'
testegl.o:testegl.c:(.text+0x111c): more undefined references to
`glDrawArrays' follow
testegl.o: In function `redraw_scene':
testegl.c:(.text+0x1138): undefined reference to `eglSwapBuffers'
testegl.c:(.text+0x1140): undefined reference to `glDisable'
testegl.c:(.text+0x1148): undefined reference to `glDisable'
testegl.o: In function `init_textures':
testegl.c:(.text+0x11f8): undefined reference to
`gst_gl_sized_gl_format_from_gl_format_type'
testegl.c:(.text+0x1210): undefined reference to `gst_buffer_get_video_meta'
testegl.c:(.text+0x1230): undefined reference to `glGenTextures'
testegl.c:(.text+0x1244): undefined reference to `glBindTexture'
testegl.c:(.text+0x1284): undefined reference to `glTexImage2D'
testegl.c:(.text+0x12c0): undefined reference to `glTexParameteri'
testegl.c:(.text+0x12d0): undefined reference to `glTexParameteri'
testegl.c:(.text+0x12e0): undefined reference to `glTexParameteri'
testegl.c:(.text+0x12f0): undefined reference to `glTexParameteri'
testegl.c:(.text+0x12f4): undefined reference to `glGetError'
testegl.o: In function `update_image':
testegl.c:(.text+0x13f0): undefined reference to `gst_is_gl_memory'
testegl.c:(.text+0x1440): undefined reference to
`gst_video_gl_texture_upload_meta_api_get_type'
testegl.c:(.text+0x1494): undefined reference to
`gst_video_gl_texture_upload_meta_upload'
testegl.o: In function `query_cb':
testegl.c:(.text+0x1d2c): undefined reference to `gst_gl_handle_context_query'
testegl.o: In function `close_ogl':
testegl.c:(.text+0x2b0c): undefined reference to `glDeleteShader'
testegl.c:(.text+0x2b3c): undefined reference to `glDetachShader'
testegl.c:(.text+0x2b68): undefined reference to `glDeleteShader'
testegl.c:(.text+0x2b98): undefined reference to `glDetachShader'
testegl.c:(.text+0x2bc4): undefined reference to `glDeleteProgram'
testegl.c:(.text+0x2bf8): undefined reference to `glDeleteTextures'
testegl.c:(.text+0x2c00): undefined reference to `glClear'
testegl.c:(.text+0x2c2c): undefined reference to `eglSwapBuffers'
testegl.c:(.text+0x2c4c): undefined reference to `eglMakeCurrent'
testegl.c:(.text+0x2c78): undefined reference to `eglDestroySurface'
testegl.c:(.text+0x2ca4): undefined reference to `eglDestroyContext'
collect2: error: ld returned 1 exit status

Then  I added the -lGL and -lEGL link options to the previous command
(after doing some research on google) and I got this:

testegl.o: In function `init_ogl':
testegl.c:(.text+0x9b8): undefined reference to
`gst_gl_display_egl_new_with_egl_display'
testegl.c:(.text+0x9d0): undefined reference to `gst_gl_display_get_type'
testegl.c:(.text+0x9fc): undefined reference to `gst_gl_context_new_wrapped'
testegl.o: In function `init_textures':
testegl.c:(.text+0x11f8): undefined reference to
`gst_gl_sized_gl_format_from_gl_format_type'
testegl.c:(.text+0x1210): undefined reference to `gst_buffer_get_video_meta'
testegl.o: In function `update_image':
testegl.c:(.text+0x13f0): undefined reference to `gst_is_gl_memory'
testegl.c:(.text+0x1440): undefined reference to
`gst_video_gl_texture_upload_meta_api_get_type'
testegl.c:(.text+0x1494): undefined reference to
`gst_video_gl_texture_upload_meta_upload'
testegl.o: In function `query_cb':
testegl.c:(.text+0x1d2c): undefined reference to
`gst_gl_handle_context_query'
collect2: error: ld returned 1 exit status

Could you please help me with this issue ?

Best regards,
Mariem

-- 


*This e-mail message is intended only for the use of the intended recipient(s).
The information contained therein may be confidential or privileged,
and its disclosure or reproduction is strictly prohibited.
If you are not the intended recipient, please return it immediately to its sender 
at the above address and destroy it. *





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Error-while-compiling-the-gst-omx-example-tp4683206.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170606/0709eb0c/attachment.html>


More information about the gstreamer-devel mailing list