ofx with codeblocks on RHEL 5

Hello,

Since I am a masochist and a noob, I am trying to install CCV, which is based on openframeworks, on RHEL5.

I installed CodeBlocks manually from SVN, since install_codeblocks_svn.sh seemed to have a debian specific thing that was returning with an error.
Next I ran install_dependencies.sh. Seems like everything was installed, though below is my output. I am using scripts from Fedora since that would be closest to el5?

  
/bin/sh install_dependencies.sh   
Setting up Install Process  
Package freeglut-devel-2.4.0-7.1.el5.x86_64 already installed and latest version  
Package freeglut-devel-2.4.0-7.1.el5.i386 already installed and latest version  
Package alsa-lib-devel-1.0.17-1.el5.x86_64 already installed and latest version  
Package alsa-lib-devel-1.0.17-1.el5.i386 already installed and latest version  
Package libXmu-devel-1.0.2-5.x86_64 already installed and latest version  
Package libXmu-devel-1.0.2-5.i386 already installed and latest version  
Package libXxf86vm-devel-1.0.1-3.1.x86_64 already installed and latest version  
Package libXxf86vm-devel-1.0.1-3.1.i386 already installed and latest version  
Package gcc-c++-4.1.2-46.el5_4.1.x86_64 already installed and latest version  
Package libraw1394-devel-1.3.0-1.el5.x86_64 already installed and latest version  
Package libraw1394-devel-1.3.0-1.el5.i386 already installed and latest version  
Package ffmpeg-devel-0.5-3.el5.rf.x86_64 already installed and latest version  
Package ffmpeg-devel-0.5-3.el5.rf.i386 already installed and latest version  
Nothing to do  
Setting up Install Process  
Package gstreamer-devel-0.10.20-3.el5.x86_64 already installed and latest version  
Package gstreamer-devel-0.10.20-3.el5.i386 already installed and latest version  
Package gstreamer-plugins-base-devel-0.10.20-3.0.1.el5_3.x86_64 already installed and latest version  
Package gstreamer-plugins-base-devel-0.10.20-3.0.1.el5_3.i386 already installed and latest version  
Nothing to do  
Retrieving [http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm](http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm)  
Retrieving [http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm](http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm)  
warning: /tmp/root/rpm/rpm-xfer.Im4svF: Header V3 RSA/SHA256 signature: NOKEY, key ID 8fcff4da  
warning: /tmp/root/rpm/rpm-xfer.QpPai4: Header V3 RSA/SHA256 signature: NOKEY, key ID 8dc43844  
error: Failed dependencies:  
        rpmlib(FileDigests) <= 4.6.0-1 is needed by rpmfusion-free-release-11-2.noarch  
        system-release >= 11 is needed by rpmfusion-free-release-11-2.noarch  
        rpmlib(FileDigests) <= 4.6.0-1 is needed by rpmfusion-nonfree-release-11-2.noarch  
        system-release >= 11 is needed by rpmfusion-nonfree-release-11-2.noarch  
Setting up Install Process  
Package ffmpeg-devel-0.5-3.el5.rf.x86_64 already installed and latest version  
Package ffmpeg-devel-0.5-3.el5.rf.i386 already installed and latest version  
Package libtheora-devel-1.0alpha7-1.x86_64 already installed and latest version  
Package libtheora-devel-1.0alpha7-1.i386 already installed and latest version  
Package 1:libvorbis-devel-1.1.2-3.el5_4.4.x86_64 already installed and latest version  
Package 1:libvorbis-devel-1.1.2-3.el5_4.4.i386 already installed and latest version  
Nothing to do  
  

I run codeblocks, open the project in the addOn examples and try building it, but get the following errors:

  
  
-------------- Build: Debug in Community Core Vision ---------------  
  
Compiling: ../../../addons/ofxDirList/src/ofxDirList.cpp  
In file included from /usr/include/gst/gst.h:71,  
                 from ../../../libs/openFrameworks/video/ofVideoPlayer.h:9,  
                 from ../../../libs/openFrameworks/ofMain.h:40,  
                 from ../ccv-Linux/addons/ofxDirList/src/ofxDirList.h:19,  
                 from ../ccv-Linux/addons/ofxDirList/src/ofxDirList.cpp:1:  
