Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Fix darwin support and test it on CI #399

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

TerrorJack
Copy link
Member

No description provided.

@TerrorJack TerrorJack added P2 major: an upcoming release type: bug labels Dec 16, 2019
@TerrorJack TerrorJack added this to To do in Improve the dev environment via automation Dec 16, 2019
@TerrorJack TerrorJack added this to To do in Improve the testing infrastructure via automation Dec 16, 2019
@TerrorJack
Copy link
Member Author

There's an error (see https://circleci.com/gh/tweag/asterius/8576) when we attempt to use runghc to run genapply:

ghc-toolkit         > Configuring ghc-toolkit-0.0.1...
ghc-toolkit         > ghc: mmap 131072 bytes at 0x0: Operation not permitted
ghc-toolkit         > ghc: Try specifying an address with +RTS -xm<addr> -RTS
ghc-toolkit         > ghc: internal error: m32_allocator_init: Failed to map
ghc-toolkit         >     (GHC version 8.6.5 for x86_64_apple_darwin)
ghc-toolkit         >     Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
ghc-toolkit         > readCreateProcess: /Users/distiller/.stack/programs/x86_64-osx/ghc-custom-asterius-8.6.5/bin/runghc "--ghc-arg=-Ighc-libdir/include" "--ghc-arg=-Iinclude-private" "genapply/Main.hs" (exit -6): failed

Of course, it's possible to remove the invocation of genapply and instead check in the generated AutoApply.cmm into the tree to simplify things. But I think that's some fundamental breakage we mustn't ignore.

@ProofOfKeags
Copy link

How can I help with this ticket, I'd like to be able to use it on my Mac (the docker is a bit cumbersome), is the fix straight forward, would someone new to the codebase such as myself be able to move this forward?

@TerrorJack
Copy link
Member Author

@ProofOfKeags You can test building and booting asterius locally. Check the CircleCI config for example build steps.

We're currently blocked on an ar-related issue (ar in the darwin environment doesn't seem to support rsp file). We can workaround this by installing binutils from brew or by implementing a special ar wrapper program and telling ahc-cabal to use that. There may be other darwin-specific issues even after this one is solved. But you're welcome to give this a try and report back the errors you've encountered! And just fyi, the CircleCI darwin job is also triggered for forked PRs, so in case you'd like to fiddle with CI script instead of your local environment, that's also possible.

@ProofOfKeags
Copy link

Yeah I tried to use the alternate ar from binutils but that causes regular stack builds for my other projects to fail, so some kind of switch seems necessary if that's the permanent route.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 major: an upcoming release type: bug
Development

Successfully merging this pull request may close these issues.

None yet

2 participants