freebayes: Missing external dependencies
Hello, I’m trying to switch from Cmake to meson build system and found several problems:
- I have the same problem with tests which you described here #668 - so I will wait for you to fix it
- I have missing dependencies - again - same as you:
Run-time dependency bz2lib found: NO (tried pkgconfig and cmake)
Run-time dependency htslib found: NO (tried pkgconfig and cmake)
But I have both installed in my system:
root@c653f49334a8:/soft/freebayes-1.3.3-src# bzip2 --version
bzip2, a block-sorting file compressor. Version 1.0.6, 6-Sept-2010.
Copyright (C) 1996-2010 by Julian Seward.
This program is free software; you can redistribute it and/or modify
it under the terms set out in the LICENSE file, which is included
in the bzip2-1.0.6 source distribution.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
LICENSE file for more details.
root@c653f49334a8:/soft/freebayes-1.3.3-src# apt update && apt install libbz2-dev
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Fetched 88.7 kB in 1s (109 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libbz2-dev is already the newest version (1.0.6-8.1ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@c653f49334a8:/soft/freebayes-1.3.3-src# pkg-config --print-provides htslib
htslib = 1.11
root@c653f49334a8:/soft/freebayes-1.3.3-src# pkg-config --modversion htslib
1.11
I’ve found way to point meson to htslib - I’ve added its path to PKG_CONFIG_PATH:
root@c653f49334a8:/soft/freebayes-1.3.3-src# meson "$SOFT/freebayes-${FREEBAYES_VERSION}-src/build" --buildtype debug
Using 'PKG_CONFIG_PATH' from environment with value: '/soft/htslib-1.11/lib/pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: '/soft/htslib-1.11/lib/pkgconfig'
The Meson build system
Version: 0.56.0
Source dir: /soft/freebayes-1.3.3-src
Build dir: /soft/freebayes-1.3.3-src/build
Build type: native build
Project name: freebayes
Project version: 1.3.3
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the host machine: c++ ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Dependency zlib found: YES 1.2.11 (cached)
Dependency liblzma found: YES 5.2.2 (cached)
Run-time dependency bz2lib found: NO (tried pkgconfig and cmake)
Dependency htslib found: YES 1.11 (cached)
Dependency threads found: YES unknown (cached)
Program prove found: YES (/usr/bin/prove)
Build targets in project: 2
Cmake should find BZip2:
root@c653f49334a8:/soft/freebayes-1.3.3-src# find / -name 'Find*.cmake' | grep -i 'bzip2'
/soft/cmake-3.19.2-Linux-x86_64/share/cmake-3.19/Modules/FindBZip2.cmake
But it’s not, and I cannot find any way to fix it.
Additional proof that Cmake should find bz2 - part of vcflib install log in same container:
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6")
Here are some links:
- https://github.com/libimobiledevice/sbmanager/issues/1 “libbz2 does not provide pkg-config”
- https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/16a70b58a6edd5927299406494544b5199e2e240/meson.build#L233
Should this be changed to something like: bzip2_dep = meson.get_compiler('c').find_library('bz2', required : false) or I’m wrong?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 29 (2 by maintainers)
Ok this is the familiar Anaconda environment and LD_PATH issue that I solved before. High-5! I got it installed. Time for bed 😃
I think it should build correclty if you do a full git recursive checkout of the repository.
See https://github.com/freebayes/freebayes#development
Note that in 3c92c0f15d422169f0a8ec5967f19e587e8b150c I removed bzip2_dep from meson.build altogether as it was not used.