Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 636566

Summary: sys-process/htop: use pkg-config to find libraries.
Product: Gentoo Linux Reporter: Benda Xu <heroxbd>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: htop-2.0.2-tinfo.patch

Description Benda Xu gentoo-dev 2017-11-05 03:44:09 UTC
Created attachment 502576 [details, diff]
htop-2.0.2-tinfo.patch

In the present htop-2.0.2-tinfo.patch, pkg-config is used to confirm whether ncurses/w exists, and if so, ncurses/w[56]?-config is called to figure out the  LIBS. In addtion the libraries are tested explicitly should the output of ncurses/w[56]?-config fails the tests.

This is problematic for Prefix. Consider a situation of RHEL7 where the system ncurses5-config outputs '-lncurses -ltinfo' and Gentoo ncurses6-config outputs '-LEPREFIX/usr/lib64 -lncurses'.

  0. Gentoo Prefix should be self-contained, but when ncurses6-config goes wrong, the host ncurses5-config gets leaked into the configuration.
  1. If the Gentoo ncurses tinfo is not compiled, the configure script calls the system ncurses5-config and the test fails.
  2. -LEPREFIX/usr/lib64 is the system library path for Gentoo Prefix and should not be specified explicitly.  pkg-config does this correctly.


Therefore I propose the attached patch to let htop only query pkg-config for ncurses/w when compiled on Gentoo.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-15 04:15:50 UTC
Is this still an issue?