Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 636566 - sys-process/htop: use pkg-config to find libraries.
Summary: sys-process/htop: use pkg-config to find libraries.
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-05 03:44 UTC by Benda Xu
Modified: 2021-10-15 04:15 UTC (History)
2 users (show)

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


Attachments
htop-2.0.2-tinfo.patch (htop-2.0.2-tinfo.patch,2.22 KB, patch)
2017-11-05 03:44 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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-dev Security 2021-10-15 04:15:50 UTC
Is this still an issue?