Slackware This Forum is for the discussion of Slackware Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
03-07-2010, 11:22 AM
#1
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Rep:
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.
03-07-2010, 12:25 PM
#2
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097
you can try
this patch:
here you can find a modified slackbuild too, if needed (it shows you also how to apply the patch)
04-10-2010, 11:09 AM
#3
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Original Poster
Rep:
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?
04-10-2010, 01:48 PM
#4
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097
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.
04-10-2010, 04:35 PM
#5
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Original Poster
Rep:
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?
04-11-2010, 09:32 AM
#6
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097
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.
04-11-2010, 02:49 PM
#7
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Original Poster
Rep:
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
04-11-2010, 06:19 PM
#8
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Original Poster
Rep:
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.
05-06-2010, 01:33 AM
#9
LQ Newbie
Registered: May 2010
Posts: 5
Rep:
Quote:
Originally Posted by
ponce
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?
05-06-2010, 01:34 AM
#10
LQ Newbie
Registered: May 2010
Posts: 5
Rep:
This link doesn't works
05-06-2010, 01:38 AM
#11
LQ Newbie
Registered: May 2010
Posts: 5
Rep:
this links doesn't works. can You fix it. or send me this slackbuild?
05-06-2010, 03:21 AM
#12
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097
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
05-25-2010, 05:20 AM
#13
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Original Poster
Rep:
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?
05-25-2010, 05:34 AM
#14
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097
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 .
05-25-2010, 05:55 PM
#15
Member
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542
Original Poster
Rep:
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
Last edited by mlpa; 05-29-2010 at 10:08 AM .
Reason: Solved
All times are GMT -5. The time now is 02:04 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News