2 of 3
2
HOWTO: Compile CCV under Linux/Ubuntu 9.10
Posted: 17 February 2010 04:37 AM   [ Ignore ]   [ # 16 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

Milan, do you have some output on the console ?
My compile was failing after printing “freedom2?” then a reference to an index out of range. If that’s your case, just read this post http://nuigroup.com/forums/viewthread/8434/ and change

logo.loadImage(image);

to

if ( image.length() > {
   logo
.loadImage(image);
}

in addons/ofxNCore/src/Controls/ofxGuiButton.cpp, init() function. That should solve it smile

About the app :

CCV was compiling and it was running fine. With the default settings in config.xml and as I used the patched unicap v0.9.8 lib, I’m now getting 30fps in CCV when in “big size” and 60fps when running in fast mode (space bar). But the best thing is that it’s using only 40 to 60Mb of RAM (for a grand total of max 100Mb including the OS). AND it has been running for almost an hour now. AND it has not crashed yet. The not-so-bright point : 50~60% CPU cycles, that doesn’t let me a lot of room to build the apps I want to display on my MT setup. I haven’t tried to install the proprietary ATI drivers on the machine, and I don’t really know how the GPU is used by CCV, but I’ll try to see if I can balance some of the processing power from the CPU to the GPU.

In addition to that, I can say that I have a display bug but it may come from my OS (missing some libs or bad drivers, I had the same problems with other apps). I now know that I can’t use the GPU for CCV because the GPU functions are using the GLSL language, and you need to have a graphic card that supports at least OpenGL 2.0 tu use GL shaders. My Radeon Mobility 7500 supports only OpenGL 1.3, so I’ll try to code my apps in order to have all the display part done in OpenGL 1.3, to release the CPU from processing power.

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 17 February 2010 06:56 AM   [ Ignore ]   [ # 17 ]
Rank
Joined  2009-06-11
Total Posts:  9
New Member

Yes, I fix that problem with loading image if its not set, but still not success run of application… I also make changes in file addons/ofxNCore/src/Filters/CPUImageFilter.cpp and intall unicap v0.9.5 (I cant find 0.9.8) and patch it… I will attach log of starting application… Only what I can see in that log is lot of library that system cant find… thanks in advance

File Attachments
Load.txt  (File Size: 838KB - Downloads: 879)
Profile
 
 
Posted: 19 February 2010 04:20 PM   [ Ignore ]   [ # 18 ]
Rank
Joined  2010-02-18
Total Posts:  18
New Member

Hi,

I’m running Ubuntu 9.10 x64 and I’m trying to build CCV on my machine.

I first installed the CCV binary: CCV-1.2-lin-64-bin
Launching an application outputs “Segmentation fault” and doesn’t work. Sometimes the main GUI is displayed, but the segmentation fault is always present.

So I decided to try compiling CCV. I followed the instructions posted by x29a, with the following difference:
- my include path for gstreamer is not /usr/include/gstreamer-1.0, but rather /usr/include/gstreamer-0.10

Now when building the project, Code::Blocks outputs:

Linking console executablebin/Community_Core_Vision
/usr/bin/ldskipping incompatible ../../../libs/fmodex/lib/libfmodex.so when searching for -lfmodex
./bin/libs/libfmodex.sofile not recognizedFile format not recognized
collect2
ld returned 1 exit status

I guess the default compiled library for fmodex is 32-bit, so I chose to get the latest version and try it. This works, and I had to explicitly link with the provided libfmodex64.so. On to the next build error ....

I fixed several “skipping incompatible” errors by building my own libraries for (downloaded version in parentheses):
- libPocoFoundation (poco-1.3.6p2)
- libunicap (libunicap-0.9.8)
- libcv (OpenCV-2.0.0)
- libcxcore (OpenCV-2.0.0)
- liboscpack (oscpack 1.0.2)

Next came the i386 vs x64 errors, fixed again by using my own libraries (downloaded version in parentheses):
- libfreetype (freetype-2.3.12)
- libfreeimage (FreeImage3131)
- librtaudio (rtaudio-4.0.7)
- libglee (GLee-5.4.0-src)
- liboFappsink: Not able to identify some source code to recompile it, I chose to replace it with OpenCV’s gstappsink.o library.
This got rid of the error message.

NOTE: in building your own libraries, you might have to change some Makefiles in order to add the -fPIC compilation flag, and other minor tweaks.

----------------------------------------------------------------------------------------------------------------------------

Now the link time errors ...

Linking console executablebin/Community_Core_Vision_debug
obj
/Debug/addons/ofxNCore/src/Filters/GPUImageFilter.oIn function `getFrameBufferForTexture(unsigned int*, unsigned int*, int, int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:34: undefined reference to 
`pglGenFramebuffersEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:35: undefined reference to `pglBindFramebufferEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:38undefined reference to `pglFramebufferTexture2DEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:40: undefined reference to 
`pglBindFramebufferEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:42: undefined reference to `pglCheckFramebufferStatusEXT'
obj/Debug/addons/ofxNCore/src/Filters/GPUImageFilter.oIn function `GPUImageFilter::apply(unsigned int, unsigned int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:134: undefined reference to 
`pglBindFramebufferEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:209: undefined reference to `pglBindFramebufferEXT'
obj/Debug/addons/ofxNCore/src/Filters/GPUImageFilter.oIn function `ShaderProgram::enable()':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.h:34: undefined reference to 
`pglUseProgram'
obj/Debug/addons/ofxNCore/src/Filters/GPUImageFilter.o: In function `ShaderProgram::disable()'
:
/
home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.h:35undefined reference to `pglUseProgram'
obj/Debug/addons/ofxNCore/src/Filters/GPUImageFilter.o: In function 
`ShaderProgram::setUniform1f(char const*, float)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.h:36: undefined reference to `pglUniform1f'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.h:36undefined reference to `pglGetUniformLocation'
obj/Debug/addons/ofxNCore/src/Filters/GPUImageFilter.o: In function 
`ShaderProgram::setUniform1i(char const*, int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.h:37: undefined reference to `pglUniform1i'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.h:37undefined reference to `pglGetUniformLocation'
obj/Debug/addons/ofxNCore/src/Filters/ShaderProgram.o: In function 
`printShaderInfoLog(unsigned int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:50: undefined reference to `pglGetShaderiv'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:54undefined reference to `pglGetShaderInfoLog'
obj/Debug/addons/ofxNCore/src/Filters/ShaderProgram.o: In function 
`printProgramInfoLog(unsigned int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:67: undefined reference to `pglGetProgramiv'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:71undefined reference to `pglGetProgramInfoLog'
obj/Debug/addons/ofxNCore/src/Filters/ShaderProgram.o: In function 
`loadShader(char const*, unsigned int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:82: undefined reference to `pglCreateShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:86undefined reference to `pglShaderSource'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:87: undefined reference to 
`pglCompileShader'
obj/Debug/addons/ofxNCore/src/Filters/ShaderProgram.o: In function `ShaderProgram'
:
/
home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:99undefined reference to `pglCreateProgram'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:107: undefined reference to 
`pglAttachShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:114: undefined reference to `pglAttachShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:118undefined reference to `pglProgramParameteriEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:119: undefined reference to 
`pglProgramParameteriEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:120: undefined reference to `pglProgramParameteriEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:126undefined reference to `pglAttachShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:130: undefined reference to 
`pglLinkProgram'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:99: undefined reference to `pglCreateProgram'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:107undefined reference to `pglAttachShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:114: undefined reference to 
`pglAttachShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:118: undefined reference to `pglProgramParameteriEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:119undefined reference to `pglProgramParameteriEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:120: undefined reference to 
`pglProgramParameteriEXT'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:126: undefined reference to `pglAttachShader'
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/ShaderProgram.cpp:130undefined reference to `pglLinkProgram'
obj/Debug/addons/ofxNCore/src/Modules/ofxNCoreVision.o: In function 
`ProcessFilters::applyGPUFilters()':
ofxNCoreVision.cpp:(.text._ZN14ProcessFilters15applyGPUFiltersEv[ProcessFilters::applyGPUFilters()]+0x51a): undefined reference to `pglBindFramebufferEXT'
ofxNCoreVision.cpp:(.text._ZN14ProcessFilters15applyGPUFiltersEv[ProcessFilters::applyGPUFilters()]+0x5a3): undefined reference to `pglBindFramebufferEXT'
obj/Debug/addons/ofxOsc/src/ofxOscSender.o: In function 
`ofxOscSender::appendMessage(ofxOscMessage&, osc::OutboundPacketStream&)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxOsc/src/ofxOscSender.cpp:90: undefined reference to `osc::OutboundPacketStream::operator<<(int)'
obj/Debug/libs/openFrameworks/sound/ofSoundStream.oIn function `ofSoundStreamSetup(int, int, ofBaseApp*, int, int, int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/libs/openFrameworks/sound/ofSoundStream.cpp:80: undefined reference to 
`RtAudio::RtAudio(RtAudio::RtAudioApi)'
/home/localuser/Dev/CCV_DEV/ccv-Linux/libs/openFrameworks/sound/ofSoundStream.cpp:82: undefined reference to `RtAudio::openStream(int, int, int, int, unsigned long, int, int*, int)'
obj/Debug/libs/openFrameworks/sound/ofSoundStream.oIn function `ofSoundStreamListDevices()':
/home/localuser/Dev/CCV_DEV/ccv-Linux/libs/openFrameworks/sound/ofSoundStream.cpp:133: undefined reference to 
`RtAudio::RtAudio(RtAudio::RtAudioApi)'
obj/Debug/libs/openFrameworks/sound/ofSoundStream.o: In function `RtAudio::getDeviceCount()'
:
/
home/localuser/Dev/CCV_DEV/ccv-Linux/apps/addonsExamples/Codeblocks_8_linux/../../../libs/rtAudio/RtAudio.h:467undefined reference to `RtApi::getDeviceCount()'
obj/Debug/libs/openFrameworks/sound/ofSoundStream.o: In function 
`RtAudio::getDeviceInfo(int)':
/home/localuser/Dev/CCV_DEV/ccv-Linux/apps/addonsExamples/Codeblocks_8_linux/../../../libs/rtAudio/RtAudio.h:478: undefined reference to `RtApi::getDeviceInfo(int)'
collect2ld returned 1 exit status
Process terminated with status 1 
(0 minutes1 seconds)
44 errors0 warnings

It seems that the errors are in the OpenGL and RTAudio libraries.
Some observations:
- replacing the “glut” library link by the path of my built glut (/glut-3.7/lib/glut/libglut.a) doesn’t seem to fix the issue
- my project build options include the generic “glut”, “GL”, and “GLU” libraries
- I am pretty sure my graphics card (ATI Radeon 3200 on HP DV3-1075ca laptop) supports the required extensions. It definitely supports frame buffer objects, as glxinfo includes GL_EXT_framebuffer_object in “OpenGL extensions”.

Thanks for the help so far with your reports smile
Here are my questions:
- does anyone know how to fix my link time errors?
- I’m an openGL noob ... I think I’m missing a library for these extensions, but I can’t figure out which one.

Thanks, and keep up the good work!
00b00nt00

Profile
 
 
Posted: 22 February 2010 07:14 PM   [ Ignore ]   [ # 19 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

hum, the functions calls are weird… in openGL, the functions names all starts with gl, but it seems your code is trying to call functions called pgl*… where does this p comes from ? i’m no C++ guru so maybe it’s just a linker / compiler thing, but can you check your source code ?
For example, with this error :

/home/localuser/Dev/CCV_DEV/ccv-Linux/addons/ofxNCore/src/Filters/GPUImageFilter.cpp:35undefined reference to `pglBindFramebufferEXT'

in GPUImageFilter, line 35, I got

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, *fbo);

Do you have the same ?

The only stuff google brings with pgl is about routines for OS/2 Warp
http://www710.univ-lyon1.fr/~jciehl/Public/OpenGL_PG/apc.html#id64678

BTW : new post on my blog about CCV & Linux
http://melka.one.free.fr/mt/

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 24 February 2010 09:01 AM   [ Ignore ]   [ # 20 ]
Rank
Joined  2010-01-28
Total Posts:  8
New Member

I had the same problem concerning “pgl...” errors although actually the calls were normal “gl...” calls. Following this hint i reinstalled the package mesa-common-dev and the error disappeared.

Having solved all the mentioned 64-bit issues (telling the linker to use the 64-bit versions of the libraries), I finally could compile CCV 1.3 on ubuntu 9.10 64 bit. Unfortunately, the program crashes very quickly with seg-faults. So does the CCV 1.2 64-bit version.

I wonder if it is worth compiling all the dependency-libs for 64 bit myself and link against them to get CCV 1.3 running more stable. If not, I hope switching to ubuntu 8 32bit is the option for a stable CCV, isn`t it?

Profile
 
 
Posted: 24 February 2010 09:57 AM   [ Ignore ]   [ # 21 ]
Rank
Joined  2007-04-10
Total Posts:  3
New Member

hi,
i’ve succefully managed to compile the trunk version of ccv/tbeta on ubuntu 9.10 32-bit. i’m not going to write here how much the current build system using codeblocks sucks, because you probably already know that smile my solution was to completly rewrite the build using cmake. there is some segfault when the configuration is set to use video source, but i really don’t care at this time, since camera seems to be working.

problem is that when using camera (psEye) i get only around 15fps, regardless of the capture resolution (both 320x240 and 640x480). has anyone
experienced the same problem?

here is some camera related log output:

Video device 0USB Camera-B4.04.27.1 (/dev/video0)
---
OF_NOTICEofUCUtilsUsing device /dev/video0
OF_NOTICE
ofUCUtilsUsing module 
OF_NOTICE
choosing device 0USB Camera-B4.04.27.1 (/dev/video0)
OF_NOTICEofUCUtils Available formats for this device:
OF_NOTICEofUCUtils 0YUYV YUYV ), min size640x480max size:640x480, default size768x576
OF_NOTICE
ofUCUtils Selected formatYUYV YUYV ), with size 640x480

OF_NOTICE
ofUCUtilsConverting to RGB24 (640,480)

Camera Mode
Asked 
for 640 by 480 actual size is 640 by 480

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

@psychoz : did you use the unicap lib that was with the CCV/oF download or did you use the patched version ? And what module ar you using for the cam ? Original gspca-ov534 or kaswy’s patched version ? I can get around 100fps in 320x240 and 50fps in 640x480.

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 25 February 2010 10:32 PM   [ Ignore ]   [ # 23 ]
Rank
Joined  2010-02-18
Total Posts:  18
New Member
skipper27 - 24 February 2010 09:01 AM

Having solved all the mentioned 64-bit issues (telling the linker to use the 64-bit versions of the libraries), I finally could compile CCV 1.3 on ubuntu 9.10 64 bit.

Could you please post all the entries in your project’s build options’ Linker settings tab? This could help me make sure I’m using the right libraries, because I still have my annoying pgl messages even after reinstalling mesa-common-dev (sudo apt-get --reinstall install mesa-common-dev)! Thanks.

I can’t believe how hard it is to compile this app in Ubuntu x64…

@psychoz: I have to agree that the CodeBlock thing sucks big time!

Profile
 
 
Posted: 25 February 2010 11:36 PM   [ Ignore ]   [ # 24 ]
Rank
Joined  2010-02-18
Total Posts:  18
New Member
melka - 22 February 2010 07:14 PM

BTW : new post on my blog about CCV & Linux
http://melka.one.free.fr/mt/

Good job describing your work melka, I’ll make sure I check to see how you compile with Eclipse.

Profile
 
 
Posted: 26 February 2010 07:08 AM   [ Ignore ]   [ # 25 ]
Rank
Joined  2007-04-10
Total Posts:  3
New Member
melka - 25 February 2010 06:10 PM

@psychoz : did you use the unicap lib that was with the CCV/oF download or did you use the patched version ? And what module ar you using for the cam ? Original gspca-ov534 or kaswy’s patched version ? I can get around 100fps in 320x240 and 50fps in 640x480.

I’ve linked it against ubuntu’s libunicap-dev, and practically (except glee, gstappsink) all the dependencies comes from ubuntu repository - so I didn’t patch anything, except commenting out sound support from OF to get rid of fmod. The same applies to camera driver (ov534), which seems to be working just fine - vlc gives me nice and fast 640x480 with almost no cpu usage.

To tackle the problem, I’ve compiled some grabbing example which comes with OF and it has the same problem - slow fps and high cpu usage. Then I realized that I’m using mesa radeon r300 driver, so it’s probably coused by it. I will know for sure on sunday, when i test it with nvidia gfx.

Profile
 
 
Posted: 01 March 2010 05:25 AM   [ Ignore ]   [ # 26 ]
Rank
Joined  2010-01-28
Total Posts:  8
New Member
00b00nt00 - 25 February 2010 10:32 PM

Could you please post all the entries in your project’s build options’ Linker settings tab? This could help me make sure I’m using the right libraries, because I still have my annoying pgl messages even after reinstalling mesa-common-dev (sudo apt-get --reinstall install mesa-common-dev)! Thanks.

I downloaded the 64bit version of openframeworks and linked these libs against it:
* fmodx
* poco
* freetype
* freeimage
* rtAudio
* GLee
* unicap
* oFappsink

I think is important to use the headers from those libraries in the C::B project (means, I overwrote the headers in the C::B project with those of the OF64).

I compiled and installed oscpack and opencv and linked against them (libcv, libcxcore, liboscpack).

I forgot that I also reinstalled libgl-mesa-glx, not only the mesa-common-dev package (solving the ‘pgl’-errors).

In the end, one compiler error in ofxOscSender.cpp remained concerning the ‘appendMessage’ method. It could be solved with a cast to int64:

<< (osc::int64)message.getArgAsInt32);

Although CCV is running now, it crashes with segfaults from time to time and also does not recongnize the cam(Allied Vision Marlin F033B). In coriander, the cam works perfect.

Profile
 
 
Posted: 01 March 2010 11:00 AM   [ Ignore ]   [ # 27 ]
Rank
Joined  2010-01-28
Total Posts:  8
New Member

The cam (Allied Vision Marlin F033B) works now. It was not a good idea to link against the unicap-lib of the OF64 version I downloaded. Instead, I linked it against /usr/lib64/libunicap.so and the camera was recognized correctly. However, this works only if I run CCV with sudo.

The next problem is that once I press the “Send TUIO OSC” button, CCV crashes with a segfault.

Man, this is frustrating. Once the cam worked I freaked out, finally getting blobs after several days of trying. And now this: no communication… I am close to giving up.

Profile
 
 
Posted: 02 March 2010 03:19 AM   [ Ignore ]   [ # 28 ]
Rank
Joined  2010-02-18
Total Posts:  18
New Member

OK I’ve given up on the x64 platform ... I’m working in 32-bit Ubuntu 9.10 karmic koala now.
I managed to build the application (great tips @x29a), but then I got the annoying seg faults.

Following @Milan’s steps of building the openframeworks himself, I chose to build all the libraries myself. I used of_preRelease_v0061_linux_FAT as recommended.
I managed to get an OF application running (openCVexample), so I chose to then use all the built libraries in CCV instead of the provided ones. That meant replacing the entire libs folder by the one from my build OF.
Now, the replacement files are slightly different from the provided ones, so there had to be some changes:
- in communication: ofStandardFirmata.h and ofStandardFirmata.cpp are missing from the replacement package, so add them from the old (remove them instead??)
- in video: you’ll need to add ofGstUtils.h and ofGstUtils.cpp, but then building will cause udev issues. Solution: add libudev (make sure you’ve got sudo-apt install libudev-dev) to the required libraries of the CCV project in CB

Well it compiled and linked, but when I ran the app I got the following:

printfToFile 0!
freedom?Video Mode

terminate called after throwing an instance of 
'std::out_of_range'
  
what():  basic_string::substr
freedom2
?freedom3?Aborted

So following @melka’s steps, I got rid of the issue by adding the fix from this thread.

Now I’m getting another error:

OF_ERRORin setFromPixelsROI mismatch
OpenCV ERROR
Incorrect size of input array (Non-positive cols or rows)
    
in function cvInitMatHeadercxarray.cpp(182)
Terminating the application...
Segmentation fault

Maybe I need to rebuild OpenCV like @Milan did ... hmmmmmm
I’ll let you know if I make any progress. I’m documenting the steps as well. It’s time to get some rest now smile

Here is the full strace:

printfToFile 0!
freedom?Video Mode

freedom2
?freedom3?freedom4?Calibration287.000000223.000000
Calibration
288.00000081.000000
Calibration
185.000000119.000000
Calibration
217.000000233.000000
Calibration
222.00000098.000000
Calibration
185.000000118.000000
Calibration
121.000000235.000000
Calibration
130.000000108.000000
Calibration
186.000000119.000000
Calibration is setup
!

OF_WARNINGin allocatereallocating a ofxCvImage
Frame buffer status
36053
Loading Filter
...
Filter Name:Subtraction
loading Shaders vs
:(null), gs:(null), fs:data/shaders/absSubtract.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Subtraction
loading Shaders vs
:(null), gs:(null), fs:data/shaders/subtract.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Contrast
loading Shaders vs
:(null), gs:(null), fs:data/shaders/contrast.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Gaussian Blur
loading Shaders vs
:(null), gs:(null), fs:data/shaders/gaussH.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Gaussian Blur
loading Shaders vs
:(null), gs:(null), fs:data/shaders/gaussH.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Gaussian Blur
loading Shaders vs
:(null), gs:(null), fs:data/shaders/gaussH.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Gaussian Blur
loading Shaders vs
:(null), gs:(null), fs:data/shaders/gaussH.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Threshold
loading Shaders vs
:(null), gs:(null), fs:data/shaders/threshold.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:Copy
loading Shaders vs
:(null), gs:(null), fs:data/shaders/copy.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Frame buffer status36053
Loading Filter
...
Filter Name:GrayScale
loading Shaders vs
:(null), gs:(null), fs:data/shaders/grayScale.fs
Fragment shader was successfully compiled to run on hardware
.
Fragment shader(slinkedno vertex shader(sdefined
 
Starting in standalone mode...

Starting in full mode...

Community Core Vision is setup!

OF_ERRORin setFromPixelsROI mismatch
OpenCV ERROR
Incorrect size of input array (Non-positive cols or rows)
    
in function cvInitMatHeadercxarray.cpp(182)
Terminating the application...
Segmentation fault

Profile
 
 
Posted: 02 March 2010 07:06 AM   [ Ignore ]   [ # 29 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

I tried to build CCV from source again (threw all I got and redid it from scratch) I had the “pglxxx” problem, in my case it was because I had not linked the GLee lib. In case that helps anyone.

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 02 March 2010 03:50 PM   [ Ignore ]   [ # 30 ]
Rank
Joined  2010-02-18
Total Posts:  18
New Member

OK I’ve built OpenCV myself, and linked with the compiled version.
Note that OpenCV-2.0.0 gave me the error detailed at http://sourceforge.net/tracker/index.php?func=detail&aid=2871875&group_id=22870&atid=376677.  This issue is reported to have been fixed in build 2255, posterior to 2.0.0.
Therefore I downloaded the latest SVN version, built it, installed it, and pointed to it in CB.

This doesn’t fix all my problems, unfortunately.

My strace is below:

execve("./clickToLaunchApp_Debug.sh"["./clickToLaunchApp_Debug.sh"][/* 37 vars */]) = 0
brk
(0)                                  = 0x9d52000
access
("/etc/ld.so.nohwcap"F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL8192PROT_READ|PROT_WRITEMAP_PRIVATE|MAP_ANONYMOUS, -10) = 0xb78d6000
access
("/etc/ld.so.preload"R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache"O_RDONLY)      = 3
fstat64
(3{st_mode=S_IFREG|0644st_size=91482, ...}) = 0
mmap2
(NULL91482PROT_READMAP_PRIVATE30) = 0xb78bf000
close
(3)                                = 0
access
("/etc/ld.so.nohwcap"F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6"O_RDONLY) = 3
read
(3"\177ELF\1\1\1\\\\\3\3\1\\260l\1�04\\"..., 512) = 512
fstat64
(3{st_mode=S_IFREG|0755st_size=1319364, ...}) = 0
mmap2
(NULL1329512PROT_READ|PROT_EXECMAP_PRIVATE|MAP_DENYWRITE30) = 0xb777a000
mprotect
(0xb78b80004096PROT_NONE)   = 0
mmap2
(0xb78b900012288PROT_READ|PROT_WRITEMAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE30x13e) = 0xb78b9000
mmap2
(0xb78bc00010600PROT_READ|PROT_WRITEMAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -10) = 0xb78bc000
close
(3)                                = 0
mmap2
(NULL4096PROT_READ|PROT_WRITEMAP_PRIVATE|MAP_ANONYMOUS, -10) = 0xb7779000
set_thread_area
({entry_number:--> 6base_addr:0xb77798d0limit:1048575seg_32bit:1contents:0read_exec_only:0limit_in_pages:1seg_not_present:0useable:1}) = 0
mprotect
(0xb78b90008192PROT_READ)   = 0
mprotect
(0x805e0004096PROT_READ)    = 0
mprotect
(0xb78f40004096PROT_READ)   = 0
munmap
(0xb78bf00091482)               = 0
getpid
()                                = 5913
rt_sigaction
(SIGCHLD{SIG_DFL[CHLD]SA_RESTART}{SIG_DFL[]0}8) = 0
geteuid32
()                             = 1000
brk
(0)                                  = 0x9d52000
brk
(0x9d73000)                          = 0x9d73000
getppid
()                               = 5912
stat64
("/home/localuser/Dev/ccv-linux/apps/addonsExamples/Codeblocks_8_linux/bin"{st_mode=S_IFDIR|0755st_size=4096, ...}) = 0
stat64
("."{st_mode=S_IFDIR|0755st_size=4096, ...}) = 0
open
("./clickToLaunchApp_Debug.sh"O_RDONLY) = 3
fcntl64
(3F_DUPFD10)                 = 10
close
(3)                                = 0
fcntl64
(10F_SETFDFD_CLOEXEC)        = 0
rt_sigaction
(SIGINTNULL{SIG_DFL[]0}8) = 0
rt_sigaction
(SIGINT{0x804f5fb, ~[RTMIN RT_1]0}NULL8) = 0
rt_sigaction
(SIGQUITNULL{SIG_DFL[]0}8) = 0
rt_sigaction
(SIGQUIT{SIG_DFL, ~[RTMIN RT_1]0}NULL8) = 0
rt_sigaction
(SIGTERMNULL{SIG_DFL[]0}8) = 0
rt_sigaction
(SIGTERM{SIG_DFL, ~[RTMIN RT_1]0}NULL8) = 0
read
(10"#!/bin/sh\n\necho $(pwd)\nexport LD"..., 8192) = 90
pipe
([34])                            = 0
clone(child_stack=0flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDchild_tidptr=0xb7779938) = 5914
--- SIGCHLD (Child exited) @ (0) ---
close(4)                                = 0
read
(3"/home/localuser/Dev/ccv-linux/apps/a"..., 128) = 69
read
(3""128)                        = 0
close
(3)                                = 0
wait4
(-1[{WIFEXITED(s) && WEXITSTATUS(s) == 0}]0NULL) = 5914
write
(1"/home/localuser/Dev/ccv-linux/apps/a"..., 69) = 69
pipe
([34])                            = 0
clone(child_stack=0flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDchild_tidptr=0xb7779938) = 5915
close
(4)                                = 0
read
(3"/home/localuser/Dev/ccv-linux/apps/a"..., 128) = 69
read
(3""128)                        = 0
--- SIGCHLD (Child exited) @ (0) ---
close(3)                                = 0
wait4
(-1[{WIFEXITED(s) && WEXITSTATUS(s) == 0}]0NULL) = 5915
clone(child_stack=0flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDchild_tidptr=0xb7779938) = 5916
wait4
(-1OpenCV ErrorIncorrect size of input array (Non-positive cols or rowsin cvInitMatHeaderfile /home/localuser/Dev/opencv-svn/src/cxcore/cxarray.cppline 146
terminate called after throwing an instance of 
'cv::Exception'
  
what():  /home/localuser/Dev/opencv-svn/src/cxcore/cxarray.cpp:146error: (-201Non-positive cols or rows in function cvInitMatHeader

[{WIFSIGNALED
(s) && WTERMSIG(s) == SIGABRT}]0NULL) = 5916
--- SIGCHLD (Child exited) @ (0) ---
write(2"Aborted\n"8Aborted
)                = 8
read
(10""8192)                      = 0
exit_group
(134)                         = ?

Now it’s time to find out where this error comes from ...

Profile
 
 
   
2 of 3
2