Terry
Terry

Reputation: 1232

configure GnuTLS - libnettle 3.4.1 was not found - OS X Lion

I'm trying to build GnuTLS-3.x on my OS X Lion and here is my configure command:

./configure --prefix=/usr/local/gnutls-3.4.9 --with-included-libtasn1 --without-p11-kit

It ends up

checking for NETTLE... no
configure: error:
  ***
  *** Libnettle 3.4.1 was not found.

though libnettle-3.4.1 is installed under /usr/local/libnettle-3.4.1 and its pkg-config file libnettle.pc is defined under /usr/local/lib/pkgconfig (I've built nettle-4.3.1 from source successfully)

I've read the stackoverflow post GnuTLS Libnettle 3.4 was not found but it didn't help a bit. All other posts on the Internet didn't help either.

I'm stuck on this error. Any help is appreciated. Thanks.

Upvotes: 5

Views: 3121

Answers (2)

luart
luart

Reputation: 1451

PKG_CONFIG should include nettle.pc and hogweed.pc, which were not copied to /usr/lib/pkgconfig/ in my build of nettle3 on Linux Ubuntu 20.04 x64, so I had to configure gnutls3 as follows:

PKG_CONFIG_PATH="$NETTLE3_ROOT:$PKG_CONFIG_PATH" ./configure --with-included-libtasn1 --with-included-unistring

where NETTLE3_ROOT is the path of nettle3 sources.

Upvotes: 2

Terry
Terry

Reputation: 1232

I've found the cause of the problem. It was the incorrectly defined environment variable PKG_CONFIG. It was set just to the installation directory of the pkg-config i.e. /usr/local/pkg-config-0.28

However it looks like that it must have been set to the full path plus the pkg-config command itself, like: /usr/local/pkg-config-0.28/bin/pkg-config

Upvotes: 2

Related Questions