GaloisInc / HaLVM

The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen
BSD 3-Clause "New" or "Revised" License
1.05k stars 88 forks source link

Port HaLVM to GHC 8.0.1 #92

Closed izgzhen closed 7 years ago

izgzhen commented 7 years ago

First, before I am ready, I need to:

I have already tested it on my Fedora 24 machine as documented in https://github.com/GaloisInc/HaLVM/issues/82.

Second, I do want to merge this into master branch as the release v2.3.0, since it is intended to be an incremental change. We can build more radical HaLVMv3 ideas on top of this later.

acw commented 7 years ago

Just to be clear, I'm waiting on the other TODOs to be done, yes?

Also, have you verified that Template Haskell still works with your changes?

izgzhen commented 7 years ago

Thanks for being clear ;-)

I will ping you once I am ready. But I think we need to start from minlibc, then halvm-ghc, then HaLVM. So the submodule will make sense.

Also, TH doesn't work. I can't support the dependencies of either ghc-boot-th or template-haskell packages now.

izgzhen commented 7 years ago

I have pushed the changes. Now it is only copyright and git submodule problems (all of which can be solved later though).

izgzhen commented 7 years ago

Done, it is ready for merge now @acw

acw commented 7 years ago

OK, so I'll admit: I'm not a huge stack fan. Kind of the opposite, actually. What would be the effect of reverting that particular commit? Is it fairly isolated, or does stack tie into all the other changes?

izgzhen commented 7 years ago

@acw no, stack is a separate thing. It is easy to drop the PLAT-thing entirely.

izgzhen commented 7 years ago

Okay, now the configure.ac will directly go for the system installed GHC toolchain on PATH.

BTW, the dependency of halvm-ghc and minlibc is still a bit messy now, since merge commit creates different hash. But we can fix it later though.

izgzhen commented 7 years ago

@acw any comments? :)

acw commented 7 years ago

I'm getting an error trying to build:

Unable to checkout '5d0e1570372d152235846ec0a500cc082131f239' in submodule path 'halvm-ghc/rts/minlibc'

Any ideas?

izgzhen commented 7 years ago

halvm-ghc might be in the wrong branch or wrong commit. I am afraid the submodule dependency is not very well sorted now.

izgzhen commented 7 years ago

If you can fix the submodule mismatch issues, then please commit it directly :) It will only get messier if I use a PR to fix it.

acw commented 7 years ago

Yeah, I think I got it. I think I tried to do an update across a force push. I'm trying to build your branch now, to test.

acw commented 7 years ago

New error:

(cd halvm-ghc && ./boot)
Error: libffi-tarballs/LICENSE doesn't exist.
Maybe you haven't done './sync-all get'? at ./boot line 74, <PACKAGES> line 48.
Makefile:36: recipe for target '/home/vagrant/HaLVM/halvm-ghc/libraries/base/ghc.mk' failed
make: *** [/home/vagrant/HaLVM/halvm-ghc/libraries/base/ghc.mk] Error 2
izgzhen commented 7 years ago

Yep ... I guess it is because at first we don't have a right branch, so libffi submodule specified in halvm-ghc is not recursively pulled in; then when we fixed the branch, the libffi is still not here.

I am not with my HaLVM dev machine now, sorry for not being able to offer more help.

izgzhen commented 7 years ago

off-topic: In fact, I am currently having a short trip to Shanghai and will be giving a talk on HaLVM and related tomorrow :)

izgzhen commented 7 years ago

https://github.com/GaloisInc/halvm-ghc/pull/6 plus new update should fix the problem

acw commented 7 years ago

Hey Zhen -

I'm going to merge this, because it's awesome. There's a couple things we need to work on before we announce it, though:

  1. Need to turn split-objs back on. It has a really dramatic effect on binary sizes, which is important to HaLVMs.
  2. We should make sure that turning off optimizations in stage 2 doesn't have any effect.
  3. We need to get RPM and Debian builds working again (make packages).

Otherwise, this is great work!