0

I'm trying to compile gpgme-1.18 from source according to the instructions at https://linuxfromscratch.org/blfs/view/systemd/postlfs/gpgme.html

The compile fails, with the below error:

Making all in python make[2]: Entering directory '/home/brad_b82/gpgme-1.18.0/lang/python' Making all in . make[3]: Entering directory '/home/brad_b82/gpgme-1.18.0/lang/python' set -e ; for PYTHON in /usr/bin/python3.10; do \ CPP="gcc -E" \ CFLAGS="-g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div" \ srcdir="." \ top_builddir="../.." \ $PYTHON setup.py build --verbose --build-base="$(basename "${PYTHON}")-gpg" ; \ done running build Using gpgme.h from ../../src/gpgme.h Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR Or set PKG_CONFIG_PATH Could not find gpg-error-config. Please install the libgpg-error development package. make[3]: *** [Makefile:758: all-local] Error 1 make[3]: Leaving directory '/home/brad_b82/gpgme-1.18.0/lang/python' make[2]: *** [Makefile:475: all-recursive] Error 1 make[2]: Leaving directory '/home/brad_b82/gpgme-1.18.0/lang/python' make[1]: *** [Makefile:460: all-recursive] Error 1 make[1]: Leaving directory '/home/brad_b82/gpgme-1.18.0/lang' make: *** [Makefile:538: all-recursive] Error 1 

Computers lie! Earlier, in the configure process, the script was able to see gpg-error-config.

checking for gpg-error-config... /usr/bin/gpg-error-config checking for gpgrt-config... /usr/bin/gpgrt-config configure: Use gpgrt-config with /usr/lib as gpg-error-config checking for GPG Error - version >= 1.36... yes (1.46) configure: Use gpgrt-config as libassuan-config 

I can verify it's path location:

brad_b82 [ ~ ]$ which gpg-error-config /usr/bin/gpg-error-config brad_b82 [ ~ ]$ 

gpg-error-config is a symlink:

brad_b82 [ ~ ]$ file /usr/bin/gpg-error-config /usr/bin/gpg-error-config: symbolic link to gpgrt-config brad_b82 [ ~ ]$ 

When I run gpg-error-config, I get the following:

brad_b82 [ ~ ]$ gpg-error-config Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR Or set PKG_CONFIG_PATH brad_b82 [ ~ ]$ 

I'm at a loss at where to look to troubleshoot my issue. Any help is greatly appreciated!

# #

EDIT #1, REGARDING BRUNSON

I did verify the location of libgpg-error.so
I also copied the same libs to /usr/share/libgpg-error/ which the documentation tells me is the default location.

Making all in python make[2]: Entering directory '/home/brad_b82/gpgme-1.18.0/build1/build2/lang/python' Making all in . make[3]: Entering directory '/home/brad_b82/gpgme-1.18.0/build1/build2/lang/python' ln -sf "../../../../src/data.h" . ln -sf "../../conf/config.h" . ln -sf "../../../../lang/python/src" gpg touch copystamp set -e ; for PYTHON in /usr/bin/python3.10; do \ CPP="gcc -E" \ CFLAGS="-g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div" \ srcdir="../../../../lang/python" \ top_builddir="../.." \ $PYTHON setup.py build --verbose --build-base="$(basename "${PYTHON}")-gpg" ; \ done running build Using gpgme.h from ../../src/gpgme.h Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR Or set PKG_CONFIG_PATH Could not find gpg-error-config. Please install the libgpg-error development package. make[3]: *** [Makefile:758: all-local] Error 1 make[3]: Leaving directory '/home/brad_b82/gpgme-1.18.0/build1/build2/lang/python' make[2]: *** [Makefile:475: all-recursive] Error 1 make[2]: Leaving directory '/home/brad_b82/gpgme-1.18.0/build1/build2/lang/python' make[1]: *** [Makefile:460: all-recursive] Error 1 make[1]: Leaving directory '/home/brad_b82/gpgme-1.18.0/build1/build2/lang' make: *** [Makefile:538: all-recursive] Error 1 brad_b82 [ ~/gpgme-1.18.0/build1/build2 ]$ ls /usr/lib/ | grep gpg libgpg-error.so libgpg-error.so.0 libgpg-error.so.0.33.1 brad_b82 [ ~/gpgme-1.18.0/build1/build2 ]$ ls /usr/share/libgpg-error/ errorref.txt libgpg-error.so libgpg-error.so.0 libgpg-error.so.0.33.1 brad_b82 [ ~/gpgme-1.18.0/build1/build2 ]$ 

New things I want to point out. The "cl" and "cpp" portions of gpgme bindings seem to compile fine. It's not until it tries to compile the python bindings that it chokes.

I also tried to read every line of output during the python part, and I noticed something odd... Using gpgme.h from ../../src/gpgme.h

there would be no such path, as the directory I was in was ~/gpgme-1.18.0 which expanded is simply /home/brad_b82/gpgme-1.18.0

With me not having enough knowledge to fix the issue, I decided to simply try:

cd ~ rm -Rf gpgme-1.18.0 tar -xvf gpgme-1.18.0.tar.bz2 cd gpgme-1.18.0 mkdir build1 cd build1 mkdir build2 cd build2 ../../configure --prefix=/usr --libdir=/usr/lib --disable-gpg-test 

My thought process was that now, ../../src/gpgme.h actually exists. Still fails though. Yes, I did include the --libdir=/usr/lib just to try to cover bases, even though that exact same path appears in the configure script without adding it.

1
  • It's telling you exactly what to do: use --libdir or set PKG_CONFIG_LIBDIR or set PKG_CONFIG_PATH. Unfortunately, I don't know what to set them to, but that should be the start of your investigation. You're using linuxfromscratch, did you install it into a non-standard directory? Commented Oct 28, 2022 at 18:38

1 Answer 1

0

I need to answer this question and close it...

The linuxfromscratch devs has very recently released a patch to gpgme that solves the issues.

I'm not a programmer, but it does appear that I was at least on the right track when I was seeing the script try to pull from directories that don't exist.

Problem solved, case closed.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.