Bug 1541705 - bdw-gc package missing pkg-config
Summary: bdw-gc package missing pkg-config
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: gc
Version: 27
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-04 08:44 UTC by Jeffrey Walton
Modified: 2018-02-04 22:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-04 15:02:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jeffrey Walton 2018-02-04 08:44:05 UTC
I'm trying to build Guile from sources. Guilde depends on Boehm garbage collector.

The Boehm GC is installed with development package:

    $ sudo yum install gc gc-devel
    Last metadata expiration check: 0:22:44 ago on Sun 04 Feb 2018 03:15:03 AM EST.
    Package gc-7.6.0-7.fc27.x86_64 is already installed, skipping.
    Package gc-devel-7.6.0-7.fc27.x86_64 is already installed, skipping.
    Dependencies resolved.
    Nothing to do.

However, Guile fails to configure:

    checking for BDW_GC... no
    configure: error: Package requirements (bdw-gc >= 7.2) were not met:

    Package 'bdw-gc', required by 'virtual:world', not found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

Looking at the Guile configure script:

    guile-2.2.3$ ./configure --help | grep -i bdw
      --with-bdw-gc=PKG       name of BDW-GC pkg-config file
      BDW_GC_CFLAGS
                  C compiler flags for BDW_GC, overriding pkg-config
      BDW_GC_LIBS linker flags for BDW_GC, overriding pkg-config

Looking at the pkg-config files:

    $ find /usr/lib64 -name '*.pc'
    /usr/lib64/pkgconfig/ncursesw.pc
    /usr/lib64/pkgconfig/menuw.pc
    /usr/lib64/pkgconfig/tinfow.pc
    /usr/lib64/pkgconfig/ncurses++w.pc
    /usr/lib64/pkgconfig/panelw.pc
    /usr/lib64/pkgconfig/formw.pc

It may be a good idea to add a pkg-config file for the garbage collector.

Comment 1 Jeffrey Walton 2018-02-04 08:46:40 UTC
My bad.. I meant to add this from Guile's configure script at https://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob_plain;f=configure.ac;hb=refs/heads/master :

#--------------------------------------------------------------------
#
# Boehm's GC library
#
#--------------------------------------------------------------------
AC_MSG_CHECKING(for which bdw-gc pkg-config file to use)
AC_ARG_WITH(bdw_gc, [  --with-bdw-gc=PKG       name of BDW-GC pkg-config file],
            [bdw_gc="$withval"], [bdw_gc=bdw-gc])
AC_MSG_RESULT($bdw_gc)
PKG_CHECK_MODULES([BDW_GC], [$bdw_gc >= 7.2])

save_LIBS="$LIBS"
LIBS="$BDW_GC_LIBS $LIBS"
CFLAGS="$BDW_GC_CFLAGS $CFLAGS"

# Functions that might not be defined, depending on configuration.
AC_CHECK_FUNCS([GC_pthread_exit GC_pthread_cancel GC_pthread_sigmask])

# Functions from GC 7.3.
AC_CHECK_FUNCS([GC_move_disappearing_link GC_is_heap_ptr])

LIBS="$save_LIBS"

Comment 2 Rex Dieter 2018-02-04 15:02:30 UTC
gcc already includes pkgconfig support.

$ rpm -q gc-devel
gc-7.6.0-7.fc27.x86_64

$ rpm -ql gc-devel | grep pkg 
/usr/lib64/pkgconfig/bdw-gc.pc


$ pkg-config --modversion bdw-gc
7.6.0


I can't explain how/why that file is missing for you.

Comment 3 Jeffrey Walton 2018-02-04 19:53:19 UTC
Thanks.

This is weird. I did a reinstall of gc and gc-devel and the *.pc file was present. I then ran a build script (configure, make, make install) and the *.pc file disappeared again.

Let me see what is wrong with the script.

Comment 4 Jeffrey Walton 2018-02-04 20:54:33 UTC
Thanks again Rex.

I think I tracked it down to Ncurses. My recipes downloads and builds Ncurses, Termacp and Readline from sources.

For Ncurses I perform a 'make unistall' followed by a 'make install'. The Ncurses 'make uninstall' appears to delete all the *.pc files in /usr/lib64 even though I am installing into /usr/local/lib{64}.

Weird behavior...

Comment 5 Jeffrey Walton 2018-02-04 21:00:08 UTC
(In reply to Jeffrey Walton from comment #4)
> Thanks again Rex.
> 
> I think I tracked it down to Ncurses. My recipes downloads and builds
> Ncurses, Termacp and Readline from sources.

Yes, confirmed it is Ncurses. Very weird behavior from 'make unisntall'

Comment 6 Jeffrey Walton 2018-02-04 22:31:31 UTC
(In reply to Jeffrey Walton from comment #5)
> (In reply to Jeffrey Walton from comment #4)
> > Thanks again Rex.
> > 
> > I think I tracked it down to Ncurses. My recipes downloads and builds
> > Ncurses, Termacp and Readline from sources.
> 
> Yes, confirmed it is Ncurses. Very weird behavior from 'make unisntall'

Here is the Ncurses bug report for future visitors: https://lists.gnu.org/archive/html/bug-ncurses/2018-02/msg00002.html 

It looks like Ncurses is deleting all *.pc files from the distro's $libdir, and not the --libdir it was configured with.


Note You need to log in before you can comment on or make changes to this bug.