-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
pthread link errors on linux with GHC 8.2 #4130
Comments
This is with normal 'stack install'? Any special options?
What ghc and stack versions?
|
If this is this ghc bug it should be fixed in GHC 8.1 |
This is a normal stack install, stack 1.6.1, nightly-2017-12-05 resolver, ghc 8.2.2. |
This is odd, because we regularly do builds with cabal and
ghc 8.2.2 on travis-ci, which uses Ubuntu.
I noticed that we have a stack build with ghc 8.2.2 and
nightly on ci, and it fails for the reasons you report:
https://travis-ci.org/jgm/pandoc/jobs/312704463
I never looked into why, but we should figure this out.
Cabal seems to work fine...
+++ Simon Michael [Dec 07 17 22:44 ]:
… This is a normal stack install, stack 1.6.1, nightly-2017-12-05
resolver, ghc 8.2.2.
—
You are receiving this because you commented.
Reply to this email directly, [1]view it on GitHub, or [2]mute the
thread.
References
1. #4130 (comment)
2. https://github.com/notifications/unsubscribe-auth/AAAL5KbTEmUnQlTmR3b6ncj8iqnMN43sks5s-GpSgaJpZM4Q6ONB
|
More testing on this system:
Following @mb21's lead: binutils on this system provides both ld and ld.gold. GHC 8.2.1 release notes say "GHC will now use ld.gold or ld.lld instead of the system’s default ld, if available. Linker availability will be evaluated at configure time. The user can manually override which linker to use by passing the LD variable to configure. You can revert to the old behavior of using the system’s default ld by passing the --disable-ld-override flag to configure." I tried replacing /usr/bin/{gold,ld.gold} with symlinks to ld. This might not be a valid test. The format of the link error changed, but otherwise it seemed similar:
|
I tried adding |
@jgm: that fixed it with GHC 8.2.2 here. |
Excellent, I'll close this then. |
Thanks for the support! The cabal+ghc8.2 CI test probably should have failed like stack, it might need a tweak specifying GHC version. |
+++ Simon Michael [Dec 08 17 21:16 ]:
Thanks for the support!
The cabal+ghc8.2 CI test probably should have failed like stack, it
might need a tweak specifying GHC version.
You can see from the log that it's using ghc 8.2.2.
So I don't know why this worked for me and failed for you...
|
stackage nightly now has pandoc 2.0.5 which builds with GHC 8.2. jgm/pandoc#4130
@jgm what exactly did you do to fix this? I am still struggling with the build of Ampersand, using pandoc 2.0.6 with ghc 8.2.2. It builds fine with cabal, but the stack build fails, even as I enabled -threaded flag. |
@hansjoosten it looks like it's pandoc-crossref that is failing in your build. Perhaps it needs the threaded flag in its cabal file? If this works, you might alert the author. |
Thanks. I guess you are right. The -threaded option was only in the executable, not with the library. I asked @lierdakil to kindly add it. |
Did that change with GHC 8.2? |
+++ Nikolay Yakimov [Jan 15 18 22:01 ]:
Warning: 'ghc-options: -threaded' has no effect for libraries. It should only
be used for executables.
Did that change with GHC 8.2?
I'm not aware of any such change. In pandoc we only use
-threaded on the executable.
|
Problem: Both stack build and stack test fail with undefined references to pthread symbols. Fix: Add extra -threaded ghc option to stack configuration file. It's unclear to me why exactly cabal build works and stack build fails. Relevant github issues from other projects are: jgm/pandoc#4130 commercialhaskell/stack#3807
Problem: Both stack build and stack test fail with undefined references to pthread symbols. Fix: Add extra -threaded ghc option to stack configuration file. It's unclear to me why exactly cabal build works and stack build fails. Relevant github issues from other projects are: jgm/pandoc#4130 commercialhaskell/stack#3807
Problem: Both stack build and stack test fail with undefined references to pthread symbols. Fix: Add extra -threaded ghc option to stack configuration file. It's unclear to me why exactly cabal build works and stack build fails. Relevant github issues from other projects are: jgm/pandoc#4130 commercialhaskell/stack#3807
Problem: Both stack build and stack test fail with undefined references to pthread symbols. Fix: Add extra -threaded ghc option to stack configuration file. It's unclear to me why exactly cabal build works and stack build fails. Relevant github issues from other projects are: jgm/pandoc#4130 commercialhaskell/stack#3807
On Ubuntu 16.04.1 LTS, stack install pandoc-2.0.4 is failing to link pthread functions:
Is there an ubuntu package I'm missing ? I didn't see this error when building 1.x.
The text was updated successfully, but these errors were encountered: