-lzlib doesn't work - have to use -lz when linking (Bug #1101)


Added by Gašper Ažman almost 14 years ago. Updated over 13 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:build/install
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

zlib's .so is named libz.so, so even though CMake correctly finds zlib.h, it doesn't link the library correctly.

If I add a softlink to libzlib.so to /usr/lib/, it compiles just fine.

This is on a recent (upgraded a week ago) archlinux.

My svn revision:
atom@kamichan ~/work/ijs/ocv/build/opencv $ svn update
Updated to revision 5250

Regards,

Gašper


Associated revisions

Revision 3b8a13a1
Added by Roman Donchenko over 11 years ago

Merge pull request #1101 from jet47:cudev-stub-lib

History

Updated by Alexander Shishkov over 13 years ago

Maybe you should use newer version of CMake.
I tried to reproduce your problem on Ubuntu 9.10 with CMake 2.8. It finds zlib correctly.
In /usr/share/cmake-2.8/Modules/FindZLIB.cmake it tries different names for zlib including z (libz.so):

SET
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )

  • Status changed from Open to Done
  • (deleted custom field) set to wontfix

Also available in: Atom PDF