1 of 3
1
HOWTO: Compile CCV under Linux/Ubuntu 9.10
Posted: 12 February 2010 05:58 AM   [ Ignore ]
Rank
Joined  2007-07-20
Total Posts:  23
New Member

Hey there,

since i didnt find a lot of useful information on how to compile the current version of CCV on Linux i thought id share my achievements with everybody and create an open give and take so that the linux port of CCV doesnt get left behind. This has been tested on Ubuntu 9.10 32bit but might as well work for other derivates. Happy to get some feedback.

First of all, the structure of the source is a little complicated since CCV is a part of openFrameworks, so if you are looking for the actual source of CCV try “addons/ofxNCore/src/”.

In order to get started we need to check out the latest version (rev. 204 at the time of writing) from svn. To make things easier, just do a “sudo su” before so that you are the superuser.

Lets go to /opt and checkout the source then:

cd /opt
svn co http://nuicode.svnrepository.com/svn/tbeta/trunk/tbeta/Linux/ ccv-Linux

After the checkout is complete, we go to the scripts dir and execute the scripts which install most of the dependencies and codeblocks

cd /opt/ccv-Linux/scripts/ubuntu
chmod +x *.sh
./install_codeblocks.sh
./install_dependencies.sh

I dont quite remember if that installed all the needed packages already (my system wasnt clean before), so if you run into a “missing this and that”, do a websearch on it + ubuntu, most likely it will tell you which package to install.

Lets assume Code::Blocks got installed, just open it from Applications->Programming->Code::Blocks IDE and open the Project called “Community Core Vision.cbp” in “apps/addonsExamples/Codeblocks_8_linux” or just open it via your terminal

cd /opt/ccv-Linux/
codeblocks apps/addonsExamples/Codeblocks_8_linux/Community\ Core\ Vision.cbp

Now codeblocks will tell you about some unknown libraries (like gstreamer-video and such) which can be seen in Project->properties->libraries. Do manually fix those add them in project->build options->linker settings (be careful to select CCV and not release or debug on the left!). Locations in Ubuntu 9.10:

/usr/lib/libgstvideo-0.10.so.0.18.0
/usr/lib/libgstbase-0.10.so.0.22.0
/usr/lib/libavcodec.so.52.20.0
/usr/lib/libavformat.so.52.31.0
/usr/lib/libavutil.so.49.15.0
/usr/lib/libswscale.so.0.7.1
/usr/lib/libgstreamer-0.10.so.0.22.0

I know you could use the symlinks to stay compatible with future libs but i didnt know if codeblocks would work with them correctly. for now, it works.

furthermore some include paths are missing so the compiler cant find all headers it needs. in the same dialog go to “search directories” and in the tab “compiler” add (again select CCV and not debug/release on the left):

/usr/include/gstreamer-1.0/
/usr/include/glib-2.0/
/usr/lib/glib-2.0/include/
/usr/include/libxml2/

before we can build now, we need to fix a broken link

cd /opt/ccv-Linux/libs/fmodex/lib
rm libfmodexp.so libfmodex.so
ln -s libfmodex-4.22.00.so libfmodex.so
ln -s libfmodexp-4.22.00.so libfmodexp.so

now we should be able to build. in code::blocks right click on project->build or try the Makefile or do:

cd /opt/ccv-Linux/apps/addonsExamples/Codeblocks_8_linux
codeblocks --build --target="Release" “Community Core Vision.cbp”

This should generate a binary in the subfolder “bin” with the name “Community_Core_Vision”.
Check the subfolder bin/libs for small files, you might have to fix broken links here as well:

cd /opt/ccv-Linux/apps/addonsExamples/Codeblocks_8_linux/bin/libs
rm libfmodexp.so libfmodex.so
ln -s libfmodex-4.22.00.so libfmodex.so
ln -s libfmodexp-4.22.00.so libfmodexp.so

There should be a startscript in bin/ which sets the LD var correctly, if not, create a file “start.sh” with the following contents:

#!/bin/sh
echo $(pwd)
export LD_LIBRARY_PATH=$(pwd)/libs/
./
Community_Core_Vision

