gstreamer issues, Ubuntu 9.04....

Greetings,
I’m having trouble getting OF example apps compiling in code blocks in Ubuntu 9.04 (32 FAT)

This is the error that code blocks pops up when I hit compile on the font example:

  
Found following issues with libraries:  
  
Didn't found configuration for libraries:  
  * gstreamer-0.10  * gstreamer-base-0.10  * gstreamer-video-0.10  * libavcodec  * libavformat  * libavutil  * libswscale  
Would you like to go to detection dialog ?  

And here are the error messages:

  
||=== moviePlayerExample, Debug ===|  
../../../libs/openFrameworks/video/ofGstUtils.h|11|warning: gst/gst.h: No such file or directory|  
../../../libs/openFrameworks/video/ofGstUtils.h|16|error: ISO C++ forbids declaration of ‘GMainLoop’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|16|error: expected ‘;’ before ‘*’ token|  
../../../libs/openFrameworks/video/ofGstUtils.h|17|error: ISO C++ forbids declaration of ‘GstElement’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|17|error: expected ‘;’ before ‘*’ token|  
../../../libs/openFrameworks/video/ofGstUtils.h|22|error: ‘guint64’ does not name a type|  
../../../libs/openFrameworks/video/ofGstUtils.h|23|error: ‘guint64’ does not name a type|  
../../../libs/openFrameworks/video/ofGstUtils.h|54|error: ISO C++ forbids declaration of ‘GHashTable’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|54|error: expected ‘;’ before ‘*’ token|  
../../../libs/openFrameworks/video/ofGstUtils.h|70|error: ‘guint’ does not name a type|  
../../../libs/openFrameworks/video/ofGstUtils.h|140|error: ISO C++ forbids declaration of ‘GstElement’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|140|error: expected ‘;’ before ‘*’ token|  
../../../libs/openFrameworks/video/ofGstUtils.h|141|error: ISO C++ forbids declaration of ‘GstElement’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|141|error: expected ‘;’ before ‘*’ token|  
../../../libs/openFrameworks/video/ofGstUtils.h|157|error: ‘gint64’ does not name a type|  
../../../libs/openFrameworks/video/ofGstUtils.h|158|error: ‘guint64’ does not name a type|  
||=== Build finished: 15 errors, 1 warnings ===|  
  

Things I’ve tried:

  • uninstalling code blocks, re-downloaded latest version of OF and re-installed Code Blocks and dependencies with the .sh files in scripts/ubuntu/
  • Installing everything I can find in Synaptic with the word “gstreamer” in it.
  • searched for all of the libs listed in the error message in Synaptic.
  • tried suggestions in the forums
  • asked google.
  • Bothered friends.

I’m stuck, any suggestions would be much appreciated.
Thanks,
Evan

hi evan

can you try this in a console:

pkg-config gstreamer-0.10 --cflags

and post the output

also can you take a look at your codeblocks version in the about menu and post it too.

arturo

  
[fffff.at ~]$pkg-config gstreamer-0.10 --cflags  
-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2    

And my Code Blocks version info:

SVN build rev 5678
Build: Jun 22 2009 - wx2.8.10 (Linux, unicode)

Thanks for the help.
Evan

mmh, everything seems to be right, can you post the cbp project file you’re trying to compile. also are you having the same problem with all the examples?

I’m having the exact some problem. Here is my output:

pkg-config gstreamer-0.10 --cflags

-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2

and

Build: Jun 21 2009, 22:07:43 - wx2.8.10 (Linux, unicode)

Any ideas?

Thanks!

i’m using the same build of codeblocks on ubuntu 9.04, and it’s working for me without problem. have you executed the scripts in scripts/ubuntu, both install_codeblocks and install dependencies.

also is this with all the examples or with one in particular? can you post the example project file, the .cbp, that is problematic?

[quote author=“arturo”]i’m using the same build of codeblocks on ubuntu 9.04, and it’s working for me without problem. have you executed the scripts in scripts/ubuntu, both install_codeblocks and install dependencies.

also is this with all the examples or with one in particular? can you post the example project file, the .cbp, that is problematic?[/quote]

Hi all, I’m new.
I’ve similar problem compiling opencvExample i need (not changed yet). I use Ubuntu 9.04 on 64bit computer and openFrameworks v0.06.
I’ve got the first problem:

  
../../../libs/openFrameworks/video/ofGstUtils.h|11|warning: gst/gst.h: No such file or directory|  
../../../libs/openFrameworks/video/ofGstUtils.h|16|error: ISO C++ forbids declaration of ‘GMainLoop’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|16|error: expected ‘;’ before ‘*’ token|  
../../../libs/openFrameworks/video/ofGstUtils.h|17|error: ISO C++ forbids declaration of ‘GstElement’ with no type|  
../../../libs/openFrameworks/video/ofGstUtils.h|17|error: expected ‘;’ before ‘*’ token|  
...  

