sbmanager icon indicating copy to clipboard operation
sbmanager copied to clipboard

libbz2 does not provide pkg-config

Open yecril71pl opened this issue 10 years ago • 5 comments

I get the following error from configure:

checking for libbz2... no configure: error: Package requirements (bzip2 >= 1.0) were not met:

No package 'bzip2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables libbz2_CFLAGS and libbz2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

Note that bzip2 does not provide a package configuration file; such files are provided by some Linux distributions as a patch. Ubuntu does not provide one.

Setting libbz2_CFLAGS=-I/usr/include libbz2_LIBS=-lbz2 passes configure but then the compilation fails:

Making check in src make[1]: Wejście do katalogu `/home/krzzel/Oprogrammovanie/sbmanager/src' CC libsbmanager_la-device.lo device.c: In function 'device_init': device.c:46:5: error: 'g_mutex_new' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:273) [-Werror=deprecated-declarations] idevice_mutex = g_mutex_new();

yecril71pl avatar Jun 08 '15 20:06 yecril71pl

You are right, Ubuntu does not provide one for libbz2. The right thing to do as far as I know would probably be to contribute a pkg-config file upstream or for Ubuntu's package. However, passing CFLAGS and LIBS manually appears to fix it for you. Please mind that sbmanager is not ment to work with newer glib and for sure not with GTK+ 3 as it wasn't touched for a very long time. There is apparently a GTK+ 3 port somewhere on the Internets that has not been merged yet.

FunkyM avatar Jul 09 '15 13:07 FunkyM

I sent a request upstream to bzip2 site about including a pkg-config file but did not receive a reply. I filled a bugzilla for the inclusion of a pkg-config into bzip2-devel package for Fedora Fedora has already included a pkg-config into their devel package.

gitsop01 avatar Dec 11 '15 11:12 gitsop01

i get the same issue on arch linux when trying to compile an application

fennectech avatar Apr 27 '16 23:04 fennectech

i solved the same problem with env vars as the configure script suggested:

./configure \
       libbz2_LIBS="-lbz2" libbz2_CFLAGS="" \
       --disable-silent-rules

glensc avatar Sep 17 '16 07:09 glensc

Apply the following patches to build bzip2 with pkg-config support.

wget ftp://sourceware.org/pub/bzip2/bzip2-1.0.6.tar.gz
tar xfz bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
# patches.list: https://gist.github.com/steakknife/0ee85c93495ab9f9cff5e21ee12fb25b
wget https://gist.githubusercontent.com/steakknife/946f6ee331512a269145b293cbe898cc/raw/bzip2-1.0.6-install_docs-1.patch
wget https://gist.githubusercontent.com/steakknife/eceda09cae0cdb4900bcd9e479bab9be/raw/bzip2recover-CVE-2016-3189.patch
wget https://gist.githubusercontent.com/steakknife/42feaa223adb4dd7c5c85f288794973c/raw/bzip2-man-page-location.patch
wget https://gist.githubusercontent.com/steakknife/94f8aa4bfa79a3f896a660bf4e973f72/raw/bzip2-shared-make-install.patch
wget https://gist.githubusercontent.com/steakknife/4faee8a657db9402cbeb579279156e84/raw/bzip2-pkg-config.patch
patch -u < bzip2-1.0.6-install_docs-1.patch
patch -u < bzip2recover-CVE-2016-3189.patch
patch -u < bzip2-man-page-location.patch
patch -u < bzip2-shared-make-install.patch
patch -u < bzip2-pkg-config.patch
make
make install

webfolderio avatar Jan 16 '20 08:01 webfolderio