Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncurses: fix enableStatic option to do what it says #43497

Closed

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jul 13, 2018

Motivation for this change
  1. Don't remove static libraries if they're asked for! This seems to be the intended behavior for enableStatic, and only changes behavior when intentionally opt'ing into a static ncurses.

cc @Ericson2314 (introduced the option in 3a672cb)

  1. Also the flag for this is --enable-normal, see ./configure --help and particularly the INSTALL file for description.
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ncurses

Partial log (click to expand)

/nix/store/q8rg4mca5zqv98arpxd7164pqa72hf1n-ncurses-6.1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: ncurses

Partial log (click to expand)

/nix/store/3mrldk4v82yjzh2ycnx8wnycpqmahar8-ncurses-6.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: ncurses

Partial log (click to expand)

/nix/store/6sv93vyryl27i7vw4hm9dmqbvvzjnadr-ncurses-6.1

@dtzWill dtzWill requested a review from Ericson2314 July 14, 2018 06:00
@dtzWill dtzWill changed the title ncurses: if enableStatic is set, don't remove the "*.a" files! ncurses: fix enableStatic option to do what it says Jul 14, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ncurses

Partial log (click to expand)

/nix/store/q8rg4mca5zqv98arpxd7164pqa72hf1n-ncurses-6.1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: ncurses

Partial log (click to expand)

/nix/store/3mrldk4v82yjzh2ycnx8wnycpqmahar8-ncurses-6.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: ncurses

Partial log (click to expand)

/nix/store/6sv93vyryl27i7vw4hm9dmqbvvzjnadr-ncurses-6.1

@dtzWill
Copy link
Member Author

dtzWill commented Jul 14, 2018

@GrahamcOfBorg build ncurses ncurses5 pkgsMusl.ncurses pkgsMusl.ncurses5

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: ncurses, ncurses5

The following builds were skipped because they don't evaluate on x86_64-darwin: pkgsMusl.ncurses, pkgsMusl.ncurses5

Partial log (click to expand)

�[31;1merror:�[0m Musl libc only supports Linux systems.

Cannot nix-instantiate `pkgsMusl.ncurses5' because:
�[31;1merror:�[0m Musl libc only supports Linux systems.

these paths will be fetched (0.38 MiB download, 2.99 MiB unpacked):
  /nix/store/r8psghzmq44plgh4npcm33h0vgxrwpik-ncurses-6.1-abi5-compat
copying path '/nix/store/r8psghzmq44plgh4npcm33h0vgxrwpik-ncurses-6.1-abi5-compat' from 'https://cache.nixos.org'...
/nix/store/3mrldk4v82yjzh2ycnx8wnycpqmahar8-ncurses-6.1
/nix/store/r8psghzmq44plgh4npcm33h0vgxrwpik-ncurses-6.1-abi5-compat

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: ncurses, ncurses5, pkgsMusl.ncurses, pkgsMusl.ncurses5

Partial log (click to expand)

cannot build derivation '/nix/store/15hvr7cngd12l9i84bkpni55l54v2cia-binutils-wrapper-2.30.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/s0zq6q4bf7970m75rhig9qgxhyzljff9-diffutils-3.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/csli3rap0rnzffi7ld4hs9qq15qfx3vz-ed-1.14.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/gj91l8gsy7cv17bq0r7qmr1dplgx4l6a-findutils-4.6.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/q2plzj674fpcn3l21l6gd184nszjizi2-gcc-wrapper-7.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/i928fgfssh6si0rjhps8r8a433jqrbs5-stdenv-linux.drv': 24 dependencies couldn't be built
cannot build derivation '/nix/store/nvyiap1s08jcr7l5kzcch1finlq8hm9d-pkg-config-0.29.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/fvlbxz56ffijylr40iy352slssmhz2zr-ncurses-6.1-abi5-compat.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/qjl3x749fiqhzhvknq5074cha4gybsbq-ncurses-6.1.drv': 4 dependencies couldn't be built
error: build of '/nix/store/fvlbxz56ffijylr40iy352slssmhz2zr-ncurses-6.1-abi5-compat.drv', '/nix/store/qjl3x749fiqhzhvknq5074cha4gybsbq-ncurses-6.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: ncurses, ncurses5, pkgsMusl.ncurses, pkgsMusl.ncurses5

Partial log (click to expand)

cannot build derivation '/nix/store/67b0a4qzkvjyhl58p70iday073q7892m-binutils-wrapper-2.30.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/9gixgfzsv861nhahdr2a8k3xbxn9949l-diffutils-3.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/1x4m3055pjmjrx3236ma7h4sgqf0jgv8-ed-1.14.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/6xqqbn07ywkk7fk1nbabmghi5vd8f13z-findutils-4.6.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/cmgixnz3i2hi1xmz5y4aj8vzsna6mncq-gcc-wrapper-7.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/0i8mksq5jnia8hiyhandvngjhlc4vqdy-stdenv-linux.drv': 26 dependencies couldn't be built
cannot build derivation '/nix/store/hbwnpg1nmvyv00a2kncg886s0nbyj1rh-pkg-config-0.29.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/v20wblc11fkk4wviaxgmzrm8l7x5chvb-ncurses-6.1-abi5-compat.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/6vjwk315fpga0s1wxx0nxfkxcvwll8cv-ncurses-6.1.drv': 4 dependencies couldn't be built
error: build of '/nix/store/6vjwk315fpga0s1wxx0nxfkxcvwll8cv-ncurses-6.1.drv', '/nix/store/v20wblc11fkk4wviaxgmzrm8l7x5chvb-ncurses-6.1-abi5-compat.drv' failed

@dtzWill
Copy link
Member Author

dtzWill commented Jul 14, 2018

Looks like this was fixed similarly by @shlevy ( af315bb ) -- although that makes the libtinfo link which I didn't here so looks like this is not needed :).

I was looking at using ncurses' ability to create libtinfo itself (see INSTALL docs, IIRC --with-termlib) but that generates split libraries which is just fine for static but for shared might be less desired.

@dtzWill dtzWill closed this Jul 14, 2018
@shlevy
Copy link
Member

shlevy commented Jul 14, 2018

Why has this issue been around for months and both of us hit it the same day? 😀

@dtzWill dtzWill deleted the fix/ncurses-enableStatic-keep-staticlibs branch July 14, 2018 20:22
@dtzWill dtzWill restored the fix/ncurses-enableStatic-keep-staticlibs branch July 14, 2018 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants