View Single Post
  #10   Spotlight this post!  
Unread 30-11-2013, 23:39
hzheng_449 hzheng_449 is offline
Registered User
AKA: Harrison Zheng
FRC #0449 (Blair Robot Project)
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Rockville, MD
Posts: 36
hzheng_449 will become famous soon enough
Re: Installing OpenCV

Quote:
Originally Posted by yash101 View Post

PHP Code:
While compiling OpenCVat 20%, I got this error:
20%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o
20%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/rgbe.cpp.o
Linking CXX shared library 
../../lib/libopencv_highgui.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.3.0.0] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2 
Does anyone know what it could be?
I'm pretty sure I got a similar build error when I was installing openCV(which was around September). Hopefully Brennon's suggestion works, if not try building an older version of openCV or do the "lazy" thing and apt-get the library (which is what I ended up doing).