LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 08-19-2012, 02:00 AM   #1
Edenkips
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Rep: Reputation: Disabled
Unhappy OpenCV 2.4.2 installation failed on Debian Squeeze


Hello all, when I was trying to install OpenCV, I got this error while building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o

FYI: I'm running the latest version of Debian Squeeze... if that helps.

Thanks in advance

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


[ 11%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
In file included from /home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:460:
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:37:1: warning: missing terminating " character
In file included from /home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:460:
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:37: error: missing terminating " character
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:38:11: error: too many decimal points in number
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:38:29: error: invalid suffix "st" on integer constant
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:42:29: warning: character constant too long for its type
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:59: error: stray ‘@’ in program
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:59: error: stray ‘@’ in program
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:70:10: error: #include expects "FILENAME" or <FILENAME>
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:73: error: stray ‘\’ in program
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:73:9: warning: missing terminating " character
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:73: error: missing terminating " character
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:76:23: warning: missing terminating " character
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1482:32: warning: "_FILE_OFFSET_BITS" is not defined
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1517: error: stray ‘\’ in program
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1517:4: warning: missing terminating " character
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1517: error: missing terminating " character
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc: In function ‘const std::string& cv::getBuildInformation()’:
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:38: error: expected ‘,’ or ‘;’ before ‘version’
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:140: error: ‘z_stream’ was not declared in this scope
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:142: error: expected ‘;’ before ‘typedef’
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:163: error: ‘gz_header’ was not declared in this scope
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:165: error: expected ‘;’ before ‘typedef’
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1507: error: ‘ZEXTERN’ was not declared in this scope
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1507: error: expected ‘;’ before ‘const’
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1513: error: no return statement in function returning non-void [-Wreturn-type]
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc: At global scope:
/home/edenkips/OpenCV-2.4.2/release/modules/core/version_string.inc:1517: error: expected unqualified-id before ‘)’ token
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:462: error: expected unqualified-id before ‘return’
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:465: error: ‘string’ does not name a type
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:474: error: ‘string’ does not name a type
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp: In function ‘bool setBreakOnError(bool)’:
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:535: warning: no previous declaration for ‘bool setBreakOnError(bool)’ [-Wmissing-declarations]
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp: At global scope:
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:542: error: ISO C++ forbids declaration of ‘Exception’ with no type [-fpermissive]
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:542: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp: In function ‘void error(int)’:
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:542: warning: no previous declaration for ‘void error(int)’ [-Wmissing-declarations]
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:545: error: ‘exc’ was not declared in this scope
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:549: error: ‘exc’ was not declared in this scope
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:565: error: ‘exc’ was not declared in this scope
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp: At global scope:
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:542: warning: unused parameter ‘Exception’ [-Wunused-parameter]
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp: In function ‘int (* redirectError(int (*)(int, const char*, const char*, const char*, int, void*), void*, void**))(int, const char*, const char*, const char*, int, void*)’:
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:569: warning: no previous declaration for ‘int (* redirectError(int (*)(int, const char*, const char*, const char*, int, void*), void*, void**))(int, const char*, const char*, const char*, int, void*)’ [-Wmissing-declarations]
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp: At global scope:
/home/edenkips/OpenCV-2.4.2/modules/core/src/system.cpp:582: error: expected declaration before ‘}’ token
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
 
Old 08-19-2012, 04:06 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,953

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Welcome to LQ.

Probably use the seven patches for OpenCV-2.4.2
http://ftp.de.debian.org/debian/pool....debian.tar.gz


Or better : 1) # apt-get build-dep opencv && exit

2) $ cd <new-folder>/ && apt-get -b source opencv=2.4.2+dfsg-0exp1
..... which will build all the (38 ?) Debian packages
http://packages.debian.org/source/experimental/opencv

You will have to add a line in /etc/apt/sources.list to use the Debian "2.4.2 source code" :
deb-src <your-usual-url> experimental main
... like
deb-src http://ftp.de.debian.org/debian experimental main


.

Last edited by knudfl; 08-19-2012 at 04:08 AM.
 
Old 08-19-2012, 11:40 PM   #3
Edenkips
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for welcoming me to the community.

I tried to install the dependencies, but it gave me even more errors while trying to install the package, I followed the steps, so I don't know what I'm doing wrong, Thanks again.



