error compiling 2.4.5 on ubuntu [closed]
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
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?
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)
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?
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
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
add your cmake command and system configuration for a starter
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$
any idea ?