Ask Your Question
1

Building OpenCV 2.4.3 as 32 bit lib

asked 2012-11-08 08:19:42 -0500

Theodor3 gravatar image

Hi,

i try to build OpenCV on my Ubuntu 12.4 (64 bit) as 32 bit library. I was setting the compiler flags like this:

cmake -G "Unix Makefiles" -D CMAKE_C_FLAGS=-m32 -D CMAKE_CXX_FLAGS=-m32 ..

Then i started to build the project. After some time i got this:

Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libImath.so when searching for -lImath
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libImath.a when searching for -lImath
/usr/bin/ld: skipping incompatible /usr/lib/libImath.so when searching for -lImath
/usr/bin/ld: skipping incompatible /usr/lib/libImath.a when searching for -lImath
/usr/bin/ld: cannot find -lImath
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libIlmImf.so when searching for -lIlmImf
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libIlmImf.a when searching for -lIlmImf
/usr/bin/ld: skipping incompatible /usr/lib/libIlmImf.so when searching for -lIlmImf
/usr/bin/ld: skipping incompatible /usr/lib/libIlmImf.a when searching for -lIlmImf
/usr/bin/ld: cannot find -lIlmImf
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libIex.so when searching for -lIex
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libIex.a when searching for -lIex
/usr/bin/ld: skipping incompatible /usr/lib/libIex.so when searching for -lIex
/usr/bin/ld: skipping incompatible /usr/lib/libIex.a when searching for -lIex
/usr/bin/ld: cannot find -lIex
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libHalf.so when searching for -lHalf
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libHalf.a when searching for -lHalf
/usr/bin/ld: skipping incompatible /usr/lib/libHalf.so when searching for -lHalf
/usr/bin/ld: skipping incompatible /usr/lib/libHalf.a when searching for -lHalf
/usr/bin/ld: cannot find -lHalf
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libIlmThread.so when searching for -lIlmThread
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libIlmThread.a when searching for -lIlmThread
/usr/bin/ld: skipping incompatible /usr/lib/libIlmThread.so when searching for -lIlmThread
/usr/bin/ld: skipping incompatible /usr/lib/libIlmThread.a when searching for -lIlmThread
/usr/bin/ld: cannot find -lIlmThread
/usr/bin/ld: cannot find -lgtk-x11-2.0
/usr/bin/ld: cannot find -lgdk-x11-2.0
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lpangoft2-1.0
/usr/bin/ld: cannot find -lpangocairo-1.0
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/ld: cannot find -lcairo
/usr/bin/ld: cannot find -lpango-1.0
/usr/bin/ld: cannot find -lfreetype
/usr/bin/ld: cannot find -lfontconfig
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -ldc1394
/usr/bin/ld: cannot find -lavcodec
/usr ...
(more)
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2012-11-12 07:33:36 -0500

  1. There is no opencv2/opencv_highgui.hpp file in OpenCV source tree. There is modules/highgui/include/opencv2/highgui/highgui.hpp file and it is not empty. Do you make changes in source code?
  2. Install ia32-libs package. it includes 32-bit runtime libs for 64-bit platforms.
edit flag offensive delete link more
0

answered 2012-11-08 09:03:34 -0500

jachu gravatar image

Have you ever tried to compile it on 64-bit system? I've tried it for last few hours and it is failed every time. The problem is (in my case) in opencv2/opencv_highgui.hpp file, which is empty - has no defined options responsible for including other .hpp files required to complete compilation. It seems to be some general problem with highgui in this release.

edit flag offensive delete link more

Comments

I could build it as 64 bit version without any problem.

Theodor3 gravatar imageTheodor3 ( 2012-11-08 09:23:41 -0500 )edit

I have the same problem

Rajan Craveri gravatar imageRajan Craveri ( 2013-04-22 04:34:59 -0500 )edit
0

answered 2012-11-09 00:27:21 -0500

First of all you need to install 32-bit version of all listed libs. You tries to use 64-bit libs for linking and build fails.

edit flag offensive delete link more

Comments

Yes, i know that this is the problem. But how to get the 32 bit version of this libs? I tried to use getlibs, but its not helping.

Theodor3 gravatar imageTheodor3 ( 2012-11-09 05:48:26 -0500 )edit
0

answered 2012-11-08 11:05:37 -0500

ponai gravatar image

updated 2012-11-08 19:58:08 -0500

/usr/bin/ld: cannot find -lavcodec
/usr/bin/ld: cannot find -lavformat
/usr/bin/ld: cannot find -lavutil
/usr/bin/ld: cannot find -lswscale

========================================

It seems that you haven't installed ffmpeg correctly.

edit flag offensive delete link more

Comments

ffmpeg is installed from ubuntu repositories, also libavcodec-dev, libavformat-dev, libswscale-dev

Theodor3 gravatar imageTheodor3 ( 2012-11-09 05:41:49 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-11-08 08:19:42 -0500

Seen: 4,592 times

Last updated: Nov 12 '12