with standard C::B installed from ubuntu repositories.

After I’ve updated C::B and all dependence libraries with the scripts in scripts/ubuntu, the problem was resolved, but now there’s another problem:

Build log:

  
Linking console executable: bin/opencvExample  
/usr/bin/ld: cannot find -lgstreamer  
collect2: ld returned 1 exit status  

Build messages:

  
ld          cannot find -lgstreamer  

This is my output: pkg-config gstreamer-0.10 --cflags

  
-pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2  

I think C::B “didn’t see” gstreamer library:
Project -> Build options… -> opencvExamples (the project) -> Linker settings -> Link libraries -> gstreamer

I don’t know how to do now.
Any suggestion please?
Thanks

hi ramcid

can you open a terminal and type:

ls /usr/lib/libgstreamer*

and post the output

Hi arturo (italian?),
sure!

ls -l /usr/lib/libgstreamer*

  
-rw-r--r-- 1 root root 1683204 2009-01-21 12:55 /usr/lib/libgstreamer-0.10.a  
-rw-r--r-- 1 root root    1152 2009-01-21 12:55 /usr/lib/libgstreamer-0.10.la  
lrwxrwxrwx 1 root root      27 2009-07-10 15:31 /usr/lib/libgstreamer-0.10.so -> libgstreamer-0.10.so.0.19.0  
lrwxrwxrwx 1 root root      27 2009-07-10 12:02 /usr/lib/libgstreamer-0.10.so.0 -> libgstreamer-0.10.so.0.19.0  
-rw-r--r-- 1 root root  815288 2009-01-21 12:55 /usr/lib/libgstreamer-0.10.so.0.19.0  
  

in the meantime searching in the CodeBlocks Forum I’ve founds an not elegant solutions… but it works:

I’ve deleted “gstreamer” in:
Project -> Build options… -> opencvExamples (the project) -> Linker settings -> Link libraries -> gstreamer
and i’ve added:
pkg-config --cflags --libs gstreamer-0.10
in Project -> Build options… -> opencvExamples (the project) -> Compiler settings -> Other options

Maybe not the optimal (?), but If you don’t have right solution (also for others) it’s a working patch.
Now I must find a solutions for the incredible flickering for every examples I try.
…if you have a suggestion…
Thanks!

hey

that’s really weird, there shouldn’t be any gstreamer in Project -> Build options… -> opencvExamples (the project) -> Linker settings -> Link libraries

i’ve just downloaded the files from the download section and none of the opencv examples in 32 or 64bit versions have that.

also the original project is configured to just do the pkgconfig thing but from the libraries options in cb.

can you try downloading the original example again and/or posting the cbp file.

about the flickering. what video card do you have?

For the flickering, just a wild guess, but try turning off visual effects in System->Preferences->Appearance->Visual Effects

Thanks for the help, I’m still stuck on this however. I’m having this same error in every project example. The output of ls -l /usr/lib/libgstreamer* is here:

  
-rw-r--r-- 1 root root 1110814 2009-01-21 19:19 /usr/lib/libgstreamer-0.10.a  
-rw-r--r-- 1 root root    1152 2009-01-21 19:19 /usr/lib/libgstreamer-0.10.la  
lrwxrwxrwx 1 root root      27 2009-04-25 10:25 /usr/lib/libgstreamer-0.10.so -> libgstreamer-0.10.so.0.19.0  
lrwxrwxrwx 1 root root      27 2009-04-25 10:25 /usr/lib/libgstreamer-0.10.so.0 -> libgstreamer-0.10.so.0.19.0  
-rw-r--r-- 1 root root  733680 2009-01-21 19:19 /usr/lib/libgstreamer-0.10.so.0.19.0  
  

When I go to Project -> Build options… -> opencvExamples (the project) -> Linker settings -> Link libraries -> , I don’t see anything about Gstreamer listed.

Any other suggestions for things I could try?

Thanks,
E

[quote author=“arturo”]hey

that’s really weird, there shouldn’t be any gstreamer in Project -> Build options… -> opencvExamples (the project) -> Linker settings -> Link libraries

i’ve just downloaded the files from the download section and none of the opencv examples in 32 or 64bit versions have that.

also the original project is configured to just do the pkgconfig thing but from the libraries options in cb.

can you try downloading the original example again and/or posting the cbp file.

about the flickering. what video card do you have?[/quote]

