Build fail (Bug #1580)


Added by Alexandre Benoit about 13 years ago. Updated about 13 years ago.


Status:Done Start date:
Priority:Low Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:features2d
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

After svn update (to revision 7250, compilation fails at module/features2d lining stage.
It seems that it does not find the libavcodec lib (-lavcodec fails) however in the previous modules -lavcodec was already there and did not generate a failure. (it was the Highgui module)
here is the log:

Linking CXX shared library ../../lib/libopencv_features2d.so
cd /uds_data/listic/install/opencv_package/trunk/opencv/release/modules/features2d && /uds_data/listic/install/cmake/cmake-2.8.3-Linux-i386/bin/cmake -E cmake_link_script CMakeFiles/opencv_features2d.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC   -Wall -Wno-long-long -pthread -ffunction-sections -O3 -DNDEBUG   -fomit-frame-pointer -msse -msse2 -msse3 -DNDEBUG  -shared -Wl,-soname,libopencv_features2d.so.2.3 -o ../../lib/libopencv_features2d.so.2.3.3 CMakeFiles/opencv_features2d.dir/src/bagofwords.cpp.o CMakeFiles/opencv_features2d.dir/src/blobdetector.cpp.o CMakeFiles/opencv_features2d.dir/src/brief.cpp.o CMakeFiles/opencv_features2d.dir/src/calonder.cpp.o CMakeFiles/opencv_features2d.dir/src/descriptors.cpp.o CMakeFiles/opencv_features2d.dir/src/detectors.cpp.o CMakeFiles/opencv_features2d.dir/src/draw.cpp.o CMakeFiles/opencv_features2d.dir/src/dynamic.cpp.o CMakeFiles/opencv_features2d.dir/src/evaluation.cpp.o CMakeFiles/opencv_features2d.dir/src/fast.cpp.o CMakeFiles/opencv_features2d.dir/src/keypoint.cpp.o CMakeFiles/opencv_features2d.dir/src/matchers.cpp.o CMakeFiles/opencv_features2d.dir/src/mser.cpp.o CMakeFiles/opencv_features2d.dir/src/oneway.cpp.o CMakeFiles/opencv_features2d.dir/src/orb.cpp.o CMakeFiles/opencv_features2d.dir/src/planardetect.cpp.o CMakeFiles/opencv_features2d.dir/src/precomp.cpp.o CMakeFiles/opencv_features2d.dir/src/sift.cpp.o CMakeFiles/opencv_features2d.dir/src/stardetector.cpp.o CMakeFiles/opencv_features2d.dir/src/surf.cpp.o ../../lib/libopencv_core.so.2.3.3 ../../lib/libopencv_imgproc.so.2.3.3 ../../lib/libopencv_highgui.so.2.3.3 ../../lib/libopencv_flann.so.2.3.3 -ldl -lm -lpthread -lrt ../../lib/libopencv_imgproc.so.2.3.3 ../../3rdparty/lib/liblibjpeg.a ../../3rdparty/lib/liblibtiff.a ../../3rdparty/lib/liblibjasper.a -lgthread-2.0 -lglib-2.0 -lavcodec -lavformat -lavutil -lswscale -lbz2 ../../lib/libopencv_core.so.2.3.3 ../../3rdparty/lib/libzlib.a -ldl -lm -lpthread -lrt -Wl,-rpath,/uds_data/listic/install/opencv_package/trunk/opencv/release/lib: 
/usr/bin/ld: cannot find -lavcodec
collect2: ld returned 1 exit status
maker2: *** [lib/libopencv_features2d.so.2.3.3] Error 1
maker2: Leaving directory @/gpfs/MUST-DATA/listic/install/opencv_package/trunk/opencv/release'
maker1: *** [modules/features2d/CMakeFiles/opencv_features2d.dir/all] Error 2
maker1: Leaving directory @/gpfs/MUST-DATA/listic/install/opencv_package/trunk/opencv/release'
make: *** [all] Error 2

opencvCV_rebuild.sh - script for opencv rebuild on the grid (1.2 kB) Alexandre Benoit, 2012-02-03 07:06 pm

ffmpeg_rebuild.sh - the script for ffmpeg update and rebuild (257 Bytes) Alexandre Benoit, 2012-02-03 07:06 pm

opencvBuildLog.txt - the build log (done after ffmpeg update (454.9 kB) Alexandre Benoit, 2012-02-03 07:09 pm

opencvBuildLod7253.txt - after svn update r7253 (371.5 kB) Alexandre Benoit, 2012-02-04 11:28 am


Associated revisions

Revision fdc1e87d
Added by Andrey Kamaev about 13 years ago

Attempt to fix #1580 - building OpenCV with ffmpeg not in LD_LIBRARY_PATH

Revision dfb161e9
Added by Andrey Kamaev about 13 years ago

Fixing #1580

Revision eac055a2
Added by Andrey Kamaev about 13 years ago

Fixed ticket #1580

History

Updated by Andrey Kamaev about 13 years ago

Could you please provide a full verbose build log?

  • Status deleted (Open)

Updated by Alexandre Benoit about 13 years ago

Thank you for your fast reply.

Here are some more contectual informations :
I compile and run on a grid, redhat based.

I give as attached files the 2 compilation scripts for ffmpeg and opencv and the opencv build log.
Note that folder /uds_data/ is the same as /gpfs/MUST-DATA/ (links)

Thank you for your help.
Best regards

Updated by Andrey Kamaev about 13 years ago

Please try r7253 I've committed a fix which should resolve the link problem.

Updated by Alexandre Benoit about 13 years ago

Replying to [comment:3 andrey.kamaev]:

Please try r7253 I've committed a fix which should resolve the link problem.

Hi, i just tested you new version.
Unfortunately, this linking problem still appears, this time on another linking step : for module OFFopencv_perf_core. The problem was before on features2d but in this compilation log, it is not yet concerned.

On the failed compilation stage, -lavcodec is involved, however, it seems that the library folder inclusion is not set (there is nothing like -L /uds_data/listic/ffmpeg_package/install/lib).

Updated by Andrey Kamaev about 13 years ago

This time (r7256) I'm sure that the link problem is fixed. I've restored a missed cmake property in the highui module. But unfortunately this fix is not perfect - it is still not possible to build OpenCV statically if path to FFMPEG libraries is not listed in LIBRARY_PATH.

On the failed compilation stage, -lavcodec is involved, however, it seems that the library folder inclusion is not set (there is nothing like -L /uds_data/listic/ffmpeg_package/install/lib).

Yes, you are right. It happens because of troublesome link_directories cmake command used in OpenCV's CMakeLists.txt combined with cmake default rules for resolving dependency chains.

By the way you are disabling accuracy tests for the OpenCV build. But currently OpenCV has two types of tests: accuracy and performance. If you also want to disable performance test, then you just need to add -DBUILD_PERF_TESTS=OFF to the cmake command line.

And thanks for reporting!

  • Status set to Done
  • (deleted custom field) set to fixed

Updated by Alexandre Benoit about 13 years ago

Hi Andrey,
Thank you for this job !!!
It rocks perfectly now !

On another opencv side now, with my current test algorithms, i saw another kind of error regarding the SIFT descriptor, can you recommend me the person to send the bug report to ?

Best regards and have a nice week end !
Best regards
Alex

Updated by Andrey Kamaev about 13 years ago

I think that Vadim Pisarevsky (vp153) is responsible for OpenCV's SIFT implementation.

Updated by Andrey Kamaev about 13 years ago

  • Target version set to 2.4.0
  • Description changed from After svn update (to revision 7250, compilation fails at module/features2d li... to After svn update (to revision 7250, compilation fails at module/features2d li... More

Also available in: Atom PDF