[ 1%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
cd /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core && /usr/bin/c++ -Dopencv_core_EXPORTS -DHAVE_CVCONFIG_H -DCVAPI_EXPORTS -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -pthread -march=i686 -fomit-frame-pointer -mfpmath=387 -ffunction-sections -g -O2 -DNDEBUG -fPIC -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu -isystem /usr/include/eigen2 -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/include -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/ts/include -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/highgui/include -isystem /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/perf -include "/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/precomp.hpp" -Winvalid-pch -o CMakeFiles/opencv_core.dir/src/system.cpp.o -c /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp
In file included from /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:460:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:37: error: missing terminating " character
In file included from /home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:460:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:38:11: error: too many decimal points in number
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:38:29: error: invalid suffix "st" on integer constant
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:59: error: stray ‘@’ in program
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:59: error: stray ‘@’ in program
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:70:10: error: #include expects "FILENAME" or <FILENAME>
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:73: error: stray ‘\’ in program
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:73: error: missing terminating " character
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:1517: error: stray ‘\’ in program
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:1517: error: missing terminating " character
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc: In function ‘const std::string& cv::getBuildInformation()’:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:38: error: expected ‘,’ or ‘;’ before ‘version’
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:140: error: ‘z_stream’ was not declared in this scope
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:142: error: expected ‘;’ before ‘typedef’
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:163: error: ‘gz_header’ was not declared in this scope
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:165: error: expected ‘;’ before ‘typedef’
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:1507: error: ‘ZEXTERN’ was not declared in this scope
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:1507: error: expected ‘;’ before ‘const’
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc: At global scope:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu/modules/core/version_string.inc:1517: error: expected unqualified-id before ‘)’ token
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:462: error: expected unqualified-id before ‘return’
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:465: error: ‘string’ does not name a type
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:474: error: ‘string’ does not name a type
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp: In function ‘bool setBreakOnError(bool)’:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:535: warning: no previous declaration for ‘bool setBreakOnError(bool)’ [-Wmissing-declarations]
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp: At global scope:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:542: error: ISO C++ forbids declaration of ‘Exception’ with no type [-fpermissive]
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:542: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp: In function ‘void error(int)’:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:542: warning: no previous declaration for ‘void error(int)’ [-Wmissing-declarations]
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:545: error: ‘exc’ was not declared in this scope
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:549: error: ‘exc’ was not declared in this scope
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:565: error: ‘exc’ was not declared in this scope
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp: At global scope:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:542: warning: unused parameter ‘Exception’ [-Wunused-parameter]
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp: In function ‘int (* redirectError(int (*)(int, const char*, const char*, const char*, int, void*), void*, void**))(int, const char*, const char*, const char*, int, void*)’:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:569: warning: no previous declaration for ‘int (* redirectError(int (*)(int, const char*, const char*, const char*, int, void*), void*, void**))(int, const char*, const char*, const char*, int, void*)’ [-Wmissing-declarations]
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp: At global scope:
/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/modules/core/src/system.cpp:582: error: expected declaration before ‘}’ token
make[3]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
make[3]: Leaving directory `/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu'
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make[2]: Leaving directory `/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/edenkips/Downloads/debian/opencv-2.4.2+dfsg/obj-i486-linux-gnu'
dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Build command 'cd opencv-2.4.2+dfsg && dpkg-buildpackage -b -uc' failed.
E: Child process failed
 
Old 08-20-2012, 04:14 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,953

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
1) A manual build :
# apt-get build-dep opencv && apt-get install libeigen2-dev
I applied the seven patches : The build fails here too on Debian Squeeze.

2) Package build : $ 'apt-get -b source opencv=2.4.2+dfsg-0exp1' : Fails too.

3) $ 'rpmbuild -bb opencv.spec' , also on Debian Squeeze
.... with the Fedora 18 source SRC.RPM opencv-2.4.2-2.fc18.src.rpm : Fails.

But then again, it is a new ( experimental ? ) version.

.
 
Old 08-20-2012, 11:53 AM   #5
Edenkips
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Oh! I have figured out that the problem is that the cmake is not the latest version, I just upgraded cmake to the latest version from the cmake website. OpenCV finally compiled smoothly without any problems, Thanks anyways.
 
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
No space left (after failed dpkg installation) - Debian Squeeze hedgeaus Linux - Newbie 2 07-21-2012 11:53 AM
[SOLVED] Failed attepts at installing google earth 6, debian Squeeze\Sid Elixer Debian 15 12-22-2010 09:51 PM
Debian Squeeze - isc-dhcp3-server failed to start (subnet problem?) uezelbruezel2000 Linux - Networking 2 11-16-2010 01:55 AM
red5 streaming server installation on debian squeeze failed. tkmsr Linux - Software 0 04-28-2010 06:26 AM
openoffice 'Javaldx failed!" Debian lenny squeeze kaz2100 Debian 0 02-23-2009 06:27 AM


All times are GMT -5. The time now is 01:47 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration