LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-07-2010, 11:22 AM   #1
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Rep: Reputation: 50
OpenCV 2.0 compile error in -current


Hi, I use Slackware64 -current, since last big update I can't compile OpenCV 2.0, this is the error:
Quote:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -I../include/opencv -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -O3 -g -march=x86-64 -ffast-math -fomit-frame-pointer -O2 -fPIC -MT lib_highgui_la-grfmt_png.lo -MD -MP -MF .deps/lib_highgui_la-grfmt_png.Tpo -c highgui/grfmt_png.cpp -fPIC -DPIC -o .libs/lib_highgui_la-grfmt_png.o
highgui/grfmt_png.cpp: In static member function 'static void cv::PngDecoder::readDataFromBuf(void*, uchar*, size_t)':
highgui/grfmt_png.cpp:110: warning: 'png_struct_def::io_ptr' is deprecated (declared at /usr/include/libpng/png.h:1104)
highgui/grfmt_png.cpp:110: warning: 'png_struct_def::io_ptr' is deprecated (declared at /usr/include/libpng/png.h:1104)
highgui/grfmt_png.cpp: In member function 'virtual bool cv::PngDecoder::readHeader()':
highgui/grfmt_png.cpp:141: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/libpng/png.h:1090)
highgui/grfmt_png.cpp:141: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/libpng/png.h:1090)
highgui/grfmt_png.cpp: In member function 'virtual bool cv::PngDecoder::readData(cv::Mat&)':
highgui/grfmt_png.cpp:203: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/libpng/png.h:1090)
highgui/grfmt_png.cpp:203: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/libpng/png.h:1090)
highgui/grfmt_png.cpp:226: error: 'png_set_gray_1_2_4_to_8' was not declared in this scope
highgui/grfmt_png.cpp: In static member function 'static void cv::PngEncoder::writeDataToBuf(void*, uchar*, size_t)':
highgui/grfmt_png.cpp:283: warning: 'png_struct_def::io_ptr' is deprecated (declared at /usr/include/libpng/png.h:1104)
highgui/grfmt_png.cpp:283: warning: 'png_struct_def::io_ptr' is deprecated (declared at /usr/include/libpng/png.h:1104)
highgui/grfmt_png.cpp: In member function 'virtual bool cv::PngEncoder::write(const cv::Mat&, const std::vector<int, std::allocator<int> >&)':
highgui/grfmt_png.cpp:325: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/libpng/png.h:1090)
highgui/grfmt_png.cpp:325: warning: 'png_struct_def::jmpbuf' is deprecated (declared at /usr/include/libpng/png.h:1090)
make[2]: *** [lib_highgui_la-grfmt_png.lo] Error 1
make[2]: Leaving directory `/tmp/SBo/OpenCV-2.0.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/OpenCV-2.0.0'
make: *** [all] Error 2
Can someone help me?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-07-2010, 12:25 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
you can try this patch: here you can find a modified slackbuild too, if needed (it shows you also how to apply the patch)
 
Old 04-10-2010, 11:09 AM   #3
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
Hi, I'm trying to compile the new version of opencv.
I'm using Slackware64 13.0, I do all the things in the README but when I run make -j 2 at 88% just give a error, but none output.

What can I do?
 
Old 04-10-2010, 01:48 PM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
you can try with this slackbuild and patches (the same as above but on another link), just comment out the libpng patch from the slackbuild if you are not on current.
 
Old 04-10-2010, 04:35 PM   #5
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
Hi ponce, thanks for the reply.
I have tried with opencv 2.1.0, but the patch that correct the name of the libs fails.
So I tried with opencv 2.0.0, but i get this error:

Quote:
Scanning dependencies of target createsamples
[ 88%] Building CXX object apps/haartraining/CMakeFiles/createsamples.dir/createsamples.o
Linking CXX executable ../../bin/opencv_createsamples
../../lib/libhighgui.so.2.0.0: undefined reference to `cvCreateCameraCapture_V4L(int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_createsamples] Error 1
make[1]: *** [apps/haartraining/CMakeFiles/createsamples.dir/all] Error 2
make: *** [all] Error 2
I have tried install libv4l, but the error maintains.
Can someone help me?

Another question, why is this scrip not in slackbuilds?
 
Old 04-11-2010, 09:32 AM   #6
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
try this slackbuild on stable, uncomment the libpng patch on current.

