Hi
I have a desktop PC running Fedora24. I'm just at page One learning how to use gstreamer and the gcc compiler! I wish to display a video using lesson one. The video on gstreamer.com does exist. I've renamed the object as hello_world. On compiling I get messages saying cannot find modules. See messages and code below. Why do I get these messages? And what could I do to install these modules? [None of my searches are bringing up anything I can work on!?!] I look forward to your help Regards Graham Command and messages: =================== gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs gstreamer-0.10` /usr/bin/ld: cannot find -lgstreamer-0.10 /usr/bin/ld: cannot find -lgobject-2.0 /usr/bin/ld: cannot find -lgmodule-2.0 /usr/bin/ld: cannot find -lgthread-2.0 /usr/bin/ld: cannot find -lglib-2.0 /usr/bin/ld: cannot find -lxml2 /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -lc /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status The code ======= $ cat ./hello_world.c #include <gst/gst.h> int main(int argc, char *argv[]) { GstElement *pipeline; GstBus *bus; GstMessage *msg; /* Initialize GStreamer */ gst_init (&argc, &argv); /* Build the pipeline */ pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL); /* Start playing */ gst_element_set_state (pipeline, GST_STATE_PLAYING); /* Wait until error or EOS */ bus = gst_element_get_bus (pipeline); msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS); /* Free resources */ if (msg != NULL) gst_message_unref (msg); gst_object_unref (bus); gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline); return 0; } |
The version of gstreamer which ends '-0.10' is ancient! All new calls
to gstreamer end in '-1.0' To find the up-to-date documentation, go to gstreamer.freedesktop.org/ On 12/09/2016 02:16, Graham wrote: > Hi > I have a desktop PC running Fedora24. I'm just at page One learning how to > use gstreamer and the gcc compiler! > > I wish to display a video using lesson one. The video on gstreamer.com does > exist. I've renamed the object as hello_world. On compiling I get messages > saying cannot find modules. > > See messages and code below. > > Why do I get these messages? And what could I do to install these modules? > [None of my searches are bringing up anything I can work on!?!] > > I look forward to your help > Regards > Graham > > Command and messages: > =================== > gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs > gstreamer-0.10` _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Ian
Thank you for your reply. I am now trying to install gstreamer-1.00 from gstreamer.freedesktop.org/data/src/gstreamer/. What an endless game - going from one dead-end to another. Thank you for your help. Regards Graham |
In reply to this post by Graham
>
> Command and messages: > =================== > gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs > gstreamer-0.10` Here is the slightly modified program #include <gst/gst.h> int main(int argc, char *argv[]) { GstElement *pipeline; GstBus *bus; GstMessage *msg; /* Initialize GStreamer */ gst_init (&argc, &argv); /* Build the pipeline */ pipeline = gst_parse_launch ("playbin uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL); /* Start playing */ gst_element_set_state (pipeline, GST_STATE_PLAYING); /* Wait until error or EOS */ bus = gst_element_get_bus (pipeline); msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS); /* Free resources */ if (msg != NULL) gst_message_unref (msg); gst_object_unref (bus); gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_object_unref (pipeline); return 0; } Compile and Link to gstremaer-1.0 gcc -o gstreamer_one gstreamer_one.c `pkg-config --cflags --libs gstreamer-1.0` Tested on Fedora 24 amd64. Regards Mandar Joshi _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Mandar.
Thanks for your reply. 1) I followed your advice: installing your script and using your command line. I get these error messages: $ gcc -o gstreamer_one gstreamer_one.c `pkg-config --cflags --libs gstreamer-1.0` Package gstreamer-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gstreamer-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gstreamer-1.0' found gstreamer_one.c:1:21: fatal error: gst/gst.h: No such file or directory #include <gst/gst.h> ^ compilation terminated. Note: There is no other gst/gst.h file in my file system. 2) When I installed the system, I asked for gstreamer to be installed. So: Running $dnf list installed | grep gstreamer, produces: PackageKit-gstreamer-plugin.x86_64 1.1.3-2.fc24 @updates gstreamer.x86_64 0.10.36-14.fc24 @fedora gstreamer-devel.x86_64 0.10.36-14.fc24 @fedora gstreamer-plugins-base.x86_64 0.10.36-14.fc24 @fedora gstreamer-tools.x86_64 0.10.36-14.fc24 @fedora gstreamer1.x86_64 1.8.3-1.fc24 @updates gstreamer1-plugins-bad-free.x86_64 1.8.3-1.fc24 @updates gstreamer1-plugins-base.x86_64 1.8.3-1.fc24 @updates gstreamer1-plugins-good.x86_64 1.8.3-1.fc24 @updates phonon-backend-gstreamer.x86_64 2:4.9.0-1.fc24 @fedora phonon-qt5-backend-gstreamer.x86_64 2:4.9.0-1.fc24 @fedora There are some gstreamer1-related files installed: 3) Running as root: $find / | grep gstreamer, produces (thinned out a bit): ./var/lib/dnf/yumdb/g/7c397d3658f7dc2a909b9a6508cf4cb8e1821108-gstreamer1-plugins-good-1.8.3-1.fc24-x86_64 + plus lots of other yumdb entries, like: + base + bad-free + ./var/lib/dnf/yumdb/g/4ad9fb799d4288dd5171a94298524db096ebd8e7-gstreamer1-1.8.3-1.fc24-x86_64 ./usr/lib/rpm/gstreamer1.prov + ./usr/share/licenses/gstreamer1-plugins-good + ./usr/share/licenses/gstreamer1-plugins-base + ./usr/share/licenses/gstreamer1 + ./usr/share/doc/gstreamer1-plugins-base/REQUIREMENTS + ./usr/share/doc/gstreamer1-plugins-base/README Perhaps these are just links for you (dnf) to use? 4) Are those dnf/yumdb entries, shown above, the data which yum would use to download and install the gstreamer1? 5) How can I go about FULLY installing gstreamer1? Look forward to your reply Thanks Graham |
Hi,
On Tue, 2016-09-13 at 14:48 -0700, Graham wrote: > 1) I followed your advice: installing your script and using your > command > Note: There is no other gst/gst.h file in my file system. You need to install the -devel packages: $ rpm -qa |grep gstreamer1 |grep devel |grep -v docs gstreamer1-plugins-bad-free-devel-1.8.3-1.fc24.x86_64 gstreamer1-devel-1.8.3-1.fc24.x86_64 gstreamer1-plugins-base-devel-1.8.3-1.fc24.x86_64 -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Olivier! Thanks for your help and instructions. I did what you said. I used dnf.The dnf install worked.Also, using rpm -qa after the installation, the output I got was exactly what you dispayed. SO, THE DNF INSTALL WORKS! That parts good! THANKS. BUT my compile command still fails. As follows: $ gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs gstreamer-1.0` /usr/bin/ld: cannot find -lgstreamer-1.0 /usr/bin/ld: cannot find -lgobject-2.0 /usr/bin/ld: cannot find -lglib-2.0 /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -lc /usr/bin/ld: cannot find -lgcc_s collect2: error: ld returned 1 exit status Notes: 1) /usr/bin/ld is a set of dependent links: lrwxrwxrwx. 1 root root 20 Sep 5 09:41 /usr/bin/ld -> /etc/alternatives/ld lrwxrwxrwx. 1 root root 15 Sep 5 09:41 /etc/alternatives/ld -> /usr/bin/ld.bfd and . . . /usr/bin/ld.bfd is an executable to find files, eg: [root] $ /usr/bin/ld.bfd lgstreamer-1.0 /usr/bin/ld.bfd: cannot find lgstreamer-1.0: No such file or directory 2) I cannot find files like those listed above. Also, in previous searches on the internet, I haven't found those files. Can you help? Regards Graham On Tue, Sep 13, 2016 at 6:44 PM, Olivier Crête-3 [via GStreamer-devel] <[hidden email]> wrote: Hi, |
> $ gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs
Have you set the PKG_CONFIG_PATH to something else?
> gstreamer-1.0` > > /usr/bin/ld: cannot find -lgstreamer-1.0 > /usr/bin/ld: cannot find -lgobject-2.0 > /usr/bin/ld: cannot find -lglib-2.0 > /usr/bin/ld: cannot find -lgcc_s > /usr/bin/ld: cannot find -lpthread > /usr/bin/ld: cannot find -lc > /usr/bin/ld: cannot find -lgcc_s > collect2: error: ld returned 1 exit status > Check if /usr/lib64/pkgconfig/gstreamer-1.0.pc exists _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Graham
Hi,
On Tue, 2016-09-13 at 17:18 -0700, Graham wrote: > BUT my compile command still fails. As follows: > > $ gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs > gstreamer-1.0` > > /usr/bin/ld: cannot find -lgstreamer-1.0 > /usr/bin/ld: cannot find -lgobject-2.0 > /usr/bin/ld: cannot find -lglib-2.0 > /usr/bin/ld: cannot find -lgcc_s > /usr/bin/ld: cannot find -lpthread > /usr/bin/ld: cannot find -lc > /usr/bin/ld: cannot find -lgcc_s > collect2: error: ld returned 1 exit status It seems like you're missing all basic dev packages, dnf install glib2-devel glibc-devel libgcc -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Olivier Here's my dnf-command and its system reply: sudo dnf install glib2-devel glibc-devel libgcc . . . Last metadata expiration check: 0:00:17 ago on Wed Sep 14 22:29:29 2016. Package glib2-devel-2.48.2-1.fc24.x86_64 is already installed, skipping. Package glibc-devel-2.23.1-10.fc24.x86_64 is already installed, skipping. Package libgcc-6.1.1-3.fc24.x86_64 is already installed, skipping. Dependencies resolved. Nothing to do. Complete! So: - my gcc and gcc-devel libraries are upto date! - Any ideas about how to include those libraries? Regards Graham |
Free forum by Nabble | Edit this page |