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

Update to GHC 8.6.5 and nixpkgs 19.03 #506

Merged
merged 64 commits into from
Aug 23, 2019
Merged

Update to GHC 8.6.5 and nixpkgs 19.03 #506

merged 64 commits into from
Aug 23, 2019

Conversation

ali-abrar
Copy link
Member

@ali-abrar ali-abrar commented Jul 10, 2019

We no longer have to do as much patching of ghcjs since many of the formerly-applied patches have been upstreamed.

This includes #496

What works:

  • GHCJS
  • Webkit2gtk (on linux)

What still needs work:

Still a lot of cleanup to be done:

  • Delete old, probably obsolete overrides
  • Use thunks more consistently for forked repos
  • Replace patch application with forks wherever we can (updating the patches is a bit annoying otherwise)
  • Update changelog
  • Open issue on or upstream fixes to cabal2nix
  • Determine what, if anything, should replace the "a" package

ali-abrar and others added 25 commits March 19, 2019 13:26
…atform into aa-ghcjs-8.4-unfork

* 'aa-ghcjs-8.4-unfork' of github.com:reflex-frp/reflex-platform:
  Bump reflex-dom
  Bump reflex
  Bump nixpkgs
  Bump nixpkgs
# Conflicts:
#	dep/reflex/github.json
* wip-iv:
  Bump reflex and reflex-dom
* origin/wip-iv:
  Bump reflex and reflex-dom
* origin/develop:
  Fix typo in universe-dependent-sum package import
  Pin new versions of dependent-sum/map and universe dependencies
  Bump reflex(-dom) and update dependent-sum/map + universe packages
  Accept android sdk license in release.nix
  iBump reflex and reflex-dom
  Revert "Merge remote-tracking branch 'origin/cg-bump-reflex-dom' into cg-bump-reflex-dom"
  bump reflex-dom to cg-hydration-fixes
  Acept android sdk license for ci
  bump reflex-dom to cg-cherrypick-runImmediateWidgetWithHeadAndBody
  Fix try-reflex when text-jsstring patch is disabled
* aa-ghcjs-8.4-unfork:
  Fix typo in universe-dependent-sum package import
  Pin new versions of dependent-sum/map and universe dependencies
  Bump reflex(-dom) and update dependent-sum/map + universe packages
  Accept android sdk license in release.nix
  iBump reflex and reflex-dom
  Revert "Merge remote-tracking branch 'origin/cg-bump-reflex-dom' into cg-bump-reflex-dom"
  bump reflex-dom to cg-hydration-fixes
  Acept android sdk license for ci
  bump reflex-dom to cg-cherrypick-runImmediateWidgetWithHeadAndBody
  Fix try-reflex when text-jsstring patch is disabled
  Skip tasty-quickcheck tests on ghcjs
  Update to upstream ghcjs and ghcjs-base, remove some obsolete patches
@ali-abrar
Copy link
Member Author

One important thing to note is that currently this switches reflex-platform to 8.6.5 and does not preserve support for 8.4.*

@ali-abrar
Copy link
Member Author

ali-abrar commented Jul 16, 2019

