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

Don't link to libstdc++ on darwin #145

Merged
merged 2 commits into from
Jul 15, 2023

Conversation

twesterhout
Copy link
Contributor

I believe that on OS X, one is expected to use libc++ instead of libstdc++ as the C++ standard library implementation.

@roberth
Copy link
Collaborator

roberth commented Jul 2, 2023

This seems to be the state of the art: https://github.com/haskell/text/pull/455/files
I don't think we need that level of complexity, as GHC 9.4 basically fixes the problem for us with the new pseudo package, but feel free to keep your new logic as a fallback if you need that, ie for <9.4.

@bitonic
Copy link
Collaborator

bitonic commented Jul 2, 2023

I have no opinion (nor a great way to test) this. If you guys have a consensus on what to do, I'll just do that.

@twesterhout
Copy link
Contributor Author

@roberth thanks for the pointer, I didn't know about system-cxx-std-lib. Shall I adapt the PR to use it on GHC 9.4 and onwards and have the branch for older versions?

@roberth
Copy link
Collaborator

roberth commented Jul 3, 2023

@twesterhout sounds good

@twesterhout
Copy link
Contributor Author

twesterhout commented Jul 10, 2023

Sorry for the delay. Tested locally on Linux on GHC 9.2 and 9.6, and both cases seem to compile and pass the tests.

@bitonic bitonic merged commit e8dc553 into fpco:master Jul 15, 2023
@bitonic
Copy link
Collaborator

bitonic commented Jul 15, 2023

Uploaded (0.5.0.1)

@domenkozar
Copy link
Contributor

https://hydra.nixos.org/build/230964714/nixlog/1 it fails on darwin

@bitonic
Copy link
Collaborator

bitonic commented Aug 11, 2023

BTW, I'd be happy to give merge/hackage permissions to @roberth or @junjihashimoto since I'm mostly rubber stamping changes I don't even really test by now, so things might go a bit quicker that way.

@junjihashimoto
Copy link
Collaborator

@bitonic Hi, it is also helpful to get permissions for me. I started using darwin environment, so I can debug the above error.

@junjihashimoto
Copy link
Collaborator

@domenkozar https://hydra.nixos.org/build/231020800 passes. Do you fix it on darwin?

@domenkozar
Copy link
Contributor

We applied a patch that reverses this PR.

@roberth
Copy link
Collaborator

roberth commented Aug 17, 2023

It appears that this error has been reproduced before:

And from the issue I gather that this ghc patch would fix the problem

It refers to ghci, which I presume is also infrastructure that's used by TemplateHaskell underneath.

@junjihashimoto
Copy link
Collaborator

https://github.com/fpco/inline-c/commit/e8dc553b13bb847409fdced649a6a863323cff8a.patch
The reverse patch removes build-depends: system-cxx-std-lib == 1.0 and replaces extra-libraries: stdc++ with extra-libraries: c++.

@bitonic
Copy link
Collaborator

bitonic commented Aug 20, 2023

Actually, I noticed we had already added @roberth as a collaborator -- so I don't think you need to me to merge PRs or similar. I think @junjihashimoto can also be added (only @snoyberg or somebody else at FPCo can do that though).

@snoyberg
Copy link
Member

@bitonic I've made you a maintainer so you can add additional collaborators.

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.

6 participants