Bug 217421 - shells/zsh: devel/ncurses detection with poudriere
Summary: shells/zsh: devel/ncurses detection with poudriere
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Baptiste Daroussin
Depends on:
Reported: 2017-02-28 16:51 UTC by Kamigishi Rei
Modified: 2021-01-05 16:13 UTC (History)
4 users (show)

See Also:

Making zsh link against ncurses from ports; not quite nice because of direct .so version specification (855 bytes, patch)
2018-08-18 19:32 UTC, Kamigishi Rei
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kamigishi Rei 2017-02-28 16:51:48 UTC
The shells/zsh port is designed to detect whether devel/ncurses is installed in the build environment, and links against it if it is. When building using poudriere with devel/ncurses at the top of the ports listing the resulting shells/zsh package is still linked against base system ncurses.

Poudriere-built package:

        libncursesw.so.8 => /lib/libncursesw.so.8 (0x8008cf000)
        libm.so.5 => /lib/libm.so.5 (0x800b2b000)
        libc.so.7 => /lib/libc.so.7 (0x800d56000)

Binary built using make build in /usr/ports/shells/zsh with the binary devel/ncurses package installed:

        libtinfow.so.6 => /usr/local/lib/libtinfow.so.6 (0x8008cf000)
        libm.so.5 => /lib/libm.so.5 (0x800b08000)
        libc.so.7 => /lib/libc.so.7 (0x800d33000)

Would it be feasible to add a build option to force linking against devel/ncurses? Right now it appears impossible to get an automated build that depends on ncurses from ports.
Comment 1 Martin Wilke freebsd_committer 2017-03-05 13:34:13 UTC
Adding poduriere maintainer.
Comment 2 Kamigishi Rei 2017-10-11 15:32:28 UTC
Is it safe to assume that this will not be resolved?
Comment 3 Baptiste Daroussin freebsd_committer 2017-10-11 15:36:04 UTC
Sorry I missed it.

it is working as expected, poudriere is always building in a clean room. This order your specify the packages to build does not matter.

The reason why USES=ncurses prefers devel/ncurses from ports if installed is only because it is hard to prevent it when building in place from ports.

Why do you want zsh to be linked against the port version of ncurses?
Comment 4 Kamigishi Rei 2017-10-11 15:47:37 UTC
(In reply to Baptiste Daroussin from comment #3)
Partially because of 256 colours support included starting with 6.0. This might seem like bells and whistles, obviously.

However I would like to be able to reproduce the normal "make package" behaviour with poudriere. In my use case zsh is used on multiple machines and in quite a few jails (all using a central package repository) and a lot of users would like to have 256 colours support.
Comment 5 Kamigishi Rei 2018-08-18 19:32:05 UTC
Created attachment 196326 [details]
Making zsh link against ncurses from ports; not quite nice because of direct .so version specification

I tried adding a new option; had to specify libncurses.so.6 directly (with the .6) to make it install the port (otherwise it finds the library in /usr/lib). zsh compiles successfully and links against the ncurses port.

This most likely can be done in a better way.
Comment 6 Steve Wills freebsd_committer 2021-01-05 16:13:43 UTC
(In reply to Kamigishi Rei from comment #5)
Since 13-CURRENT has the newer ncurses now, this option should only be present if building on older versions, IMHO.