and start ccv with

chmod +x start.sh
./start.sh

Problems so far: CCV is very unstable (segfaults a lot) but it occasionally runs (weird behavior: running with strace makes it stable)

Since i believe in openness can solve a lot of problems i’d love to see more people get involved with CCV and linux, so if you have any questions, contributions are anything feel free to contact me, post here, ping me on irc!

attached is the modified Code::Blocks project which builds for me

File Attachments
Codeblocks_8_linux.zip  (File Size: 22KB - Downloads: 661)
Profile
 
 
Posted: 14 February 2010 07:49 PM   [ Ignore ]   [ # 1 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

Hi, Im so happy because there is some more interested in sharing informations and problems having installing CCV on Linux platform. Since I see that actual version for win is 1.3 and for lin is 1.2, its look like its left not updated :(…
I wish to share my experience and also ask for help smile… First I need to mention that im new to linux and also im new to CCV… I have some experience with CCV on win platform, but i wish to build and test it on linux platform too… Also Im so interested in Computer Vision, but in that area Im also new rasberry… Im also new to C/CPP, but I have lot of experience in programming in various programming languages and platforms…
Since that i dont know until now that CCV is built using OF, first that i wish to make on my linux Ubuntu 9.10 was OF and OpenCV… So process start with downloading OF fat for linux, install it and try to figure what i miss to start working with it… I have really big problems with missing libraries, specially when i find and install it all and my CodeBlock showing that i still missing… but i finally solve that problems… after that i download source for OpenCV 2.0 and success compile it with little problems… when i finally see that examples in OF works and that i can use examples for OpenCV with my PSeye camera i was really happy smile… Than i decide to try luck with CCV, download source code and start to read readme.txt - surprise its same readme from OF sources smile… than i find this page and start to read it.... Lot of problems that u describe in top of page was already solved for me, so i dont have too much problem to compile CCV… after that i need to fix broken links and create start.sh file and start application… but it still not works… it starts but crash fast after showing form conture… here is output that i get on command line:

/home/multitouch/res/ccv/Linux/apps/addonsExamples/Codeblocks_8_linux/bin
printfToFile 0!
freedom?Video Mode

*** glibc detected *** ./Community_Core_Vision: free(): invalid pointer: 0x0a5a3938 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb82ff1]
/lib/tls/i686/cmov/libc.so.6[0xb846f2]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb8779d]
/lib/libglib-2.0.so.0(g_free+0x36)[0x18f186]
/usr/lib/libgstreamer-0.10.so.0[0x380806]
/usr/lib/libgstreamer-0.10.so.0(gst_mini_object_unref+0xaf)[0x3a58cf]
/usr/lib/gstreamer-0.10/libgstffmpeg.so[0x17414db]
/usr/lib/libgstreamer-0.10.so.0[0x3b0a95]
/usr/lib/libgstreamer-0.10.so.0[0x3b1600]
/usr/lib/gstreamer-0.10/libgstcoreelements.so[0x5cc54cd]
/usr/lib/libgstreamer-0.10.so.0[0x3d0895]
/usr/lib/libgstreamer-0.10.so.0[0x3d21a7]
/lib/libglib-2.0.so.0[0x1b299f]
/lib/libglib-2.0.so.0[0x1b136f]
/lib/tls/i686/cmov/libpthread.so.0[0x6a780e]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0xbe47ee]
======= Memory map: ========
00110000-0014c000 r-xp 00000000 08:01 2831 /usr/lib/libgobject-2.0.so.0.2200.2
0014c000-0014d000 r--p 0003b000 08:01 2831 /usr/lib/libgobject-2.0.so.0.2200.2
0014d000-0014e000 rw-p 0003c000 08:01 2831 /usr/lib/libgobject-2.0.so.0.2200.2
0014e000-00202000 r-xp 00000000 08:01 575 /lib/libglib-2.0.so.0.2200.2
00202000-00203000 r--p 000b4000 08:01 575 /lib/libglib-2.0.so.0.2200.2
00203000-00204000 rw-p 000b5000 08:01 575 /lib/libglib-2.0.so.0.2200.2
00204000-0020a000 r-xp 00000000 08:01 1645 /usr/lib/libgstvideo-0.10.so.0.18.0
0020a000-0020b000 r--p 00005000 08:01 1645 /usr/lib/libgstvideo-0.10.so.0.18.0
0020b000-0020c000 rw-p 00006000 08:01 1645 /usr/lib/libgstvideo-0.10.so.0.18.0
0020c000-002b4000 r-xp 00000000 08:01 35280 /usr/lib/i686/cmov/libavformat.so.52.31.0
002b4000-002b5000 r--p 000a7000 08:01 35280 /usr/lib/i686/cmov/libavformat.so.52.31.0
002b5000-002bb000 rw-p 000a8000 08:01 35280 /usr/lib/i686/cmov/libavformat.so.52.31.0
002bb000-00307000 rw-p 00000000 00:00 0
00307000-00313000 r-xp 00000000 08:01 35235 /usr/lib/i686/cmov/libavutil.so.49.15.0
00313000-00314000 r--p 0000b000 08:01 35235 /usr/lib/i686/cmov/libavutil.so.49.15.0
00314000-00315000 rw-p 0000c000 08:01 35235 /usr/lib/i686/cmov/libavutil.so.49.15.0
00315000-00318000 rw-p 00000000 00:00 0
00318000-00343000 r-xp 00000000 08:01 35304 /usr/lib/i686/cmov/libswscale.so.0.7.1
00343000-00344000 r--p 0002a000 08:01 35304 /usr/lib/i686/cmov/libswscale.so.0.7.1
00344000-00345000 rw-p 0002b000 08:01 35304 /usr/lib/i686/cmov/libswscale.so.0.7.1
00345000-00353000 r-xp 00000000 08:01 3255 /usr/lib/libraw1394.so.11.0.1
00353000-00354000 r--p 0000d000 08:01 3255 /usr/lib/libraw1394.so.11.0.1
00354000-00355000 rw-p 0000e000 08:01 3255 /usr/lib/libraw1394.so.11.0.1
00357000-00411000 r-xp 00000000 08:01 2897 /usr/lib/libgstreamer-0.10.so.0.22.0
00411000-00414000 r--p 000b9000 08:01 2897 /usr/lib/libgstreamer-0.10.so.0.22.0
00414000-00415000 rw-p 000bc000 08:01 2897 /usr/lib/libgstreamer-0.10.so.0.22.0
00415000-00416000 rw-p 00000000 00:00 0
00416000-00444000 r-xp 00000000 08:01 36084 /usr/lib/libglut.so.3.8.0
00444000-00446000 r--p 0002d000 08:01 36084 /usr/lib/libglut.so.3.8.0
00446000-00449000 rw-p 0002f000 08:01 36084 /usr/lib/libglut.so.3.8.0
00449000-0044b000 r-xp 00000000 08:01 3014765 /lib/tls/i686/cmov/libdl-2.10.1.so
0044b000-0044c000 r--p 00001000 08:01 3014765 /lib/tls/i686/cmov/libdl-2.10.1.so
0044c000-0044d000 rw-p 00002000 08:01 3014765 /lib/tls/i686/cmov/libdl-2.10.1.so
0044e000-00451000 r-xp 00000000 08:01 2795 /usr/lib/libgmodule-2.0.so.0.2200.2
00451000-00452000 r--p 00002000 08:01 2795 /usr/lib/libgmodule-2.0.so.0.2200.2
00452000-00453000 rw-p 00003000 08:01 2795 /usr/lib/libgmodule-2.0.so.0.2200.2
00453000-00594000 r-xp 00000000 08:01 134018 /home/multitouch/res/ccv/Linux/apps/addonsExamples/Codeblocks_8_linux/bin/libs/libfmodex-4.22.00.so
00594000-005a4000 rw-p 00141000 08:01 134018 /home/multitouch/res/ccv/Linux/apps/addonsExamples/Codeblocks_8_linux/bin/libs/libfmodex-4.22.00.so
005a4000-0065e000 rw-p 00000000 00:00 0
0065e000-00682000 r-xp 00000000 08:01 3014767 /lib/tls/i686/cmov/libm-2.10.1.so
00682000-00683000 r--p 00023000 08:01 3014767 /lib/tls/i686/cmov/libm-2.10.1.so
00683000-00684000 rw-p 00024000 08:01 3014767 /lib/tls/i686/cmov/libm-2.10.1.so
00684000-006a0000 r-xp 00000000 08:01 571 /lib/libgcc_s.so.1
006a0000-006a1000 r--p 0001b000 08:01 571 /lib/libgcc_s.so.1
006a1000-006a2000 rw-p 0001c000 08:01 571 /lib/libgcc_s.so.1
006a2000-006b7000 r-xp 00000000 08:01 3014785 /lib/tls/i686/cmov/libpthread-2.10.1.so
006b7000-006b8000 r--p 00014000 08:01 3014785 /lib/tls/i686/cmov/libpthread-2.10.1.so
006b8000-006b9000 rw-p 00015000 08:01 3014785 /lib/tls/i686/cmov/libpthread-2.10.1.so
006b9000-006bb000 rw-p 00000000 00:00 0
006bb000-006cf000 r-xp 00000000 08:01 673 /lib/libz.so.1.2.3.3
006cf000-006d0000 r--p 00013000 08:01 673 /lib/libz.so.1.2.3.3
006d0000-006d1000 rw-p 00014000 08:01 673 /lib/libz.so.1.2.3.3
006d1000-006dd000 r-xp 00000000 08:01 35246 /usr/lib/libgsm.so.1.0.12
006dd000-006de000 r--p 0000c000 08:01 35246 /usr/lib/libgsm.so.1.0.12
006de000-006df000 rw-p 0000d000 08:01 35246 /usr/lib/libgsm.so.1.0.12
006df000-006e1000 r-xp 00000000 08:01 2399 /usr/lib/libXdamage.so.1.1.0
006e1000-006e2000 rw-p 00001000 08:01 2399 /usr/lib/libXdamage.so.1.1.0
006e2000-006e6000 r-xp 00000000 08:01 2405 /usr/lib/libXfixes.so.3.1.0
006e6000-006e7000 r--p 00003000 08:01 2405 /usr/lib/libXfixes.so.3.1.0
006e7000-006e8000 rw-p 00004000 08:01 2405 /usr/lib/libXfixes.so.3.1.0
006eb000-00759000 r-xp 00000000 08:01 2342 /usr/lib/libGLU.so.1.3.070600
00759000-0075a000 r--p 0006e000 08:01 2342 /usr/lib/libGLU.so.1.3.070600
0075a000-0075b000 rw-p 0006f000 08:01 2342 /usr/lib/libGLU.so.1.3.070600
0075b000-0081d000 r-xp 00000000 08:01 2468 /usr/lib/libasound.so.2.0.0
0081d000-00821000 r--p 000c1000 08:01 2468 /usr/lib/libasound.so.2.0.0
00821000-00822000 rw-p 000c5000 08:01 2468 /usr/lib/libasound.so.2.0.0
00822000-00851000 r-xp 00000000 08:01 626 /lib/libpcre.so.3.12.1
00851000-00852000 r--p 0002e000 08:01 626 /lib/libpcre.so.3.12.1
00852000-00853000 rw-p 0002f000 08:01 626 /lib/libpcre.so.3.12.1
00853000-00855000 r-xp 00000000 08:01 2390 /usr/lib/libXau.so.6.0.0
00855000-00856000 r--p 00001000 08:01 2390 /usr/lib/libXau.so.6.0.0
00856000-00857000 rw-p 00002000 08:01 2390 /usr/lib/libXau.so.6.0.0
00859000-0085d000 r-xp 00000000 08:01 2443 /usr/lib/libXxf86vm.so.1.0.0
0085d000-0085e000 r--p 00003000 08:01 2443 /usr/lib/libXxf86vm.so.1.0.0
0085e000-0085f000 rw-p 00004000 08:01 2443 /usr/lib/libXxf86vm.so.1.0.0
0085f000-0087a000 r-xp 00000000 08:01 1049661 /usr/lib/sse2/libspeex.so.1.5.0
0087a000-0087b000 r--p 0001a000 08:01 1049661 /usr/lib/sse2/libspeex.so.1.5.0
0087b000-0087c000 rw-p 0001b000 08:01 1049661 /usr/lib/sse2/libspeex.so.1.5.0
0087c000-00896000 r-xp 00000000 08:01 6707 /usr/lib/libvorbis.so.0.4.0
00896000-00897000 r--p 00019000 08:01 6707 /usr/lib/libvorbis.so.0.4.0
00897000-008a5000 rw-p 0001a000 08:01 6707 /usr/lib/libvorbis.so.0.4.0
008a5000-008b5000 r-xp 00000000 08:01 544 /lib/libbz2.so.1.0.4
008b5000-008b6000 r--p 0000f000 08:01 544 /lib/libbz2.so.1.0.4
008b6000-008b7000 rw-p 00010000 08:01 544 /lib/libbz2.so.1.0.4
008b7000-008b9000 r-xp 00000000 08:01 524853 /usr/lib/gconv/ISO8859-15.so
008b9000-008ba000 r--p 00001000 08:01 524853 /usr/lib/gconv/ISO8859-15.so
008ba000-008bb000 rw-p 00002000 08:01 524853 /usr/lib/gconv/ISO8859-15.so
008bd000-008c1000 r-xp 00000000 08:01 2911 /usr/lib/libgthread-2.0.so.0.2200.2
008c1000-008c2000 r--p 00003000 08:01 2911 /usr/lib/libgthread-2.0.so.0.2200.2
008c2000-008c3000 rw-p 00004000 08:01 2911 /usr/lib/libgthread-2.0.so.0.2200.2
008c3000-009a9000 r-xp 00000000 08:01 3325 /usr/lib/libstdc++.so.6.0.13
009a9000-009ad000 r--p 000e6000 08:01 3325 /usr/lib/libstdc++.so.6.0.13
009ad000-009ae000 rw-p 000ea000 08:01 3325 /usr/lib/libstdc++.so.6.0.13
009ae000-009b5000 rw-p 00000000 00:00 0
009b5000-009c3000 r-xp 00000000 08:01 2403 /usr/lib/libXext.so.6.4.0
009c3000-009c4000 r--p 0000d000 08:01 2403 /usr/lib/libXext.so.6.4.0
009c4000-009c5000 rw-p 0000e000 08:01 2403 /usr/lib/libXext.so.6.4.0
009c5000-009cd000 r-xp 00000000 08:01 2625 /usr/lib/libdrm.so.2.4.0
009cd000-009ce000 r--p 00007000 08:01 2625 /usr/lib/libdrm.so.2.4.0
009ce000-009cf000 rw-p 00008000 08:01 2625 /usr/lib/libdrm.so.2.4.0
009cf000-009d4000 r-xp 00000000 08:01 3140 /usr/lib/libogg.so.0.6.0
009d4000-009d5000 r--p 00004000 08:01 3140 /usr/lib/libogg.so.0.6.0
009d5000-009d6000 rw-p 00005000 08:01 3140 /usr/lib/libogg.so.0.6.0
009d6000-009dc000 r-xp 00000000 08:01 3014772 /lib/tls/i686/cmov/libnss_compat-2.10.1.so
009dc000-009dd000 r--p 00005000 08:01 3014772 /lib/tls/i686/cmov/libnss_compat-2.10.1.so
009dd000-009de000 rw-p 00006000 08:01 3014772 /lib/tls/i686/cmov/libnss_compat-2.10.1.so
009de000-009e7000 r-xp 00000000 08:01 3014780 /lib/tls/i686/cmov/libnss_nis-2.10.1.so
009e7000-009e8000 r--p 00008000 08:01 3014780 /lib/tls/i686/cmov/libnss_nis-2.10.1.so
009e8000-009e9000 rw-p 00009000 08:01 3014780 /lib/tls/i686/cmov/libnss_nis-2.10.1.so
009e9000-00a24000 r-xp 00000000 08:01 2875 /usr/lib/libgstbase-0.10.so.0.22.0
00a24000-00a25000 r--p 0003a000 08:01 2875 /usr/lib/libgstbase-0.10.so.0.22.0
00a25000-00a26000 rw-p 0003b000 08:01 2875 /usr/lib/libgstbase-0.10.so.0.22.0
00a26000-00a2d000 r-xp 00000000 08:01 3014789 /lib/tls/i686/cmov/librt-2.10.1.so
00a2d000-00a2e000 r--p 00006000 08:01 3014789 /lib/tls/i686/cmov/librt-2.10.1.so
00a2e000-00a2f000 rw-p 00007000 08:01 3014789 /lib/tls/i686/cmov/librt-2.10.1.so
00a2f000-00a83000 r-xp 00000000 08:01 3343 /usr/lib/libtheora.so.0.3.4
00a83000-00a84000 r--p 00053000 08:01 3343 /usr/lib/libtheora.so.0.3.4
00a84000-00a85000 rw-p 00054000 08:01 3343 /usr/lib/libtheora.so.0.3.4
00a85000-00aa1000 r-xp 00000000 08:01 3422 /usr/lib/libxcb.so.1.1.0
00aa1000-00aa2000 r--p 0001c000 08:01 3422 /usr/lib/libxcb.so.1.1.0
00aa2000-00aa3000 rw-p 0001d000 08:01 3422 /usr/lib/libxcb.so.1.1.0
00aa6000-00aa7000 r-xp 00000000 00:00 0 [vdso]
00aa7000-00ab1000 r-xp 00000000 08:01 3014776 /lib/tls/i686/cmov/libnss_files-2.10.1.so
00ab1000-00ab2000 r--p 00009000 08:01 3014776 /lib/tls/i686/cmov/libnss_files-2.10.1.so
00ab2000-00ab3000 rw-p 0000a000 08:01 3014776 /lib/tls/i686/cmov/libnss_files-2.10.1.so
00ab4000-00b0d000 r-xp 00000000 08:01 2340 /usr/lib/libGL.so.1.2
00b0d000-00b12000 r--p 00059000 08:01 2340 /usr/lib/libGL.so.1.2
00b12000-00b17000 rwxp 0005e000 08:01 2340 /usr/lib/libGL.so.1.2
00b17000-00b18000 rwxp 00000000 00:00 0
00b18000-00c56000 r-xp 00000000 08:01 3014759 /lib/tls/i686/cmov/libc-2.10.1.so
00c56000-00c58000 r--p 0013e000 08:01 3014759 /lib/tls/i686/cmov/libc-2.10.1.so
00c58000-00c59000 rw-p 00140000 08:01 3014759 /lib/tls/i686/cmov/libc-2.10.1.so
00c59000-00c5c000 rw-p 00000000 00:00 0
00c5d000-00c61000 r-xp 00000000 08:01 2401 /usr/lib/libXdmcp.so.6.0.0
00c61000-00c62000 rw-p 00003000 08:01 2401 /usr/lib/libXdmcp.so.6.0.0
00c62000-00c86000 r-xp 00000000 08:01 34500 /lib/libexpat.so.1.5.2
00c86000-00c88000 r--p 00024000 08:01 34500 /lib/libexpat.so.1.5.2
00c88000-00c89000 rw-p 00026000 08:01 34500 /lib/libexpat.so.1.5.2
00c89000-00c9c000 r-xp 00000000 08:01 3014770 /lib/tls/i686/cmov/libnsl-2.10.1.so
00c9c000-00c9d000 r--p 00012000 08:01 3014770 /lib/tls/i686/cmov/libnsl-2.10.1.so
00c9d000-00c9e000 rw-p 00013000 08:01 3014770 /lib/tls/i686/cmov/libnsl-2.10.1.so
00c9e000-00ca0000 rw-p 00000000 00:00 0
00ca0000-00cd1000 r-xp 00000000 08:01 657147 /usr/lib/gstreamer-0.10/libgstplaybin.so
00cd1000-00cd2000 r--p 00030000 08:01 657147 /usr/lib/gstreamer-0.10/libgstplaybin.so
00cd2000-00cd3000 rw-p 00031000 08:01 657147 /usr/lib/gstreamer-0.10/libgstplaybin.so
00cd5000-00cf0000 r-xp 00000000 08:01 521 /lib/ld-2.10.1.so
00cf0000-00cf1000 r--p 0001a000 08:01 521 /lib/ld-2.10.1.so
00cf1000-00cf2000 rw-p 0001b000 08:01 521 /lib/ld-2.10.1.so
00cf2000-00d71000 r-xp 00000000 08:01 35257 /usr/lib/libschroedinger-1.0.so.0.2.0
00d71000-00d72000 r--p 0007f000 08:01 35257 /usr/lib/libschroedinger-1.0.so.0.2.0
00d72000-00d73000 rw-p 00080000 08:01 35257 /usr/lib/libschroedinger-1.0.so.0.2.0
00d73000-00d7d000 r-xp 00000000 08:01 896 /usr/lib/libgstpbutils-0.10.so.0.18.0
00d7d000-00d7e000 ---p 0000a000 08:01 896 /usr/lib/libgstpbutils-0.10.so.0.18.0freedom2?Aborted