Using libffi-3.3-rc0 (https://github.com/libffi/libffi/releases/tag/v3.3-rc0) results in android 32-bit and android 64-bit now failing with the same error:

32-bit

Configuring frontend-0.1.0.0...
Warning: Instead of 'ghc-options: -lHSrts_thr -lCffi -lm -llog' use
'extra-libraries: HSrts_thr Cffi m log'
Dependency base >=4.9 && <4.13: using base-4.12.0.0
Dependency common -any: using common-0.1.0.0
Dependency reflex-dom -any: using reflex-dom-0.5.2
clang: warning: -Wl,--fix-cortex-a8: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Source component graph: component exe:libfrontend.so
Configured component graph:
    component frontend-0.1.0.0-FuYDX8sIKXy3NOplbZDSEs-libfrontend.so
        include base-4.12.0.0
        include common-0.1.0.0-5qSU35647Tk5IaERDUAwQe
        include reflex-dom-0.5.2-Gl2UEGiKnxcBYxGHU1rJAh
Linked component graph:
    unit frontend-0.1.0.0-FuYDX8sIKXy3NOplbZDSEs-libfrontend.so
        include base-4.12.0.0
        include common-0.1.0.0-5qSU35647Tk5IaERDUAwQe
        include reflex-dom-0.5.2-Gl2UEGiKnxcBYxGHU1rJAh
Ready component graph:
    definite frontend-0.1.0.0-FuYDX8sIKXy3NOplbZDSEs-libfrontend.so
        depends base-4.12.0.0
        depends common-0.1.0.0-5qSU35647Tk5IaERDUAwQe
        depends reflex-dom-0.5.2-Gl2UEGiKnxcBYxGHU1rJAh
Using Cabal-2.4.0.1 compiled by ghc-8.6
Using compiler: ghc-8.6.5
Using install prefix:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi
Executables installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/bin
Libraries installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/lib/ghc-8.6.5/arm-android-ghc-8.6.5/frontend-0.1.0.0
Dynamic Libraries installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/lib/ghc-8.6.5/arm-android-ghc-8.6.5
Private executables installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/libexec/arm-android-ghc-8.6.5/frontend-0.1.0.0
Data files installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/share/arm-android-ghc-8.6.5/frontend-0.1.0.0
Documentation installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/share/doc/arm-android-ghc-8.6.5/frontend-0.1.0.0
Configuration files installed in:
/nix/store/5bip9mj1hv1c79cl5v932ww8c8mk3j2x-frontend-0.1.0.0-armv7a-unknown-linux-androideabi/etc
No alex found
Using ar given by user at:
/nix/store/ksk8yp7hpyxqy1rw9y2wf75346rmf4bx-ndk-gcc-binutils/bin/armv7a-unknown-linux-androideabi-ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 4.2.1 given by user at:
/nix/store/7j524khdq35h6r6dj2lpbkisq6rw1vkc-armv7a-unknown-linux-androideabi-ndk-gcc-binutils-wrapper/bin/armv7a-unknown-linux-androideabi-cc
Using ghc version 8.6.5 given by user at:
/nix/store/8fn33m5h1pa6js9l6zdpriivablr6r3l-armv7a-unknown-linux-androideabi-ghc-8.6.5/bin/armv7a-unknown-linux-androideabi-ghc
Using ghc-pkg version 8.6.5 given by user at:
/nix/store/8fn33m5h1pa6js9l6zdpriivablr6r3l-armv7a-unknown-linux-androideabi-ghc-8.6.5/bin/armv7a-unknown-linux-androideabi-ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.22.0 found on system at:
/nix/store/lk77rv9b2zjz99h6wjqz2lwspbsncw71-ghc-8.6.5/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/lk77rv9b2zjz99h6wjqz2lwspbsncw71-ghc-8.6.5/bin/hpc
Using hsc2hs version 0.68.5 given by user at:
/nix/store/8fn33m5h1pa6js9l6zdpriivablr6r3l-armv7a-unknown-linux-androideabi-ghc-8.6.5/bin/armv7a-unknown-linux-androideabi-hsc2hs
No hscolour found
No jhc found
Using ld given by user at:
/nix/store/7j524khdq35h6r6dj2lpbkisq6rw1vkc-armv7a-unknown-linux-androideabi-ndk-gcc-binutils-wrapper/bin/armv7a-unknown-linux-androideabi-ld
No pkg-config found
Using runghc version 8.6.5 found on system at:
/nix/store/lk77rv9b2zjz99h6wjqz2lwspbsncw71-ghc-8.6.5/bin/runghc
Using strip version 2.27 given by user at:
/nix/store/ksk8yp7hpyxqy1rw9y2wf75346rmf4bx-ndk-gcc-binutils/bin/armv7a-unknown-linux-androideabi-strip
Using tar found on system at:
/nix/store/wmxqm38g1y1y7sd7s9vg7an3klffaiyz-gnutar-1.31/bin/tar
No uhc found
building
!!! has splices: yes
!!! splices at: /nix/store/pqbf23anajh8nhllmmwhfyc8is9jsq09-frontend-0.1.0.0/lib/ghc-8.6.5/frontend-0.1.0.0 !!!
Preprocessing executable 'libfrontend.so' for frontend-0.1.0.0..
Building executable 'libfrontend.so' for frontend-0.1.0.0..
[1 of 1] Compiling Main             ( src/Main.hs, dist/build/libfrontend.so/libfrontend.so-tmp/Main.o )
Linking src/Main ...
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
    Call hs_init_ghc() from your main() function to set these options.
/nix/store/ksk8yp7hpyxqy1rw9y2wf75346rmf4bx-ndk-gcc-binutils/bin/armv7a-unknown-linux-androideabi-ld.gold: error: cannot find -lCffi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`armv7a-unknown-linux-androideabi-cc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/9wvrmm92rszihp0v8cf2nmbrfky2ppik-frontend-0.1.0.0-armv7a-unknown-linux-androideabi.drv' failed with exit code 1
cannot build derivation '/nix/store/3zpa3dpzks9ax9nannm4ah4j11mx5sm4-android-app.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/vy23d1iw8ajn4nmblc69shd7j7sxbl32-org.example.frontend.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/nhxsvry0mb1dvp99zlq25gmmj23cfza1-android-app.drv': 1 dependencies couldn't be built
error: build of '/nix/store/nhxsvry0mb1dvp99zlq25gmmj23cfza1-android-app.drv' failed

64-bit

Linking src/Main ...
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
    Call hs_init_ghc() from your main() function to set these options.
/nix/store/gamfw1l9sj2dp45jk04f1f8x906rvfpp-ndk-gcc-binutils/bin/aarch64-unknown-linux-android-ld: cannot find -lCffi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`aarch64-unknown-linux-android-cc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/mip4p7nmz9glvc10zz7lijg1i0wrv42r-frontend-0.1.0.0-aarch64-unknown-linux-android.drv' failed with exit code 1

This seems relevant:

Warning: Instead of 'ghc-options: -lHSrts_thr -lCffi -lm -llog' use
'extra-libraries: HSrts_thr Cffi m log'
...
ld: cannot find -lCffi

@ali-abrar
Copy link
Member Author

Android builds are now working using ghc's vendored libffi.

@matthewbauer
Copy link
Member

I've updated the jsaddle-wkwebview stuff to work with macOS correctly. Basic stuff in reflex-todomvc works.

@ali-abrar
Copy link
Member Author

The only thing blocking this now is ghcjs/ghcjs#757

default.nix Outdated Show resolved Hide resolved
@Ericson2314
Copy link
Member

@ali-abrar FWIW the a thing is a test for dumping and loading splices.

@ali-abrar
Copy link
Member Author

FWIW the a thing is a test for dumping and loading splices

We also build reflex-todomvc as part of release.nix, which should cause plenty of splice dumping and loading.

…tform into ghc865-nixpkgs1903

* 'ghc865-nixpkgs1903' of github.com:reflex-frp/reflex-platform:
  Remove unneeded `packageOverrides` of `webkitgtk`
  Update CONTRIBUTING.md
  Update CONTRIBUTING.md
  Update skeleton.nix to use thunk src
@matthewbauer
Copy link
Member

It looks like the precision issue is fixed by @luite in ghcjs/ghcjs@c3922ed!

@ali-abrar
Copy link
Member Author

That's right. We discovered another issue but it's not a regression in this version of ghcjs so we're not going to hold up the release for it: ghcjs/ghcjs-base#126

Now we're just waiting on CI and cache population.

@ali-abrar ali-abrar changed the title WIP: Update to GHC 8.6.5 and nixpkgs 19.03 Update to GHC 8.6.5 and nixpkgs 19.03 Aug 23, 2019
@ali-abrar ali-abrar merged commit 184d488 into develop Aug 23, 2019
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.

5 participants