/usr/include/gst/gstutils.h:93:24: error: missing binary operator before token "("  
/usr/include/gst/glib-compat.h:33: error: ‘G_BEGIN_DECLS’ does not name a type  
/usr/include/gst/gstenumtypes.h:16: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:20: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:22: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:26: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:28: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:32: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:36: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:38: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:40: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:44: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:48: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:50: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:52: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:54: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:58: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:60: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:62: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:64: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:68: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:70: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:72: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:74: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:78: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:82: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:84: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:86: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:88: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:90: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:92: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:96: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:98: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:102: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:104: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:108: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:112: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:116: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:118: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:120: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:122: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:124: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:128: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:130: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:134: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:138: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:140: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:144: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:148: error: ‘GType’ does not name a type  
/usr/include/gst/gstenumtypes.h:150: error: ‘GType’ does not name a type  
Process terminated with status 1 (0 minutes, 11 seconds)  
50 errors, 0 warnings  
   

I had to symlink /usr/lib/gstreamer-0.10/gst to /usr/lib/gst
Also had to symlink /usr/include/glib-2.0/glib.h to /usr/include/glib.h

The above errors are in spite of these changes. I am on an el5 x86_64 machine.
Any suggestions would be reall helpful. What am I missing here?

Thanks

Thanks to an earlier forums post, I was able to get through this by adding the following in my build options > debug > Compiler settings > Other Options

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

Now I can build Community_Core_Vision_debug project with warnings, but no errors.

When I try to debug, it fails however, with the following complaint in codeblocks.

  
  
-------------- Build: Debug in Community Core Vision ---------------  
  
Linking console executable: bin/Community_Core_Vision_debug  
../../../libs/fmodex/lib/libfmodex.so: file not recognized: File format not recognized  
collect2: ld returned 1 exit status  
Process terminated with status 1 (0 minutes, 0 seconds)  
0 errors, 0 warnings  
   
  

:frowning:

libfmodex.so is the 32bits version, perhaps you downloaded the 32bits version of OF?

