Skip to content

ncurses: Enable '--with-termlib' & '--with-versioned-symbols' - #126991

Closed
jkachmar wants to merge 1 commit into
NixOS:masterfrom
jkachmar:ncurses-termlib
Closed

jkachmar wants to merge 1 commit into
NixOS:masterfrom
jkachmar:ncurses-termlib

Conversation

@jkachmar

Copy link
Copy Markdown
Contributor
Motivation for this change

This is a riff off of #95141 (which I tried and was unable to use locally to resolve some problems); it should address #89769.

As this is mostly an appropriation of the work @andersk did in #95141 with a few extra items, I'm more than happy to close it in favor of that PR if that's preferable.

Things done

In addition to the work covered in #95141, this PR incorporates --with-versioned-syms in a manner similar to how OpenSUSE packages up ncurses (cf. --with-versioned-syms from https://build.opensuse.org/package/view_file/home:rhuitl/ncurses/ncurses.spec).

I've tested this locally with a package that refused to compile due to issues with ltinfo and these changes seem to have addressed the compilation failures.

Unfortunately I'm still seeing "no version information available" errors for libtinfo so I'm not really sure what to do about that... I've gated the --with-versioned-syms stuff behind a flag for now and I'm opening this as a draft PR to hopefully start some sort of discussion around this.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@jkachmar
jkachmar marked this pull request as draft June 15, 2021 20:44
Comment on lines 18 to 20

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda blindly copying this idiom from the OpenSUSE packaging docs, but it seems like the only "sane" way to handle this situation where something else might also be providing libtinfo (unless I'm misunderstanding something here).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely you meant to check for unicode? That’s the difference between libncurses and libncursesw.

But, libtinfo and libtinfow are supposed to be compatible, so that a separate libtinfow is not necessary. There have been bugs with this in the past, but they were treated as bugs by the upstream maintainer and fixed (https://bugzilla.redhat.com/show_bug.cgi?id=1580323).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this; I'm pretty unfamiliar with ncurses packaging and I've been piecing things together today in an attempt to workaround some local tooling packaging.

I've dropped this, so at the moment it seems as if there's nothing useful in this PR at all; I'm inclined to close it since I can't figure out whether --with-versioned-symbols actually resolves my issue or not.

Is there anything else you would need to help get #95141 finalized?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I'm not 100% sure what the right approach here is.

I was hoping this would address some issues I had been running into around "no version information available" noise but it doesn't seem to be the case (at least based on a quick local test).

Comment on lines 145 to 149

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting lots of errors here that all look like:

Moving /nix/store/nrw7dh0d9pggn1ngf6l1v5rciagqjpr7-ncurses-6.2-dev/bin/clear to /nix/store/x8d5mqkmnsw5n27fpw5f0jba3dxixdln-ncurses-6.2/bin/clear
rmdir: failed to remove '/nix/store/nrw7dh0d9pggn1ngf6l1v5rciagqjpr7-ncurses-6.2-dev/bin': Directory not empty` errors

Is there a way to resolve this?

Comment on lines 176 to 186

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally unsure whether this is appropriate, hopefully someone with more experience can chime in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased & removed this.

@jkachmar

Copy link
Copy Markdown
Contributor Author

Per @bgamari's comment w.r.t. libtinfo SONAME...

abiVersion = "6":

❯ objdump -p /nix/store/x8d5mqkmnsw5n27fpw5f0jba3dxixdln-ncurses-6.2/lib/libtinfo.so.6 | rg SONAME
  SONAME               libtinfo.so.6

abiVersion = "5":

objdump -p /nix/store/z9ipfmywr5z2zlam8zfsfbl376xdg40w-ncurses-6.2-abi5-compat/lib/libtinfo.so.5 | rg SONAME
  SONAME               libtinfo.so.5

@ofborg ofborg Bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jun 15, 2021
@jkachmar jkachmar closed this Jun 28, 2021
@andersk andersk mentioned this pull request Jun 29, 2021
3 of 10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants