- Binary cross compiler not available on http://hackage.mobilehaskell.org/
- Installed xcode.
- Downloaded cross compiler.
- Created scripts.
- Downloaded libraries for machine.
- Compiled statically linked archive file of the HS library.
- Setup xcode to link app.
- Ran app.
Morritz tool-chain wrapper has the wrapped ld, clang, it also has cabal, so no need to use ghc-ios-scripts.
Seems like need patched ld to link against the mobile OS libraries.
Package resolver quite essential for wide range of users.
CrossCompilationBlogTutorial/iOSProjectCabal/- Adding the ‘sqlite’ library fails to compile due to an ambiguos function usage error (with a function (namely <>) from base).
- Although when compiling for a newer ghc, it doesn’t get that error. This could be because cabal used a base for ghc 8.4.0 that was different for ghc 8.10.0.
- Seems vital to be able to have flexible ghc versions so that it can integrate fully with the package resolver eco system.
- Got ‘direct-sqlite’ to compile and link. Although haven’t properly tried creating a database, but for now assuming that it’s enough.
- https://github.com/simplex-chat/simplexmq/tree/v5-ghc844
- This branch is made to be compatible with GHC 8.4.4
- The .cabal file generated for this stack project does not compile for GHC 8.4.0
- Manually trying to change the .cabal file to work is extremely time consuming, a lot of version conflicts.
- A stack LTS reslover for GHC 8.4.0 didn’t exist, so an older version of the resolver was used but that still caused problems, namely with the hand pinned versions of the packages.
- Maybe with a bit of effort, can port it down to GHC 8.4.0.
- But can see that would be much more freeing having an arbitrary version of the GHC compiler available.
- https://github.com/simplex-chat/simplex-chat
- GHC version 8.4.0 does not support BlockArguments
- I havan’t gotten to the point of the error, but there it’s highly likely that template haskell would stop me from compiling the project as well.
- https://github.com/simplex-chat/simplex-chat
- ChristmasStoryLogs/README.org
- Perhaps not the best use of time reimplementing already implemented solution.
- Maybe better to disect and understand the compilation steps of nix expressions that seem to have the solution for CI of android and iOS.
- Understand the process of compilation through the blogs zw3rk Blog.
- Create/Gather scripts for compiling a cross compiler.
- Things involved when compiling Haskell and what are the relevant steps for cross compile for a platform.
- For darwin, essentially passing flags to cabal, and wrapping clang with xcrun clang –sdk iphoneos/macos ..
- toolchain-wrapper / ghc iOS scripts