Discussion:
GnuTLS and pkg-config
Jeffrey Walton
2010-11-21 02:53:42 UTC
Permalink
Hi All,

I was reading the online manual, Section 7.1.5, Building the Source,
at http://www.gnu.org/software/gnutls/manual/gnutls.html.

I think the pkg-config trick is kind of neat, so I started kicking the tires.

On Ubuntu, I seem to be having some problems getting useful
information from pkg-config. Any ideas?

Jeff

$ uname -a
Linux 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010
x86_64 GNU/Linux
$ pkg-config gnutls --cflags
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnutls' found
$ apt-cache pkgnames | grep libgnutls | sort
libgnutls11-dev
libgnutls13-dbg
libgnutls26
libgnutls26-dbg
libgnutls5-dev
libgnutls-dev
$ pkg-config libgnutls26 --cflags
Package libgnutls26 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnutls26.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnutls26' found
$
Brad Hards
2010-11-21 03:26:38 UTC
Permalink
Post by Jeffrey Walton
$ pkg-config gnutls --cflags
This is the right syntax (not the "gnutls26" thing you tried later). I get
***@bradh-VirtualBox:~$ pkg-config gnutls --libs
-lgnutls
***@bradh-VirtualBox:~$ apt-cache pkgnames | grep libgnutls | sort
libgnutls26
libgnutls26-dbg
libgnutls-dev
on my ubuntu 10.10 box, using packages.

Are you sure you've installed it correctly?
Have you tried looking for gnutls.pc on the filesystem?
Does it work for other packages?

In any case, it works from source, so this is an issue between you and your
distro packages (rather than a gnutls issue).

Brad
Jeffrey Walton
2010-11-21 03:49:09 UTC
Permalink
Post by Jeffrey Walton
$ pkg-config gnutls --cflags
This is the right syntax (not the "[lib]gnutls26" thing you tried later).
OK. Thanks. When pkg-config did not work for the general name, I began
trying specific names.
-lgnutls
libgnutls26
libgnutls26-dbg
libgnutls-dev
on my ubuntu 10.10 box, using packages.
Are you sure you've installed it correctly?
I believe so. I usually use the point-and-click Synaptic Package
Manager out of laziness. I reserve apt-cache and apt-get for problems.
Have you tried looking for gnutls.pc on the filesystem?
It looks like lots of libraries are missing the PC files, including GnuTLS.

$ ls /usr/lib | wc
1833 1833 33085
$ ls /usr/lib/pkgconfig/ | wc
58 58 913
Does it work for other packages?
Going out on a limb, I'm guessing about 58 of 1800 or so will work.
In any case, it works from source, so this is an issue between you and your
distro packages (rather than a gnutls issue).
Agreed. I'll get a report in for the missing package configuration file.

Thanks for the help,
Jeff
Brad Hards
2010-11-21 04:04:20 UTC
Permalink
Post by Jeffrey Walton
Agreed. I'll get a report in for the missing package configuration file.
I just checked http://launchpadlibrarian.net/48177067/libgnutls-
dev_2.8.6-1_amd64.deb and it contains the .pc file.

I think the problem is on your end.

Brad
Jeffrey Walton
2010-11-21 04:13:38 UTC
Permalink
Post by Brad Hards
Post by Jeffrey Walton
Agreed. I'll get a report in for the missing package configuration file.
I just checked http://launchpadlibrarian.net/48177067/libgnutls-
dev_2.8.6-1_amd64.deb and it contains the .pc file.
I think the problem is on your end.
OK. Thanks.

Jeff

$ dpkg -s libgnutls26
Package: libgnutls26
Status: install ok installed
Priority: standard
Section: libs
Installed-Size: 1176
Maintainer: Ubuntu Developers <ubuntu-devel-***@lists.ubuntu.com>
Architecture: amd64
Source: gnutls26
Version: 2.8.5-2
Replaces: gnutls0, gnutls0.4, gnutls3
Depends: libc6 (>= 2.8), libgcrypt11 (>= 1.4.2), libtasn1-3 (>=
1.6-0), zlib1g (>= 1:1.1.4)
Suggests: gnutls-bin
Conflicts: gnutls0, gnutls0.4
Description: the GNU TLS library - runtime library
gnutls is a portable library which implements the Transport Layer
Security (TLS) 1.0 and Secure Sockets Layer (SSL) 3.0 protocols.
.
Currently gnutls implements:
- the TLS 1.0 and SSL 3.0 protocols, without any US-export
controlled algorithms
- X509 Public Key Infrastructure (with several limitations).
- SRP for TLS authentication.
- TLS Extension mechanism
.
This package contains the runtime libraries.
Original-Maintainer: Debian GnuTLS Maintainers
<pkg-gnutls-***@lists.alioth.debian.org>
Homepage: http://www.gnutls.org/
Jeffrey Walton
2010-11-21 04:31:26 UTC
Permalink
Post by Brad Hards
Post by Jeffrey Walton
Agreed. I'll get a report in for the missing package configuration file.
I just checked http://launchpadlibrarian.net/48177067/libgnutls-
dev_2.8.6-1_amd64.deb and it contains the .pc file.
I think the problem is on your end.
I opened a bug report: http://bugs.launchpad.net/ubuntu/+bug/678020.
The report simply states, "libgnutls appears to be missing its package
configuration file, or the configuration file is not available."

I have not turned any knobs on the package system, so I don't believe
I've broken anything. If its broken on my side, it came that way out
of the box. If the report trickles back to the GnuTLS development
team, then my apologies.

Loading...