I’m very sorry for inconvenience (I’m new in OF and CB), I think I’ve made confusion whit installations and attempts to make functional, so I’ve reinstalled openFrameworks and codeblocks in right way and all is ok.
gstreamer in Project -> Build options… -> etc…
was a modification I’ve found somewhere.

I’ve an ATI Radeon HD 4350 (from lspci).

It works perfectly! Thanks grimus!

[quote author=“fi5e”]When I go to Project -> Build options… -> opencvExamples (the project) -> Linker settings -> Link libraries -> , I don’t see anything about Gstreamer listed.

Any other suggestions for things I could try?[/quote]

Don’t worry about gstreamer library, It was my mistake.

The errors you got are suchlike previous mine.
You can try to add

  
`pkg-config --cflags --libs gstreamer-0.10`  

in Project -> Build options… -> opencvExamples (the project) (or Debug, or Release, as you want) -> Compiler settings -> Other options
so become

  
-fexceptions `pkg-config --cflags --libs gstreamer-0.10`  
or  
-MMD `pkg-config --cflags --libs gstreamer-0.10`  

remember the skew slash: `

however I’ve found this way:

  • uninstall (also configuration files) packets: libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib libwxgtk2.8-0
  • download openFrameworks
  • run scripts/ubuntu/install_codeblocks.sh. This add two repositories in sources.list and reinstall previous packets from right repository.
  • run also scripts/ubuntu/install_dependencies.sh that install dependacies packets.
  • open codeblocks and an exaples, no need to add above “patch”.

In my pc works

For opencvExamples in my quad core 64bit pc there’s a little modification to do in order to compile without errors in libs/openFrameworks/video/ofUCUtils.cpp: add “(PixelFormat)” to explicit cast “src_pix_fmt” in line 301. I’ve found this in a previous topic… maybe to add in version 0.07.

Thanks all

[quote author=“arturo”]i’m using the same build of codeblocks on ubuntu 9.04, and it’s working for me without problem. have you executed the scripts in scripts/ubuntu, both install_codeblocks and install dependencies.

also is this with all the examples or with one in particular? can you post the example project file, the .cbp, that is problematic?[/quote]

I was on Ubuntu 8.10, so I just upgraded to 9.04 in the hopes that it would solve my problems. Sadly, no luck there!

Anyway, yes, I ran both of those scripts. Also, I get the same error with every example.

Thanks for all your hard work!

@elgreengeeto:

can you try with:

sudo apt-get remove libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib libwxgtk2.8-0

and then running the scripts in the ubuntu folder. perhaps there’s some strange config that is making it not work.

also post your codeblocks version once you run the install scripts. you can find it in help > about in codeblocks.

hi,
I had the same problem on ubuntu 9.04. I reinstalled ubuntu and did not install the non-free codecs from the medibuntu repository like on my old installation. Now oF 0.06 works without problems.
Maybe this helps.

Peter

[quote author=“arturo”]sudo apt-get remove libcodeblocks0 codeblocks libwxsmithlib0 codeblocks-contrib libwxgtk2.8-0

and then running the scripts in the ubuntu folder. perhaps there’s some strange config that is making it not work.[/quote]

I tried this but I’m still getting the same error.

Build: June, 21, 2009, 22:07:43 - wx2.8.10 (Linux,unicode)

you can try to add it manually with:

pkg-config --cflags --libs gstreamer-0.10
in Project > Build options… > Compiler settings > Other options

that’s exactly what the current configuration should be doing but if you want to give it a try… according to rancid this solved the problem for him.

arturo

[quote author=“arturo”]you can try to add it manually with:

pkg-config --cflags --libs gstreamer-0.10
in Project > Build options… > Compiler settings > Other options

that’s exactly what the current configuration should be doing but if you want to give it a try… according to rancid this solved the problem for him.

arturo[/quote]

Yes, make a try… but I’ve installed codeblocks from standard repositories and made tries with projects.
After I’ve reinstalled of v.0.06 and reinstalled CodeBlocks with scripts in of (so from new repository). This way no need to add gstreamer manually.

Davide

this just happened to me. very weird, i had been working on a project for 2 weeks.

i just tried of_ version 0.05 and i’m getting errors that it can’t find libs that end in .so.51

I had also tried my 0.05 projects a week ago and they were fine, the types of errors are getting are odd, says it can’t find some libs:

so:
libavcodec.so.51
libavformat.so.51

etc,

the errors appear one at a time (have to fix one to get see the next) and i have to remove the reference to libavcodec.so and then re add it. i also added libavcodec.so.51 in the project just in case and that would make it pass to the next error. simply adding libavcodec.so.51 does not fix the problem.

it’s very weird. something else of interest: libavcodec.so is not sym linked to libavcodec.so.51 as I believe it usually would be.

i am going to re-download of_ 0.06 and try it again