ocaml-cross / opam-cross-ios

An OCaml cross-toolchain for iOS and several useful libraries
63 stars 15 forks source link

Up it to 4.03.0 #1

Closed fxfactorial closed 7 years ago

fxfactorial commented 8 years ago

Could you up to this 4.03.0?

whitequark commented 8 years ago

The 4.03 port is not available upstream yet: http://psellos.com/ocaml/compile-to-iphone.html.

fxfactorial commented 8 years ago

Ah, I didn't realize you were using Jeff's stuff as well.

jordwalke commented 7 years ago

I would definitely love to see this happen as well (or perhaps targeting 4.04). This seems like the best place to voice that (as there doesn't seem to be any other project on GitHub)

whitequark commented 7 years ago

@jordwalke In general, outside of merging new OPAM files and fixing packaging bugs, I only provide commercial support for the opam-cross-* compilers and packages. You can contact me at whitequark@whitequark.org if that's something you are interested in.

jordwalke commented 7 years ago

Thanks so much for the work you've done so far, and I'll definitely contact you at some point.

whitequark commented 7 years ago

It's at 4.04.0 already (and for a good while).

jordwalke commented 7 years ago

Thank you, @whitequark !

jordwalke commented 7 years ago

Curious, wasn't there an iOS patch for 4.02.3 that never made it upstream? How did you accomplish 4.04 support?

whitequark commented 7 years ago

I rebased the patch on top of 4.04.0.

jordwalke commented 7 years ago

Wow, that's great to hear that it didn't have any conflicts (I suppose ARM support has been relatively stable). Do you recall if there was any hesitation to accept the patch upstream? I ask because multicore support will need to touch ARM generation, and since they haven't began yet it might be better to do it before they start, lest there be conflicts.

whitequark commented 7 years ago

Wow, that's great to hear that it didn't have any conflicts

Of course it did. I spent several days working on that.

jordwalke commented 7 years ago

Congrats, and thanks! Any plans up sending a PR upstream?

@let-def may be willing to help manage that if you need any help (Sorry to volunteer you Fred, but we've discussed this in the past, and you seemed interested at the time).

whitequark commented 7 years ago

https://github.com/ocaml/ocaml/pull/1084

let-def commented 7 years ago

@jordwalke I can help with reviewing, but I won't have access to a macOS machine in the next two weeks.

whitequark commented 7 years ago

You can use a VM, like I do. (I don't own any Apple hardware.)

let-def commented 7 years ago

Clever. Any setup to suggest? Standard installer with qemu/kvm will do?

whitequark commented 7 years ago

www.contrib.andrew.cmu.edu/~somlo/OSXKVM/. For Sierra (I think Yosemite+, actually) you'll need to install Clover in UEFI mode first; Enoch or Chameleon won't do. I have this script I use to start it:

#!/bin/sh -ex

qemu-system-x86_64 \
  -enable-kvm \
  -machine pc-q35-2.4 \
  -cpu Penryn,vendor=GenuineIntel \
  -smp 4,cores=2 \
  -m 4096 \
  -bios /usr/share/qemu/OVMF.fd \
  -usb -device usb-kbd -device usb-tablet \
  -device VGA,vgamem_mb=64 \
  -device isa-applesmc,osk="[REDACTED]" \
  -device ide-drive,bus=ide.0,drive=hdd3 \
  -drive id=hdd3,if=none,file=clover.img \
  -device ide-drive,bus=ide.1,drive=hdd2 \
  -drive id=hdd2,if=none,file=osx.img \
  -device ide-drive,bus=ide.2,drive=hdd1 \
  -drive id=hdd1,if=none,file=/dev/raidho/vm-macos-sierra,format=raw \
  -netdev user,id=net0,hostfwd=tcp::2222-:22,tcp::2223-:22 \
  -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:2a \
  -device intel-hda \
  -device hda-duplex \
  $*
whitequark commented 7 years ago

Note the usb-tablet doesn't work with the installer, you need this driver: http://philjordan.eu/osx-virt/

let-def commented 7 years ago

@whitequark Thanks!

jordwalke commented 7 years ago

Looks pretty complicated. If it's too much trouble, @let-def, I will just loan you a mac 😆

Though it would be really nice to be able to build for every major OS from one OS that is not OS X.

whitequark commented 7 years ago

You can do that with Travis and Appveyor, I think, which is even legal.