bug-a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bdw-gc dependency


From: Bruno Haible
Subject: bdw-gc dependency
Date: Wed, 01 Feb 2023 15:24:07 +0100

On most platforms, with a workaround against the gperf problem,
the configuration then fails like this:


checking for pkg-config... no
checking for bdw-gc >= 7.2... no
configure: error: in `/home/bruno/a2ps-4.14.94/build':
configure: error: The pkg-config script could not be found or is too old.  Make 
sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables LIBGC_CFLAGS
and LIBGC_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details


There are three problems here:

1) Since I don't want to install pkg-config on my build machines, I opt
for the environment variables approach. I have already set BDW_GC_CFLAGS
and BDW_GC_LIBS for the sake of GNU guile and GNU poke. Now GNU a2ps
comes along and wants me to set *other* environment variables for the
*same* purpose.

A code search on codesearch.debian.net shows that
  - 2 GNU packages (guile and poke) use
      PKG_CHECK_MODULES([BDW_GC], ...
      or PKG_CHECK_MODULES(BDW_GC, ...
  - 3 non-GNU packages (mmv, ocp, libsidplayfp) use
      PKG_CHECK_MODULES([LIBGC], ...
      or PKG_CHECK_MODULES(LIBGC, ...

Please join the camp of guile and poke, and thus avoid unnecessary work
for the one who installs the package!

This requires changes to configure.ac, liba2ps/Makefile.am, and src/Makefile.am.


2) The dependency to bdw-gc should be stated in the DEPENDENCIES file.
Here's some proposed text (copied from GNU poke's DEPENDENCIES file):


* Boehm GC
  + Mandatory.
    a2ps uses the Boehm conservative garbage collector for managing the
    memory of some of its subsystems.
  + Homepage:
    https://www.hboehm.info/gc/
  + Download:
    https://www.hboehm.info/gc/gc_source/
  + Pre-built package name:
    - On Debian and Debian-based systems: libgc-dev,
    - On Red Hat distributions: gc-devel.
    - Other: https://repology.org/project/boehm-gc/versions

  + Note that if you have the Boehm GC installed in a prefix different
    from the one that contains pkg-config, you either need to set
    PKG_CONFIG_PATH so that pkg-config finds it:

    $ test -z "$PKG_CONFIG_PATH" \
        || PKG_CONFIG_PATH=${INSTALL_PREFIX_OF_PKGCONFIG}/lib/pkgconfig
    $ export 
PKG_CONFIG_PATH=${INSTALL_PREFIX_OF_LIBGC}/lib/pkgconfig:${PKG_CONFIG_PATH}

    or set the variables BDW_GC_CFLAGS, BDW_GC_LIBS when invoking 'configure'.

    Which one to use, depends how the Boehm GC is installed:
    - If it is installed as a binary package from the vendor, you usually
      don't need to set any variable.
      Except on Solaris 11, where you have to set BDW_GC_LIBS="-lbgc".
    - If it is installed as a binary package in /usr/local, such as e.g. on
      FreeBSD, set
      BDW_GC_CFLAGS="-I/usr/local/include" BDW_GC_LIBS="-L/usr/local/lib -lgc"
    - If it is installed from source with the same --prefix as you are using
      for GNU poke, set
      BDW_GC_LIBS="-lgc"
    - If it is installed from source with a different --prefix, set
      PKG_CONFIG_PATH as shown above.


3) The pkg.m4 that you used for creating the tarball mishandles empty
environment variables. When I set
  export LIBGC_CFLAGS=
  export LIBGC_LIBS="-lgc"
the configure test bails out and aborts. Whereas when I set
  export LIBGC_CFLAGS="-Wall"
  export LIBGC_LIBS="-lgc"
the configure test succeeds and I can build the package.

Suggested fix: Pull the pkg.m4 from GNU poke 3.0 (which you find on
https://ftp.gnu.org/gnu/poke/). AFAIK version 0.29.2 is the newest one.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]