Ask Your Question
0

error compiling 2.4.5 on ubuntu [closed]

asked 2014-08-26 14:33:19 -0600

curtis newton gravatar image

hello ,

trying to compile 2.4.5 from GIT, on Ubuntu

gives this

[code] /usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_ARM_MOVW_ABS_NC against `av_destruct_packet' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libavcodec.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: * [lib/libopencv_highgui.so.2.4.5] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2 [/code]

so i downloaded x264 package and compiled with -pic and -shared option but still get the same issue

please help me out

thanks

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by StevenPuttemans
close date 2014-09-04 06:29:34.503924

Comments

Can you start by grabbing the latest stable 2.4.9 branch? Why try to build a branch that still has tons of bugs in it compared to the latest stable?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-27 07:53:32 -0600 )edit

why? guess (i give you an indice : f@#king ubuntu) I already had these kind of errors( f@#king ARM cpu's) and many other issues trying to compile previous versions of opencv. it takes days and tons of patience to achive that (if possible)

curtis newton gravatar imagecurtis newton ( 2014-08-28 04:56:23 -0600 )edit

I just grabbed the latest 2.4.9 branch on Ubuntu 14.04 and made a CUDA6.0 included built in 25 mins. Not that difficult right?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-28 05:55:14 -0600 )edit

I just grabbed the latest 2.4.9 version on ubuntu 14.04 and got exactly the same error :-) so I dont know maybe I am cursed

curtis newton gravatar imagecurtis newton ( 2014-08-28 08:57:03 -0600 )edit

you "sound" like if i was making this up, lol

[ 9%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o Linking CXX shared library ../../lib/libopencv_highgui.so /usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_ARM_MOVW_ABS_NC against `av_destruct_packet' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libavcodec.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: * [lib/libopencv_highgui.so.2.4.9] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2

curtis newton gravatar imagecurtis newton ( 2014-08-28 08:58:02 -0600 )edit

add your cmake command and system configuration for a starter

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-28 09:22:21 -0600 )edit

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_EXAMPLES=ON -D WITH_JPEG=ON -D WITH_OPENGL=ON -D WITH_QT=OFF ..

odroid@odroid:~$ uname -a Linux odroid 3.4.75 #1 SMP PREEMPT Thu Jan 2 22:10:03 CST 2014 armv7l armv7l armv7l GNU/Linux

it is an ODROID box, cpu is an arm7/arm15

odroid@odroid:~/WORK/opencv/release$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty odroid@odroid:~/WORK/opencv/release$

curtis newton gravatar imagecurtis newton ( 2014-08-28 12:03:59 -0600 )edit

any idea ?

curtis newton gravatar imagecurtis newton ( 2014-08-29 04:50:08 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2014-08-26 20:37:19 -0600

elsuizo gravatar image

you have installed libavcodec-dev libavformat-dev libswscale-dev ?¿

edit flag offensive delete link more

Comments

yes i did..

curtis newton gravatar imagecurtis newton ( 2014-08-27 02:45:15 -0600 )edit

Question Tools

Stats

Asked: 2014-08-26 14:33:19 -0600

Seen: 834 times

Last updated: Sep 03 '14