Project

General

Profile

Bug #844

Exiv2 doesn't compile using cmake scripts

Added by Abhinav Badola about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
Start date:
01 Sep 2012
Due date:
01 Sep 2012
% Done:

100%

Estimated time:
1.00 h

Description

Steps to Reproduce-
$ cd trunk
$ mkdir build
$ cd build
$ cmake ..
$ make

Error Produced -

Building CXX object src/CMakeFiles/metacopy.dir/metacopy.cpp.o
Linking CXX executable taglist
[ 74%] Building CXX object src/CMakeFiles/pathtest.dir/utils.cpp.o
libexiv2.so.12.0.0: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make2: * [src/taglist] Error 1
make1:
[src/CMakeFiles/taglist.dir/all] Error 2
make1:
Waiting for unfinished jobs....
[ 75%] Building CXX object src/CMakeFiles/exiv2.dir/actions.cpp.o
[ 76%] Building CXX object src/CMakeFiles/metacopy.dir/utils.cpp.o
Linking CXX executable path-test
Linking CXX executable metacopy
libexiv2.so.12.0.0: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make2:
[src/path-test] Error 1
make1:
[src/CMakeFiles/pathtest.dir/all] Error 2
[ 77%] Building CXX object src/CMakeFiles/exiv2.dir/utils.cpp.o
libexiv2.so.12.0.0: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make2:
[src/metacopy] Error 1
make1:
[src/CMakeFiles/metacopy.dir/all] Error 2
Linking CXX executable exiv2
libexiv2.so.12.0.0: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make2:
[src/exiv2] Error 1
make1:
[src/CMakeFiles/exiv2.dir/all] Error 2
make: *
[all] Error 2
badola@XPS:~/trunk/build>

Associated revisions

Revision 2864 (diff)
Added by Robin Mills about 9 years ago

Fix for #844 (see http://dev.exiv2.org/issues/844 for more information).

Revision 2892 (diff)
Added by Robin Mills about 9 years ago

Fix. Issue: #844. Do not link MSVC builds with library dl. Thanks Daniel for reporting this

History

#1

Updated by Robin Mills about 9 years ago

  • Category set to build
  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Priority changed from High to Normal
  • Target version set to 0.24
#2

Updated by Robin Mills about 9 years ago

  • Due date set to 01 Sep 2012
  • % Done changed from 0 to 90
  • Estimated time set to 1.00 h

Abhinav

Thank you for reporting this. My errors and apologies for your inconvenience. Congratulations and thank you for your contribution of the video code.

I've submitted a fix to src/CMakeLists.txt to link -ldl (svn:2864)

In July I added code (which is used by exiv2 -v -V) to report run-time library loading. This requires the dynamic loader library to be linked to libexiv2.

Perhaps you could build and let me know if you have further issues. If you're in agreement with the fix, please close the issue.

#3

Updated by Abhinav Badola about 9 years ago

  • % Done changed from 90 to 100

Thank you Robin.

The fix is working perfect at my end.

#4

Updated by Robin Mills about 9 years ago

  • Status changed from Assigned to Closed
#5

Updated by Daniel Kaneider about 9 years ago

This fix breaks compilation on Visual Studio !!!

Please add an appropriate IF in CMake to include the 'dl' library just for specific platforms. On VS I get a fatal error that the compiler can't find 'dl.lib'. Reverting the fix in SVN 2864 resolves that problem, and compilation of exiv2 succeeds.
- Tested on Win8 / CMake 2.8.9 / VS 2012

Thanks,
Daniel

#6

Updated by Robin Mills about 9 years ago

Thanks, Daniel. I'll add the IF to prevent MSVC from wanting libdl. However I'll submit a fix later in the weekend. Unfortunately I can't reopen a closed issue. If my fix causes further pain, perhaps you could report a new issue and mention in the issue report.

Thanks very much for bringing this to my attention. I've very pleased to see that you are using the MSVC/CMake support. Nobody else has reported issues about this and so I concluded "nobody's using this.". Your use and feedback is appreciated. Thanks.

Also available in: Atom PDF