Failed compilation of gplay ( part of package gst-fsl-plugins-3.5.7-1.0.0)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed compilation of gplay ( part of package gst-fsl-plugins-3.5.7-1.0.0)

2,032 Views
shimonfiltzer
Contributor II

Hello!

I started develop some application for video stream processing and think about GStream. For me gplay aplication, is a good example. We use evaluation board from Freescale/Variscite ARM based, which run on yocto. I have installed package gst-fsl-plugins-3.5.7-1.0.0 for my yocto platform. I tried to take all gplay application sources & put it to Eclipse project.

All necessary header files as gst.h, glib.h etc, found, but compilation failed. I got messages about undefined references as:

"/home/lin/workspace/gp/Debug/../src/gst_snapshot.c:30: undefined reference to `gst_buffer_get_type'

/home/lin/workspace/gp/Debug/../src/gst_snapshot.c:30: undefined reference to `g_type_check_instance_cast'

/home/lin/workspace/gp/Debug/../src/gst_snapshot.c:32: undefined reference to `g_assertion_message_expr'"

Oh, my little experience doesn't allow me to get result.

Could somebody help me? Some idea?

Regards, Shimon.

Labels (4)
7 Replies

1,140 Views
shimonfiltzer
Contributor II

Thanks to all!

I got correct compilation of gplay project.

Changed 3 files:

    File: /home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libc.so

was:           GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) )

changed:    GROUP ( ../lib/libc.so.6 ../usr/lib/libc_nonshared.a  AS_NEEDED ( ../lib/ld-linux-armhf.so.3 ) )

    File: /home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libpthread.so

was:           GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )

changed:    GROUP ( libpthread.so.0 libpthread_nonshared.a )

    File: /home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/pkgconfig/gstreamer-0.10.pc

changed to:

prefix=/home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr

exec_prefix=/usr

libdir=/home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib

includedir=/home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/include/gstreamer-0.10

toolsdir=${exec_prefix}/bin

pluginsdir=/usr/lib/gstreamer-0.10

datarootdir=${prefix}/share

datadir=${datarootdir}

girdir=${datadir}/gir-1.0

typelibdir=${libdir}/girepository-1.0

Name: GStreamer

Description: Streaming media framework

Requires: glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0, libxml-2.0, libffi

Version: 0.10.36

Libs: -L${libdir} -lgstreamer-0.10

Cflags: -I${includedir}

Configuration:

export PKG_CONFIG_PATH=/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/pkgconfig:$PKG_CONFIG_PATH

export PATH=/opt/poky/1.5/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.5/sysroots/x86_64-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi:/opt/poky/1.5/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:$PATH

C_INCLUDE_PATH=/home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/include/libxml2:/home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/glib-2.0/include:/home/user/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/include/glib-2.0

export C_INCLUDE_PATH

LIBRARY_PATH=/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/lib:/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib:

export LIBRARY_PATH

Command:

arm-poky-linux-gnueabi-gcc  fsl_player_debug.c fsl_player_osal.c fsl_player_queue.c fsl_player_ui_message.c gplay.c gst_snapshot.c mfw_gplay.c mfw_gplay_core.c playlist.c -o gplay   `pkg-config --cflags --libs gstreamer-0.10` -lz

1,141 Views
LeonardoSandova
Specialist I

Hi Shimon,

I don't have experience using Eclipse to build code. Are you going to modify the gplay app or create a similar one? is that the case, the easiest is to create patches and include them on your Yocto metadata, then use bitbake to compile.

Leo

1,141 Views
shimonfiltzer
Contributor II

I tried to think about patches, but gstream package is not part of kernel. How I can to patch it?

Thank you.

0 Kudos

1,141 Views
daiane_angolini
NXP Employee
NXP Employee

Kernel, the same way as any other app, is a package and has a recipe. For yocto, does not matter if it´s gstreamer or kernel, the way to patch it is the same.

If you´re using YP to create the toolchain, your toolchain is not complete. You should use another image to generate the sdk one with gstremaer.

something like:

$ bitbake fsl-image-machine-test -c populate-sdk

because your sysroots seems not to have the needed .so or .h

0 Kudos

1,141 Views
shimonfiltzer
Contributor II

Thank you! It's a good idea for start.

But, for correct compilation of GStream package example, I will need prepare pkg-config, it mean write correct  gstream-0.10.pc

I changed gstream-0.10.pc and got:

"

prefix=/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr

exec_prefix=/usr

libdir=/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib

includedir=/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/include/gstreamer-0.10

toolsdir=${exec_prefix}/bin

pluginsdir=/usr/lib/gstreamer-0.10

datarootdir=${prefix}/share

datadir=${datarootdir}

girdir=${datadir}/gir-1.0

typelibdir=${libdir}/girepository-1.0

Name: GStreamer

Description: Streaming media framework

Requires: glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0, libxml-2.0

Version: 0.10.36

Libs: -L${libdir} -lgstreamer-0.10

Cflags: -I${includedir}

"

But I have any errors, when not found some files, I changed pathes in scripts, it was helpful, but 2 files not found.

warning: libffi.so.6, needed by /home/.../.../var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)

/opt/poky/1.5/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.1/ld: warning: libz.so.1, needed by  needed by /home/.../.../var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)

/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libgobject-2.0.so: undefined reference to `ffi_type_pointer'... and many other undefined references.

Have you some idea about right configuration of gstream-0.10.pc, or may be something else?

Thank you!

Have a nice weekend!

Shimon

0 Kudos

1,141 Views
daiane_angolini
NXP Employee
NXP Employee

How did you created the SDK you're using on Eclipse?

I think you need to tailor it to include the other things you use.

0 Kudos

1,141 Views
shimonfiltzer
Contributor II

Daiane, hello!

I still tried to work with GStream. Eclipse is not must. I took a very simple project from GStream manual, and compiled it as:

arm-poky-linux-gnueabi-gcc gst_hello.c -o gst_hello `pkg-config --cflags --libs gstreamer-0.10`

Result:

warning: libffi.so.6, needed by /home/.../.../var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)

/opt/poky/1.5/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.1/ld: warning: libz.so.1, needed by  needed by /home/.../.../var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)

/home/shimon/var-som-mx6-dora/var_yocto_rel_v2.0/build_mx6q/tmp/sysroots/varsommx6q/usr/lib/libgobject-2.0.so: undefined reference to `ffi_type_pointer'... and many other undefined references.

I tried to move libffi.so.6 to same directory with libgstreamer-0.10.so, define directory with libffi.so.6 in path. It still not worked. I burned full week without anything.

I need some work idea.

Thank you.

0 Kudos