Any help with this will be good smile

Profile
 
 
Posted: 15 February 2010 04:18 AM   [ Ignore ]   [ # 2 ]
Rank
Joined  2007-07-20
Total Posts:  23
New Member

Are you by any chance on a 64bit Ubuntu? And furthermore, can you adjust the start.sh to do a “strace ./Community_Core_Vision”?

Profile
 
 
Posted: 15 February 2010 04:43 AM   [ Ignore ]   [ # 3 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

No, my machine is yet 32bit Ubuntu… I change start.sh in this way, but when i start it its so much output so i cant catch it from start to end and just see end part… Im wonder why there is no log files, when i try first time linux binary version there is log file… I will try to redirect it to some file and try to see is there anything that can help to investigate whats happen, or if u look for something specific in that output let me now maybe I can see it in this part of log…

Profile
 
 
Posted: 15 February 2010 05:09 AM   [ Ignore ]   [ # 4 ]
Rank
Joined  2007-07-20
Total Posts:  23
New Member

./start.sh > mylog.txt

Profile
 
 
Posted: 15 February 2010 02:21 PM   [ Ignore ]   [ # 5 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

I too have problems compiling CCV under Linux. I don’t really like Code::Blocks, so I’m trying to build the project using Eclipse + CDT.

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 15 February 2010 02:37 PM   [ Ignore ]   [ # 6 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

@melka: I think that there is not too much difference in compiling CCV between CB and Eclipse. If u use cmake u can make files for both, but than problems begin smile… actually I think that everything that was on this page is so important to know, because CCV and OF have really lot of dependencies. From my experience I have biggest problem to make CB to see gstreamer, but now its ok and addonsExamples with OpenCV works ok, rest of examples too… also I can compile CCV successful, but when i start it, it crash at first moment when it show form…

Profile
 
 
Posted: 15 February 2010 07:20 PM   [ Ignore ]   [ # 7 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

@Milan Zivkovic
I’m pretty sure that compiling CCV with either C::B or Eclipse won’t make any differences, but it’s just that I’m used to how eclipse works and it’s really powerful, it’s just an habit smile
I just finished building the Eclipse project with all the dependencies and I can compile at least one example (graphicsExample) from oF without any problem, using the latest unicap lib (0.9.8, oF was shipped with unicap 0.9.1) + unicap is patched with kaswy’s code (http://kaswy.free.fr/?q=en/node/49).
Tomorrow I’ll try to compile CCV under Eclipse with all those unicap goodies wink

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 15 February 2010 10:06 PM   [ Ignore ]   [ # 8 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

@melka: Its sounds good… I use Eclipse for all other languages, except for C/C++ because I have some problem to configure OpenCV with Eclipse at start and I found fast solution for that with CB… I think that I will give Eclipse new chance after this wink… Also I will waiting to hear what is your experiences with compiling (that also work good on my machine) and run CCV on your machine… I will be so happy to hear that someone really make it work on Linux smile

Profile
 
 
Posted: 16 February 2010 03:27 AM   [ Ignore ]   [ # 9 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

Right now, I have a problem witch seems to come from ofTrueTypeFont. Compilation is fine but running the app gives an awful error (don’t remember the exact output).
GDB tells me that it may come from those lines :

737   int cy = (int)'p' NUM_CHARACTER_TO_START;
738    xoffset += cps[cy].width;
739    // zach - this is a bug to fix -- for now, we don't currently deal with ' ' in calculating string bounding box

file : libs / openFrameworks / graphics / ofTrueTypeFont.cpp

The function ofRectangle ofTrueTypeFont::getStringBoundingBox from which it comes returns an ofRectangle, so I tried commenting everything inside and just returning an ofRectangle of arbitrary dimension, I still have the exact same error, so I’m guessing it’s coming from above.

I tried setting the working directory in Eclipse as some people had the same error with C::B and managed to fix it with this solution, but it did nothing for me.

The code is failing just after printing “freedom 3?” so I searched for that and found it here :

83   printf("freedom3?");
84   //GUI Controls
85   controls ofxGui::Instance(this);
86   setupControls();

file : addons / ofxNCore / src / Modules / ofxNCoreVision.cpp

Commenting lines 85 and 86 let’s the program run until “Community Core Vision is setup!” prints and then I got a segfault. I guess the segfault is because it never builds the GUI and then tries to display video and stuff. I’m pretty sure now that the faulty code is inside either ofxGui::Instance(this); or setupControls();

More infos wink

Cheers

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 16 February 2010 02:01 PM   [ Ignore ]   [ # 10 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

Well, in fact the pb was known and coming from ofxGuiButton. I found the answer in this thread :
http://nuigroup.com/forums/viewthread/8434/
WE HAVE COMPILATION ! wink

edit : compilation + running app

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 16 February 2010 02:32 PM   [ Ignore ]   [ # 11 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

@melka: you can run app without crash? Im really impressed… I was busy last two days, buy my regular job, but I will take detail look on everything u write here and try to make my version running too smile.... if u have some more info, please post it here how we can try to solve problems too… thanks in advance…

Profile
 
 
Posted: 16 February 2010 02:40 PM   [ Ignore ]   [ # 12 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

@Milan Zivkovic
Here’s what I got so far : with all the default settings in config.xml, CCV runs at 320x340 at 30fps when it’s opened, 60fps when toggled to “fast mode” (spacebar). With the linux binary version downloaded on ccv.nuigroup.com, it was a lot slower + whenever I closed CCV, i had a weird bug that forced me to reboot the computer, nothing was responding anymore. I don’t have received the laser for my LLP setup yet, so I can’t be sure it’s making a good work but I don’t see why it wouldn’t. And I haven’t used it for a long time yet, just some quick tests. I’ll let it run in background for a few hours and see how it works.

I’m going to write a reaaaly long article on my blog about how I finally could compile CCV under linux smile

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 16 February 2010 03:59 PM   [ Ignore ]   [ # 13 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

http://melka.one.free.fr/mt/index.php/2010/02/the-tale-of-ccv-under-linux/
This post doesn’t contain a lot of technical details, but I’ll try to write another one later in the week, describing in details how to get CCV to compile with Eclipse.
Cheers

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 16 February 2010 04:04 PM   [ Ignore ]   [ # 14 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

Great, I cant wait to read it…

Profile
 
 
Posted: 16 February 2010 07:16 PM   [ Ignore ]   [ # 15 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

I try everything that i read here, but still not working. Compile good and now there is nothing special for error, but still not show GUI, crashed before finish with initializing… I will work more on this tomorrow smile
@melka: Please, write how is your result… is it work stable or not… and rest of impression ...

Profile
 
 
   
1 of 3
1