Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbz2 does not provide pkg-config #1

Open
yecril71pl opened this issue Jun 8, 2015 · 5 comments
Open

libbz2 does not provide pkg-config #1

yecril71pl opened this issue Jun 8, 2015 · 5 comments

Comments

@yecril71pl
Copy link

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();

@FunkyM
Copy link
Member

FunkyM commented Jul 9, 2015

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.

@gitsop01
Copy link

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.

@fennectech
Copy link

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

@glensc
Copy link

glensc commented Sep 17, 2016

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

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

@webfolderio
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants