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 1.6 linking issues on Arch Linux #3518
Comments
Thanks for the report! Is it possible that this is related to changes in arch and not changes in stack? In other words, does the problem still reproduce now if you downgrade to 1.5.1? Haven't seen this particular issue, but there's been lots of bug reports recently about ncurses / nopie and arch linux, which largely seem to be from upstream changes: |
If I downgrade to 1.5.1 I can build again. I did have trouble with ncurses and nopie in the past, the first was resolved by installing an AUR package, the second was resolved by somebody uploading the right bindist so Stack could download it. There was a comment about that in an issue here somewhere, but I cannot find it at the moment. |
Hmm, can you please try with this patch? #3521 It might solve the issue here. |
When I build Stack
When I change the resolver to the GHC 8.0.2-based |
|
Interesting! Pinging @borsboom |
I think @ruuda's approach is right, it's just that I guess nobody built a compatible ghc-8.0.1 bindist. Probably best to upgrade to ghc-8.0.2 anyway. |
Arch Linux has adopted |
There seems to be so much contradictory information coming in. Starting with a totally fresh Arch system, the following commands worked for me, so I think selection of the
However, building So that leaves me with a couple of questions:
|
One more observation: downgrading to stack-1.5.1 does not solve the problem for me. |
@NorfairKing told me that adding What's weird is that it looks like GHC should be passing in |
Relevant information also in #3648 |
It turns out the regular
I'll see if this also works on other PIE-by-default distributions, in which case we may be able to simply remove the extra configure options from the |
More potentially relevant information in #3630. |
I've tested without My current thinking is that we should remove the |
Alright, I think I have something that's going to work for both Arch and Gentoo (and also tested on Ubuntu 18.04 and Fedora 27). I've removed the
I've only updated the tinfo6 bindists for GHC 8.0.2 and 8.2.2 for now. Strangely, Gentoo seems to need |
I've confirmed that Stack 1.6.1 works with the modified YAML under Sabayon with GCC 5.4.0, though I had to change the command to:
(I think you might have truncated the URL) I'm happy with any solution that works seamlessly, particularly if we can upstream it into GHC. |
With the
My I still have the |
@ruuda You might be on your own for this one... we endeavour to have Did you have |
Yes, I did have those set during initial install. I cleaned my Doing a It is not a big issue for me, I can upgrade all my projects to a more recent LTS. |
@ruuda Ah, that explains it. GHC didn't add |
* 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
I've merged commercialhaskell/stackage-content#34, which should fix this for new Closing this issue, but if it's not solved for you feel free to re-open. |
I've updated the FAQ entry here: #3725 |
Hi guys. |
@theolaurent: It would be very nice to get updated "repacks" of GHCJS that use GHC 8.0.2 or newer (for reasons other than this as well). That deserves a separate issue. In terms of workaround for now, see https://docs.haskellstack.org/en/stable/faq/#i-get-strange-ld-errors-about-recompiling-with-fpic. |
I will leave a brief report of my success building things with all four of Perhaps it is redundant, but actually I don't think the FAQ article linked above is comprehensive. Though I do find it insightful, perhaps it might be improved, or otherwise someone may stumble on this issue as I did and find my report helpful.
The minimal ghc-7.10.3
ghc-8.0.1
I hope this somewhat longish installation is not too out of place here. |
During an attempt at compiling a git clone of ghcjs:
The same thing occurs if following the usual instructions for using GHCjs w/ stack found here. |
General summary/comments
I am testing the Stack 1.6.0 pre-release. I am trying to build ruuda/christmas-tree, commit
a48012e
. I can build it fine with Stack 1.5.1, but not with the 1.6.0 pre-release; the output is as follows:Steps to reproduce
I removed my
~/.stack/config.yaml
but that does not resolve the issue. The project'sstack.yaml
looks like this:I think Stack might have downloaded the wrong compiler here; it downloaded a
nopie
compiler but then complains about-fPIC
. I am using Arch Linux.Expected
The build should succeed.
Actual
Thousands of linker complaints.
Stack version
Method of installation
stack-static
AUR pkgbuild for 1.6.0 pre-release. It downloads the tar from Github.The text was updated successfully, but these errors were encountered: