[Pkg-cmake-team] Bug#853028: Bug#853028: cmake does not find bzip2 (libbz2)

Enrico Lumetti doppioandante at gmail.com
Sun Jan 29 17:20:40 UTC 2017


Sure, these are the two that I've tried:

cmake_minimum_required(VERSION 3.7)
project(bug)
find_package (BZip2)
if(NOT BZIP2_LIBRARIES)
   message("bzip2 not found")
endif()

its output:
-- Could NOT find BZip2 (missing:  BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
bzip2 not found

This one with find_library:
cmake_minimum_required(VERSION 3.7)
project(bug)

find_library(BZ2_LIBRARY bz2 libbz2)
if(NOT BZ2_LIBRARY)
   message("bzip2 not found")
endif()

Output: bzip2 not found

Enrico

2017-01-29 11:40 GMT+01:00 Felix Geyer <fgeyer at debian.org>:

> Hi,
>
> On 29.01.2017 02:45, enrico wrote:
> > Package: cmake
> > Version: 3.7.2-1
> > Severity: normal
> >
> > Dear Maintainer,
> >
> > Cmake can't find libbz2, nor by using find_package(BZip2) nor using
> find_library(). The cmake module is is the one shipped with cmake-data I
> think.
> > libbz2 is found at /lib/x86_64-linux-gnu/ and linking the so manually
> into /usr/lib/x86_64-linux-gnu/ seems to work.
> >
> > Look at CMakeFiles/CMakeOutput.txt,the LIBRARY_PATH variable seems to be
> correct
> >
> > LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/6/:/usr/lib/gcc/
> x86_64-linux-gnu/6/../../../x86_64-linux-gnu/:/usr/lib/
> gcc/x86_64-linux-gnu/6/../../../../lib/:/lib/x86_64-linux-
> gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../
> lib/:/usr/lib/gcc/x86_64-linux-gnu/6/../../../:/lib/:/usr/lib/
> >
> > I guess that something is wrong with find_library.
> > What would be the preferred work around for this?
>
> Works fine here (and in the automated tests).
>
> Can you please test this in a fresh project that just contains
> "find_package(BZip2)"?
>
> Felix
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-cmake-team/attachments/20170129/16b67755/attachment.html>


More information about the Pkg-cmake-team mailing list