Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948867 - dev-scheme/guile + guile-utils.eclass: doesn't play well with PKG_CONFIG_PATH set in the environment
Summary: dev-scheme/guile + guile-utils.eclass: doesn't play well with PKG_CONFIG_PATH...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-26 17:39 UTC by Vincent Reher
Modified: 2025-02-24 00:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Reher 2025-01-26 17:39:27 UTC
dev-scheme/guile ebuilds currently install .pc files in a "non-standard" location ${EPREFIX}/usr/share/guile-data/${SLOT}/pkgconfig and set PKG_CONFIG_PATH in /etc/env.d accordingly. Maybe this is to accommodate installation of multiple versions but unfortunately this is not working very well due to the fact that *something* in portage (an eclass?) is wiping out the inherited environment variable.

This breaks the guile_export() function in guile-utils.eclass for variable GUILE, resulting in an error message during package setup along the lines of "Could not get guile out of guile-3.0.  Did you source /etc/profile after an update?"

As a result, packages such as app-office/gnucash will fail during the setup (see bug 943469).

There are workarounds (hacks) to get affected packages to build. The ones that I considered to solve the gnucash installation problem were:

(1) ln -s /usr/share/guile-data/3.0/pkgconfig/guile-3.0.pc /usr/lib64/pkgconfig/guile-3.0.pc

(2) PKG_CONFIG_LIBDIR=$PKG_CONFIG_PATH ebuild /path/to/app-office/gnucash/gnucash-5.10.ebuild ...
Comment 1 Vincent Reher 2025-01-26 17:43:41 UTC
I just noticed that this bug has already been filed (bug 943022). Sorry about the duplication.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-26 17:45:42 UTC
In bug 943469, the issue is the user has PKG_CONFIG_PATH set themselves when calling emerge. This is really kind of brittle and could break in a bunch of other cases. We really recommend having a clean environment before calling emerge.

(In reply to Vincent Reher from comment #0)
> dev-scheme/guile ebuilds currently install .pc files in a "non-standard"
> location ${EPREFIX}/usr/share/guile-data/${SLOT}/pkgconfig and set
> PKG_CONFIG_PATH in /etc/env.d accordingly. Maybe this is to accommodate
> installation of multiple versions but unfortunately this is not working very
> well due to the fact that *something* in portage (an eclass?) is wiping out
> the inherited environment variable.

For issues like this, the thing to start with is always: "is this happening to everyobody? if not, what's special about my system?" That doesn't mean you're to blame or doing anything wrong, but it lets us start to figure out what's going on.

We've had plenty of happy customers with the new guile setup, so we need to figure out if you're in the bug 943469 case or instead something else.
Comment 3 Vincent Reher 2025-01-27 02:20:46 UTC
(In reply to Sam James from comment #2)

> In bug 943469, the issue is the user has PKG_CONFIG_PATH set themselves when
> calling emerge. This is really kind of brittle and could break in a bunch of
> other cases. We really recommend having a clean environment before calling
> emerge.

The environment in which I do the emerge does set PKG_CONFIG_PATH. One part of that path is the result of a file installed into /etc/env.d by dev-scheme/guile-3.0.10-r102.
 
> For issues like this, the thing to start with is always: "is this happening
> to everyobody? if not, what's special about my system?" That doesn't mean
> you're to blame or doing anything wrong, but it lets us start to figure out
> what's going on.
> 
> We've had plenty of happy customers with the new guile setup, so we need to
> figure out if you're in the bug 943469 case or instead something else.

Good point, so I started looking around and found this line in my make.conf: "export PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib32/pkgconfig". I must have put that there years ago to solve some other problem. Removing that line allowed gnucash to build.

Preliminary conclusion: it's OK to set PKG_CONFIG_PATH in the environment, just don't do it in make.conf.

Does that seem reasonable?