Page MenuHome GnuPG

Document gpgrt-config in detail or improve it to support simple invocation
Testing, HighPublic

Description

As of version 1.46, gpgrt-config only works well for the build of GnuPG and its friends, as an alternative to pkg-config plus cross build feature.

Currently:

  • It works well when it is invoked by gpg-error.m4 and other *.m4 (with --libdir option)
  • Or, it works well when it is invoked with PKG_CONFIG_LIBDIR or PKG_CONFIG_PATH defined

Under this restriction, it is difficult to refer gpgrt-config in a simple example of determining CFLAGS/LDFLAGS.
... because a simple invocation with no --libdir or PKG_CONFIG_LIBDIR/PKG_CONFIG_PATH is not supported yet.

(The reason why it is so is: better cross build support and avoiding code duplication of determining the place of libdir.)

Let us consider about support of a simple invocation.

Event Timeline

gniibe triaged this task as High priority.Nov 24 2022, 3:08 AM
gniibe created this task.

FWIW I would vote for a) "document gpgrt-config in detail" and suggest using pkg-config (variant) for direct invokations. There seems to be little benefit in investing effort/complicating gpgrt-config when pkg-config works fine.

Bootstrapping is an issue. Recall that pkg-config is not a simple program but requires the use of glib (which depends on libffi, libmount, libpcre) - catch-22. Makes building GnuPG on AIX not actually easy.

Bootstrapping is an issue. Recall that pkg-config is not a simple program but requires the use of glib (which depends on libffi, libmount, libpcre) - catch-22. Makes building GnuPG on AIX not actually easy.

Hello,

that seems to be unrelated to this bug report. Afaiui gpg-* bootstrapping is solved by AM_PATH_GPGME et al. (Which use gpgrt-config and do the heavy lifting of find the correect --libdir option for gpgrt-config .)

pkg-config most popular implementation nowadays is pkgconf which does not have the expensive glib dep and should be easy to bootstrap.

cu Andreas

Something like this?

@ametzler1 Thanks a lot for your help.

I'm going to add the documentation.

I consider again, and I realize that the options are not exclusive; We could also support a simple invocation with no --libdir or PKG_CONFIG_* variable, and then, use it in autoconf macro to determine, for next invocation of gpgrt-error with --libdir. That is, factor out the code from gpg-error.m4, copy it to gpgrt-config as a fallback. In future, gpg-error.m4 can remove the code (after we make sure new gpgrt-config availability).

gniibe mentioned this in Unknown Object (Event).Nov 28 2022, 6:44 AM
gniibe changed the task status from Open to Testing.Nov 29 2022, 6:10 AM

Pushed the change.

gniibe mentioned this in Unknown Object (Event).Dec 5 2022, 6:04 AM