I downloaded the most recent version of CCV from SVN (#222).
You are right, libfmodex and some other plugin libs are 32 bit.

I am ok compiling CCV as 32-bit. I even tried putting an -m32 in compiler and linker options for the CCV addon project in codeblocks, but it did not seem to make a difference.

What is the best bet for me to get CCV with ofx going on Linux 64-bit, even as a 32-bit build?

Thanks.

don’t know what version of OF is ccv based on, i think it’s 006. you can download the 64bit version of OF and substitute the libraries in CCV with the 64bit versions.

Thanks Arturo.
I downloaded v006 of OF and started compiling it using both codeblocks and the makefile generated. The sample app I am trying to compile is moviePlayerSample.

There were a few pkg-config issues where avformat/codec headers were wrongly configured. So I edited the .pc file to include the avformat subdirectory under include. Now there are no undefined references from libav includes.

Now I am getting errors with Poco libraries and gstappsink when compiling debug version from both makefile and codeblocks.

Trying hard to figure what’s wrong, but unsuccessful so far.

  
  
../../../libs/poco/lib/libPocoFoundation.a(Bugcheck.o): In function `Poco::Bugcheck::what(char const*, char const*, int)':  
Bugcheck.cpp:(.text+0x20a): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'  
Bugcheck.cpp:(.text+0x21c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'  
Bugcheck.cpp:(.text+0x22e): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'  
Bugcheck.cpp:(.text+0x24d): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'  
Bugcheck.cpp:(.text+0x25f): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_get_type':  
gstappsink.c:(.text+0x106): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x182): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_init':  
gstappsink.c:(.text+0x5b6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x632): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_finalize':  
gstappsink.c:(.text+0x6e6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x766): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_dispose':  
gstappsink.c:(.text+0x8b6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x936): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_get_drop':  
gstappsink.c:(.text+0xa06): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0xa86): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_set_drop':  
gstappsink.c:(.text+0xbbe): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0xc3e): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_get_max_buffers':  
gstappsink.c:(.text+0xd16): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0xd96): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_set_max_buffers':  
gstappsink.c:(.text+0xece): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0xf4e): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_get_emit_signals':  
gstappsink.c:(.text+0x1026): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x10a6): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_set_emit_signals':  
gstappsink.c:(.text+0x11b6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x1236): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_getcaps':  
gstappsink.c:(.text+0x1306): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x1386): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_start':  
gstappsink.c:(.text+0x144e): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x14ce): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_unlock_stop':  
gstappsink.c:(.text+0x15ce): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x164e): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_unlock_start':  
gstappsink.c:(.text+0x174e): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x17ce): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_render':  
gstappsink.c:(.text+0x1ad6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x1b56): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_preroll':  
gstappsink.c:(.text+0x1cb6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x1d36): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_event':  
gstappsink.c:(.text+0x2066): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x20e6): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_stop':  
gstappsink.c:(.text+0x2286): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x2306): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_is_eos':  
gstappsink.c:(.text+0x2526): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x25a6): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_pull_preroll':  
gstappsink.c:(.text+0x281b): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x289b): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_get_caps':  
gstappsink.c:(.text+0x29e6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x2a66): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_set_caps':  
gstappsink.c:(.text+0x2c06): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x2c86): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_pull_buffer':  
gstappsink.c:(.text+0x2f3b): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x2fbb): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_set_property':  
gstappsink.c:(.text+0x3216): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x3296): undefined reference to `g_once_init_leave'  
gstappsink.c:(.text+0x3326): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x33a6): undefined reference to `g_once_init_leave'  
../../../libs/gstappsink/lib/liboFappsink.a(gstappsink.o): In function `gst_app_sink_get_property':  
gstappsink.c:(.text+0x3656): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x36d6): undefined reference to `g_once_init_leave'  
gstappsink.c:(.text+0x37f6): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x3876): undefined reference to `g_once_init_leave'  
gstappsink.c:(.text+0x3886): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x3906): undefined reference to `g_once_init_leave'  
gstappsink.c:(.text+0x3916): undefined reference to `g_once_init_enter_impl'  
gstappsink.c:(.text+0x3996): undefined reference to `g_once_init_leave'  
collect2: ld returned 1 exit status  
make: *** [bin/moviePlayerExample_debug] Error 1  
  

Also, I am really confused diffing the sources of of_preRelease_v0.06_linux_cb_FAT and ccv_Linux from the SVN.

If you could enlighten me of why CCV is a separate project, I would be grateful. I don’t see any difference between the two except some fmod libraries and install scripts. In fact OF has additional addonexamples.

I renamed the directory under libs/gstappsink/include to gstapp from gst.
This was to remove ambiguity of the gst directory from gstreamer-0.10 in pkg-config.
This removed all the gstappsink errors above.

ofVideoPlayer.cpp and gstappsink.c now include <gstapp/app/gstappsink.h>

Would you agree on this?

Thanks

The first poco lib errors might be due to a different gcc version used to build poco?
I have gcc 4.1.2 on RHEL 5. Are you aware of how I could test with a poco library built with this version?
I could alternatively build poco myself, but not sure how this has been packaged in OF libs. Would you suggest this?

Time to toast!

Finally ran imageLoaderExample and movieLoaderExamples successfully.
Had to build poco library from scratch.
Built it with the --no-tests --no-samples option so that it would not take very long.
It created shared libraries by default. So I had to make a static archive myself from the object files.
I did this only for libPocoFoundation.a. I retained the other libraries present in poco libs OF 006. They did not seem to have problems on my platform.

On doing this, I got the TourDeFrance poster montage and the running finger movie playback.
An earlier forums post was very helpful with codec support in gstreamer.
http://forum.openframeworks.cc/t/ofvideoplayer-on-ubuntu-and-of-0.06/1821/0

I had to install gstreamer-ffmpeg package.

So now onto bigger things with this. Really want to explore the touch aspects. Any advice would be helpful.