After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783359 - Error while building the gst-omx example
Error while building the gst-omx example
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-omx
1.6.3
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-02 15:06 UTC by Mariem
Modified: 2017-06-05 09:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mariem 2017-06-02 15:06:23 UTC
Hello,

I am trying to cross-compile the gst-omx example "testegl.c" (I download the last version on the git-master). The architecture of my target is arm64 and it has a customized Linux distribution.

At first, when i launched the below gcc command

$gcc -Wall testegl.c -o testegl $(pkg-config --cflags --libs gstreamer-1.0) -lm 
 
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

Could you please help to fix this ?

Best regards
Comment 1 Tim-Philipp Müller 2017-06-02 16:34:12 UTC
So you're using your own command line to compile instead of using one of our provided build systems (autotools or meson) ?
Comment 2 Mariem 2017-06-05 09:35:17 UTC
Yes, I am using my own command line to compile and not your provided build systems.

I tried to add the -lEGL and -lGL to link the libraries in the gcc command but I still have this:

testegl.o: In function `init_ogl':
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 `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.o: In function `query_cb':
testegl.c:(.text+0x1d2c): undefined reference to `gst_gl_handle_context_query'

Do I need to configure the gst-omx (download from the git master) with my own toolchain so I can compile the example? I am working on Yocto.

Best regards,
Comment 3 Tim-Philipp Müller 2017-06-05 09:49:55 UTC
Sorry, but this is not a support forum.

We only support building with autotools or meson.

Please ask for help on the gstreamer-devel mailing list instead. Thanks!