[CMake] (missing: BZIP2_LIBRARIES) (found version "1.0.6")??

Dave Abrahams dave at boostpro.com
Sat Jun 2 13:58:29 EDT 2012


on Sat Jun 02 2012, "Rolf Eike Beer" <eike-B90SbfZsE4eELgA04lAiVw-AT-public.gmane.org> wrote:

>>
>> on Sat Jun 02 2012, "Rolf Eike Beer"
>> <eike-B90SbfZsE4eELgA04lAiVw-AT-public.gmane.org> wrote:
>>
>>>>
>
>>>> I don't understand what I'm seeing here.  How can the bzip2 libraries
>>>> be
>>>> both missing and found simultaneously?  How should I go about debugging
>>>> this?
>>>>
>>>
>>>> Thanks,
>>>> Dave
>>>>
>>>>
>>>> $ dpkg -L libbz2-dev
>>>> /.
>>>> /usr
>>>> /usr/lib
>>>> /usr/lib/x86_64-linux-gnu
>>>> /usr/lib/x86_64-linux-gnu/libbz2.a
>>>> /usr/include
>>>> /usr/include/bzlib.h
>>>> /usr/share
>>>> /usr/share/doc
>>>> /usr/lib/x86_64-linux-gnu/libbz2.so
>>>> /usr/share/doc/libbz2-dev
>>>> dave at Ubu12:/tmp/qb/build$ LD_LIBRARY_PATH=/usr/lib/x86_64-gnu
>>>> ~/bin/cmake
>>>> .
>>>> CMake Error at
>>>> /home/dave/.cache/0install.net/implementations/sha1new=f0c7800e5e264c5d96d1cd6151de92dfc74f65bb/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
>>>> (MESSAGE):
>>>>   Could NOT find BZip2 (missing: BZIP2_LIBRARIES) (found version
>>>> "1.0.6")
>>>> Call Stack (most recent call first):
>>>
>>> FindBZip2 has found the header and detected that it has version 1.0.6,
>>> but
>>> it hasn't found the library itself because it is hidden in that
>>> subdirectory.
>>
>> That's very odd, considering that's a standard directory in which
>> libraries are installed on my distro.  Also I note that
>>
>>   LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu cmake  .
>
> LD_LIBRARY_PATH is for the dynamic linker when you start something. CMake
> doesn't look at this. 

I know it doesn't, but I thought perhaps it would be invoking g++ to
test for availability of the library and /that/ would be looking at it.

> It will look into e.g. /usr/lib and /usr/lib64 (depending on your
> system), but not into /usr/lib/x86_64-linux-gnu. You can tell it to
> try by setting CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu before
> calling CMake.

I set CMAKE_LIBRARY_PATH, and it worked.

>> didn't work any better than the other command.
>>
>>> Assuming that you have CMake 2.8.8 you can tell it where the library
>>> is with that command in the build dir:
>>>
>>> cmake -D BZIP2_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libbz2.so .
>>
>> I'l try that... but it seems wrong.  autoconf would be able to find that
>> library, right?
>
> I have no idea about autoconf, that's why I use CMake ;)

Heh, fair enough.  I'll file a bug report.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com



More information about the CMake mailing list