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

arm64: /usr/bin/ld.gold: error: Stub is too far away, try a smaller value for '--stub-group-size'. The current value is 0x7ffbffc. #3433

Open
juhp opened this issue Jan 1, 2023 · 6 comments
Labels
build tool: cabal type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@juhp
Copy link
Contributor

juhp commented Jan 1, 2023

I am hitting linking errors on Fedora aarch64 when building HLS 1.9 for Fedora for ghc9.0 and ghc9.2:

see https://copr.fedorainfracloud.org/coprs/petersen/haskell-language-server/monitor/
(edit: plus https://copr.fedorainfracloud.org/coprs/petersen/haskell-language-server/build/5197512/)

Your environment

Fedora Linux

Steps to reproduce

Basically using cabal install but you can see the exact steps:
https://github.com/fedora-haskell/haskell-language-server/blob/main/haskell-language-server.spec#L409

Expected behaviour

HLS 1.9 to build and link on aarch64

Actual behaviour

Linking fails with many:

/usr/bin/ld.gold: error: Stub is too far away, try a smaller value for '--stub-group-size'. The current value is 0x7ffbffc.

Debug information

Build logs are available starting from the above link.

Has anyone else hit something like this before?
I have been building with dynamic False since 1.6.

This could well be a ghc issue: feels like HLS pushes it limits...

@juhp juhp added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jan 1, 2023
@juhp
Copy link
Contributor Author

juhp commented Jan 4, 2023

With dynamic it seems okay, but that makes the packaging rather more complex...

Though I suppose dynamic is preferred for TH etc, right?

@mpickering
Copy link
Contributor

@juhp It is strongly recommended you build dynamically linked HLS releases as this works much better with projects with TH.

@juhp
Copy link
Contributor Author

juhp commented Aug 26, 2023

Okay, thanks - I have to consider this - it is a major packaging change.

Okay yes I see the official binaries are dynlinked.
Me being lazy again...

@hasufell
Copy link
Member

@juhp It is strongly recommended you build dynamically linked HLS releases as this works much better with projects with TH.

I've tried to find evidence of this some time ago by getting a clear reproducer. But I couldn't.

Do you have any?

@juhp
Copy link
Contributor Author

juhp commented Dec 15, 2023

@hasufell I can reproduce 100% on Fedora aarch64 with ghc-9.4.8 and 9.6.3, if that is what you are asking

@hasufell
Copy link
Member

@hasufell I can reproduce 100% on Fedora aarch64 with ghc-9.4.8 and 9.6.3, if that is what you are asking

I'm asking if there's a clear reproducer that static HLS binaries cause TH issues, because I could not find any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: cabal type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants