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

stack-setup-2: nopie fixes for Arch, Gentoo, and Void Linux #34

Merged
merged 1 commit into from
Dec 30, 2017

Conversation

borsboom
Copy link
Contributor

@borsboom borsboom commented Dec 27, 2017

  • Give people a bit of time to test before merging
  • Removes GHC <8.0.2 for all Linux -nopie builds, since those don't work
    reliably.
  • Removes configure-env for all remaining Linux -nopie builds, since
    GHC>=8.0.2 autodetects GCCs that support -no-pie (and the
    configure-envs interfered with the auto-detection causing it to fail
    on some distros)
  • Patches Linux GHC >= 8.0.2 bindists so that their configure
    script detects Gentoo Hardened GCC and adds --no-pie
    to linker arguments.
  • Adds ncurses6 GHC 8.2.2 bindist for Void Linux

Relates to commercialhaskell/stack#3518 commercialhaskell/stack#3636

* Removes GHC <8.0.2 for all Linux `-nopie` builds, since those don't work
  reliably.
* Removes `configure-env` for all remaining Linux `-nopie` builds, since GHC
  >=8.0.2 autodetects GCCs that support `-no-pie` (and the
  configure-envs interfered with the auto-detection causing it to fail
  on some distros)
* Patches Linux GHC >= 8.0.2 bindists so that their `configure`
  script detects Gentoo Hardened GCC and adds `--no-pie`
  to linker arguments.
* Adds ncurses6 GHC 8.2.2 bindist for Void Linux

Relates to commercialhaskell/stack#3518 commercialhaskell/stack#3636
@nponeccop
Copy link

How can I test it? Currently I use 8.0.2 in a 32-bit fork of Archlinux :) as the original ceased to support 32 bits. And I had to put nopie in config.yaml as Stack detected a non-existent flavour.

@mgsloan
Copy link
Contributor

mgsloan commented Dec 29, 2017

@nponeccop Via the setup-info flag - https://docs.haskellstack.org/en/stable/yaml_configuration/#setup-info

I haven't tried it, but this should work:

setup-info: "https://raw.githubusercontent.com/fpco/stackage-content/nopie-fixes-arch-gentoo/stack/stack-setup-2.yaml"

@nponeccop
Copy link

nponeccop commented Dec 29, 2017

It says "unrecognized fields", so I'm updating my stack (which wasn't that outdated) to see.

The current master stack says:

Warning: https://raw.githubusercontent.com/fpco/stackage-content/nopie-fixes-arch-gentoo/stack/stack-setup-2.yaml: Unrecognized field in GHCDownloadInfo: version
Warning: https://raw.githubusercontent.com/fpco/stackage-content/nopie-fixes-arch-gentoo/stack/stack-setup-2.yaml: Unrecognized field in SetupInfo: portable-git
Unable to find installation URLs for OS key: linux32-tinfo6-nopie

@borsboom
Copy link
Contributor Author

borsboom commented Dec 29, 2017

@nponeccop The unrecognized fields are actually deprecated fields that only older versions of Stack use (these warnings are only shown if you override the location of the setup-info). We've never built 32-bit tinfo6 bindists (It's such an uncommon case; I think you're the first person to ask), although we'd be happy to add them to the setup-info metadata if someone provides them. I'm hoping the GHC release team starts building official tinfo6/ncurses6 bindists soon, given how many distros have upgraded (I think only Debian/Ubuntu

@nponeccop
Copy link

@borsboom nopie flavour works fine for me, see above. So don't bother. I wonder why it doesn't detect that it tries it. I think I have both libtinfo 5 and 6

@borsboom
Copy link
Contributor Author

The current version of Stack will only try the "most specific" bindist and won't fall back to others if it doesn't exist. That's been improved in the master branch where it'll look for any bindist that should work on your system.

@nponeccop
Copy link

It's with master

stack --version
Version 1.7.0, Git revision 19e3460496f8fd2c462fb35a5825301e5c3c4eb0 (5518 commits) i386 hpack-0.20.0

@borsboom
Copy link
Contributor Author

borsboom commented Dec 29, 2017

You need commit acb196788948bab7a01e13cddf6e6cd5b5bf93a0. I just merged that PR this morning.

@nponeccop
Copy link

nponeccop commented Dec 29, 2017

Should I try it with this setup info or with the defaults? With the default config it says:

2017-12-29 23:05:03.381714: [debug] Found shared library libtinfo.so.6 in 'ldconfig -p' output
2017-12-29 23:05:03.381888: [debug] Found shared library libncursesw.so.6 in 'ldconfig -p' output
2017-12-29 23:05:03.382126: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output
2017-12-29 23:05:03.382350: [debug] Did not find shared library libgmp.so.3
2017-12-29 23:05:03.382508: [debug] Potential GHC builds: tinfo6, standard, ncurses6
2017-12-29 23:05:03.382702: [debug] Found already installed GHC builds:
2017-12-29 23:05:04.217981: [debug] Trying to setup GHC build: tinfo6
2017-12-29 23:05:04.218245: [debug] Trying to setup GHC build: standard

It ends with

Downloading from https://github.com/commercialhaskell/ghc/releases/download/ghc-8.0.2-release/ghc-8.0.2-i386-deb7-linux.tar.xz to /home/andy/.stack/programs/i386-linux/ghc-8.0.2.tar.xz ...

@borsboom
Copy link
Contributor Author

borsboom commented Dec 29, 2017 via email

@borsboom
Copy link
Contributor Author

Having heard no objections, merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants