Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1231941

Bug#1095260: libgpg-error-dev: can't find gpgme.pc when PKG_CONFIG_PATH is set

From Vincent Lefevre <vincent@vinc17.net>
Newsgroups linux.debian.bugs.dist
Subject Bug#1095260: libgpg-error-dev: can't find gpgme.pc when PKG_CONFIG_PATH is set
Date 2025-02-06 01:20 +0100
Message-ID <KcXMB-eHSp-1@gated-at.bofh.it> (permalink)
References <KcXjz-eHsr-1@gated-at.bofh.it> <KcXjz-eHsr-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Control: tags -1 upstream

On 2025-02-06 00:38:29 +0100, Vincent Lefevre wrote:
> When the PKG_CONFIG_PATH environment variable is set,
> "gpgrt-config --modversion gpgme" fails:
> 
> cventin:~> echo $PKG_CONFIG_PATH
> /home/vlefevre/opt/tcc/lib/pkgconfig
> cventin:~> gpgrt-config --modversion gpgme
> Can't find gpgme.pc
> cventin:~[1]>

This is an upstream bug:

  if [ -z "$PKG_CONFIG_LIBDIR" ]; then
    if [ -z "$PKG_CONFIG_PATH" ]; then
      # It used to fail as:
      #
      # echo "Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR" 1>&2
      # echo "Or set PKG_CONFIG_PATH" 1>&2
      #
      # Now, we try a fallback.
      determine_gpgrt_libdir
      PKG_CONFIG_PATH="${gpgrt_libdir}/pkgconfig"
    fi
  else
    # PKG_CONFIG_LIBDIR is available here
    # Modify PKG_CONFIG_PATH, prepending PKG_CONFIG_LIBDIR
    PKG_CONFIG_PATH="$PKG_CONFIG_LIBDIR${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH"
  fi

I suppose that if $PKG_CONFIG_LIBDIR is empty, ${gpgrt_libdir}/pkgconfig
should be prepended whether $PKG_CONFIG_PATH is empty or not. Something
like

  if [ -z "$PKG_CONFIG_LIBDIR" ]; then
    determine_gpgrt_libdir
    PKG_CONFIG_PATH="${gpgrt_libdir}/pkgconfig${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH"
  else
    # PKG_CONFIG_LIBDIR is available here
    # Modify PKG_CONFIG_PATH, prepending PKG_CONFIG_LIBDIR
    PKG_CONFIG_PATH="$PKG_CONFIG_LIBDIR${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH"
  fi

(not tested).

If this is not sufficient, the case where $PKG_CONFIG_PATH is unset
is probably buggy too.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#1095260: libgpg-error-dev: can't find gpgme.pc when PKG_CONFIG_PATH is set Vincent Lefevre <vincent@vinc17.net> - 2025-02-06 00:50 +0100
  Bug#1095260: libgpg-error-dev: can't find gpgme.pc when PKG_CONFIG_PATH is set Vincent Lefevre <vincent@vinc17.net> - 2025-02-06 01:20 +0100
  Bug#1095260: [pkg-gnupg-maint] Bug#1095260: libgpg-error-dev: can't find gpgme.pc when PKG_CONFIG_PATH is set NIIBE Yutaka <gniibe@fsij.org> - 2025-02-06 02:30 +0100

csiph-web