Page MenuHome GnuPG

Compiling gnupg with libgpg-error is much more difficult than necesary
Closed, ResolvedPublic

Description

I was attempting to compile gnupg from git today, and encountered a frustrating
issue to get linking with libgpg-error working.

I was building on Ubuntu 14.04 and the configure script kept saying that libgpg-
error could not be found.

I installed it through apt-get and then installed it by hand and the configure
script picked up neither installation.

I then opened the configure script and saw on line 7955 and onwards:

"""
if test x"${GPG_ERROR_CONFIG}" = x ; then

if test x"${gpg_error_config_prefix}" != x ; then
   GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
else
  case "${SYSROOT}" in

"""

so essentially its looking for the binary in PREFIX/bin/gpg-error-config, so if
you just do ./configure then it won't pick it up as Ubuntu installs it in:

/usr/bin/gpg-error-config

and compiling from source installs in:

/usr/local/bin/gpg-error-config

I am aware that --prefix=/usr would likely fix this but it seems quite annoying to
have to track tha down versus it just working like all other packages.

Would it be possible to have the script check the environment for the executable
instead of hardcoding paths?

Details

Version
latest git

Event Timeline

atcuno set Version to latest git.
atcuno added a subscriber: atcuno.
werner added a subscriber: werner.

This is on purpose. By looking at all kind of different places you would get
whatever version is installed there and run into trouble figuring out how to
update it. Thus if your gpg-error is installed at a different place you should use

  ./configure --with-gpg-error-prefix=/usr

to tell configure to use the system provide libgpg-error. In general it is
better to use the latest libgpg-error, though.

werner claimed this task.