Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393467 - sys-apps/hwloc ignores PKG_CONFIG, breaking portage-multilib when cross-toolchain is installed
Summary: sys-apps/hwloc ignores PKG_CONFIG, breaking portage-multilib when cross-toolc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Kacper Kowalik (Xarthisius) (RETIRED)
URL: https://svn.open-mpi.org/trac/hwloc/t...
Whiteboard:
Keywords:
Depends on:
Blocks: portage-multilib
  Show dependency tree
 
Reported: 2011-12-07 03:40 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2011-12-07 22:06 UTC (History)
1 user (show)

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


Attachments
hwloc-1.3-build.log (hwloc-1.3-build.log,10.06 KB, text/plain)
2011-12-07 03:40 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
emerge--info.txt (emerge--info.txt,7.85 KB, text/plain)
2011-12-07 03:40 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-12-07 03:40:09 UTC
Created attachment 295033 [details]
hwloc-1.3-build.log

sys-apps/hwloc's ./configure ignores the PKG_CONFIG envvar. Instead it respects HWLOC_PKG_CONFIG because hwloc's authors decided to maintain their own fork of pkg.m4.

This causes a compilation failure on portage-multilib when a cross-toolchain created by crossdev (including /usr/bin/${CHOST}-pkg-config) is installed. This is because if HWLOC_PKG_CONFIG isn't set, ./configure will try to look for ${CHOST}-pkg-config and it finds it. portage-multilib works around this collision between cross-compilation sysroot tools and host tools by setting PKG_CONFIG=pkg-config. sys-apps/hwloc ebuild should make up for hwloc's ignoring this variable by exporting HWLOC_PKG_CONFIG=$PKG_CONFIG if PKG_CONFIG is nonempty.
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-12-07 03:40:37 UTC
Created attachment 295035 [details]
emerge--info.txt
Comment 2 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-12-07 04:00:51 UTC
As a workaround and demonstration of the fix described in the description, the following command successfully installs hwloc onto a portage-multilib machine which has an (unrelated) cross-toolchain installed:

HWLOC_PKG_CONFIG=pkg-config FEATURES=-test emerge -1v hwloc
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2011-12-07 08:19:19 UTC
(In reply to comment #0)
> sys-apps/hwloc ebuild should make up for hwloc's
> ignoring this variable by exporting HWLOC_PKG_CONFIG=$PKG_CONFIG if PKG_CONFIG
> is nonempty.

As long as the ebuild remains in working condition for non-mulitilib, pkg_setup() is all yours. Easier if you do the changes yourself and test afterwards :)
Comment 4 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-12-07 22:06:50 UTC
Thanks, I've committed the changes and the package seems to be unbroken enough :-).