why it's not on slackbuilds? I'm not the maintainer of opencv on slackbuilds.org

Last edited by ponce; 04-11-2010 at 09:34 AM.
 
2 members found this post helpful.
Old 04-11-2010, 02:49 PM   #7
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
I will try as soon as I can and I will report.
Ok, but in slackbuilds there is only script for version 1.1pre1 not for 2 or 2.1
 
Old 04-11-2010, 06:19 PM   #8
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
Thanks, this last script run like a charm.
It's installed and working.

I think you should submit this to slackbuilds, it's just a big help.
 
Old 05-06-2010, 01:33 AM   #9
sphinx
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by ponce View Post
you can try this patch: here you can find a modified slackbuild too, if needed (it shows you also how to apply the patch)
This link doesn't work. can You fix it or send me other?
 
Old 05-06-2010, 01:34 AM   #10
sphinx
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
This link doesn't works
 
Old 05-06-2010, 01:38 AM   #11
sphinx
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
this links doesn't works. can You fix it. or send me this slackbuild?
 
Old 05-06-2010, 03:21 AM   #12
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
it's here.

if you need another specific patch just go on SBo-git homepage, select the available patches from "branches" and click on the "commit" link.

or you can use this stuff directly with sbopkg
 
Old 05-25-2010, 05:20 AM   #13
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
Hey, I update Slackware to new version 13.1.
And now When I compile opencv 2.1 I can get V4L/V4l2 active so I can use my camera.

Quote:
-- General configuration for opencv 2.1.0 =====================================
--
-- Built as dynamic libs?: ON
-- Compiler:
-- C++ flags (Release): -Wall -pthread -march=i686 -ffunction-sections -O3 -DNDEBUG -fomit-frame-pointer -O3 -ffast-math -msse -msse2 -mfpmath=387 -DNDEBUG
-- C++ flags (Debug): -Wall -pthread -march=i686 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release): -L/usr/lib -L/lib
-- Linker flags (Debug): -L/usr/lib -L/lib
--
-- GUI:
-- GTK+ 2.x: 1
-- GThread: 1
--
-- Image I/O:
-- JPEG: TRUE
-- PNG: TRUE
-- TIFF: TRUE
-- JPEG 2000: TRUE
--
-- Video I/O:
-- DC1394 1.x: 0
-- DC1394 2.x: 0
-- FFMPEG: 0
-- codec: 0
-- format: 0
-- util: 0
-- swscale: 0
-- gentoo-style:
-- GStreamer: 1
-- UniCap:
-- PvAPI:
-- V4L/V4L2: FALSE/FALSE
-- Xine: 1
--
-- Interfaces:
-- Old Python: 0
-- Python: ON
-- Python interpreter: /usr/bin/python2.6
-- Python numpy: 0
-- Use IPP: NO
-- Use TBB: NO
-- Build Documentation 0
--
-- Install path: /usr
--
-- cvconfig.h is in: /tmp/SBo/OpenCV-2.1.0/build
-- -----------------------------------------------------------------
Cab anyone help me?
 
Old 05-25-2010, 05:34 AM   #14
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
dunno, sorry: have the same behaviour and looked around a little, also on users mailing list and trac tickets but with no luck...

I can see in slackbuilds.org git repository that they patched 1.1pre1 but have not tried it yet...

Last edited by ponce; 05-25-2010 at 05:37 AM.
 
Old 05-25-2010, 05:55 PM   #15
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
Since Slackware uses a library called V4L-utils insted V4L/V4L2 opencv don't recognize may camera.

I solved the issue adding this option to cmake
Quote:
-DWITH_V4L=true

Last edited by mlpa; 05-29-2010 at 10:08 AM. Reason: Solved
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is my only compile error "'Current:' Undeclared" gh0pp3r Programming 2 01-10-2010 11:28 PM
Cannot compile 2.6.30 in -current, error in firmware/Makefile Romanus81 Slackware 4 06-27-2009 05:40 PM
Linux 2.6.25, Slack-current, and nvidia compile error spaceballs Slackware 6 04-19-2008 06:57 PM
cannot compile programs in -current w/ 2.6.x zefo Slackware 7 04-29-2006 03:32 AM
Sylpheed-Claws compile error on Slackware-current jaakkop Linux - Software 3 02-12-2006 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration