LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2015, 11:28 AM   #1
savio
LQ Newbie
 
Registered: May 2015
Posts: 29

Rep: Reputation: Disabled
problems in building opencv on ubuntu


Hi all,

I have problems in installing opencv 2.4 on the following ubuntu machine
(Linux 2.6.32-24-generic #43-Ubuntu SMP ... x86_64 GNU/Linux).

Firstly I use cmake and then after I use make there are the following messages:

/shared/sav/opencv-2.4.11/3rdparty/openexr/IlmImf/ImfPxr24Compressor.cpp:75:18: zlib.h: No such file or directory
...
...
...
make[1]: *** [3rdparty/openexr/CMakeFiles/IlmImf.dir/all] Error 2
make: *** [all] Error 2

Does anyone know what is the problem? I am completly stuck.

thanks in advance,
Saverio
 
Old 05-07-2015, 03:58 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

" zlib.h: No such file " : 'zlib.h' is a basic file in a development environment.
And 'zlib1g-dev' is actually mentioned in the opencv24 "build-depends"
http://packages.ubuntu.com/source/trusty/opencv

Please do : $ sudo apt-get build-dep opencv



-

Last edited by knudfl; 05-07-2015 at 04:02 AM.
 
Old 05-07-2015, 05:29 AM   #3
savio
LQ Newbie
 
Registered: May 2015
Posts: 29

Original Poster
Rep: Reputation: Disabled
Unfortunately I am working on a shared and important machine, so I have to install all on my local directory as well as by source without using any package utility.

During the cmake execution I can see the message:

-- ZLib: /usr/lib64/libz.so (ver 1.2.3.3)

In addition, zlib.h is in /usr/include/zlib.h but when I run make, the output is:

[ 0%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfPxr24Compressor.cpp.o
/shared/sav/opencv-2.4.11/3rdparty/openexr/IlmImf/ImfPxr24Compressor.cpp:75:18: zlib.h: No such file or directory
...
...
make[2]: *** [3rdparty/openexr/CMakeFiles/IlmImf.dir/IlmImf/ImfPxr24Compressor.cpp.o] Error 1
make[1]: *** [3rdparty/openexr/CMakeFiles/IlmImf.dir/all] Error 2
make: *** [all] Error 2

I have to install and configure all in my local directory /shared/myname

What could be the problem?
 
Old 05-07-2015, 08:22 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #3.

Looks like you have the zlib headers.

Suggest : Copy { zlib.h, zconf.h } to opencv-2.4.11/<??>
.. or to a "/home/<name>"/include/ folder, and add the new "include" to the cmake command,
like $ cmake -DCMAKE_CXX_FLAGS="-I /path/to/dir" ../
http://stackoverflow.com/questions/1...ional-includes


Tracing all the zlib headers : $ dpkg -L zlib1g-dev
/usr/include/x86_64-linux-gnu/zconf.h
/usr/include/zlib.h


Important : You can confuse 'cmake' if you are compiling in opencv-2.4.11/.
The common way is to use a build folder : opencv-2.4.11/build/, and :
$ cd build/
$ cmake ../
( You may have to start from scratch, with a new unpacked opencv-2.4.11.tar.gz ).
... Also be aware that the current stable version is opencv-2.4.9 ( or 2.4.8 ) :
2.4.9 : See Debian Sid / Ubuntu Vivid / Fedora 23.


-

Last edited by knudfl; 05-07-2015 at 08:27 AM.
 
Old 05-07-2015, 04:16 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
also do you have ALL of the openCV build dependencies already installed

as i recall from the last time i built it
it NEEDS a ton of extra tools
unfortunately opencv website dose NOT work in firefox/seamonkey/chrome
so i am unable to READ the install instructions

http://docs.opencv.org
is a DEAD LINK

looking as the output or cmake
you need a ton of things and the DEV deb files

ZLib
PNG
TIFF:
JPEG 2000:
OpenEXR:
FFMPEG:
GStreamer:
OpenNI:
OpenNI PrimeSensor Modules:
PvAPI:
GigEVisionSDK:
UniCap:
UniCap ucil:
V4L/V4L2:
XIMEA:
Xine:

IPP:
Eigen:
TBB:
OpenMP:
GCD
Concurrency
C=:
Cuda:
OpenCL:
numpy:
FFT
BLAS

Last edited by John VV; 05-07-2015 at 04:26 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Building chromaprint and opencv requires older version libx264 Chelyuk Slackware 3 03-24-2014 01:45 PM
[SOLVED] Problem building openCV 2.4.0 on 13.37 Z038 Slackware 14 12-24-2012 10:56 AM
OpenCV - Pixel format of incoming image is unsupported by OpenCV golmschenk Programming 1 04-01-2011 12:32 PM
[SOLVED] opencv problems _Linux_Learner Linux - Newbie 3 02-06-2011 06:09 AM
opencv problems in fedora 3 sinc2 Linux - Software 0 11-16-2004 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:06 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