ocaml-cross / opam-cross-android

An OCaml cross-toolchain for Android and several useful libraries
105 stars 15 forks source link

tgls-android fails to compile #20

Closed joelreymont closed 8 years ago

joelreymont commented 8 years ago
opam install nanovg-android
The following actions will be performed:
  βˆ—  install tgls-android   dev               [required by nanovg-android]
       tgls-android only includes support for GLES2
  βˆ—  install nanovg-android dev
===== βˆ—  2 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
[nanovg-android] git://github.com/caseybasichis/nanoVG already up-to-date
[tgls-android] git://github.com/whitequark/tgls#stubs-0.4 already up-to-date

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
[ERROR] The compilation of tgls-android failed at "ocamlbuild -use-ocamlfind
        support/bindgen.byte".
Processing  1/2: [tgls-android: ocamlfind android]
#=== ERROR while installing tgls-android.dev ==================================#
# opam-version 1.2.2
# os           darwin
# command      ocamlbuild -use-ocamlfind support/bindgen.byte
# path         /Users/joelr/.opam/4.02.3+32bit/build/tgls-android.dev
# compiler     4.02.3+32bit
# exit-code    10
# env-file     /Users/joelr/.opam/4.02.3+32bit/build/tgls-android.dev/tgls-android-59258-d2d111.env
# stdout-file  /Users/joelr/.opam/4.02.3+32bit/build/tgls-android.dev/tgls-android-59258-d2d111.out
# stderr-file  /Users/joelr/.opam/4.02.3+32bit/build/tgls-android.dev/tgls-android-59258-d2d111.err
### stdout ###
# [...]
# Error: This expression has type
#          (bitfield ->
#           (int ->
#            (unit Ctypes_static.ptr ->
#             (bitfield -> unit Foreign.return Foreign.fn) Foreign.fn)
#            Foreign.fn)
#           Foreign.fn)
#          Foreign.result
#        This is not a function; it cannot be applied.
# Command exited with code 2.
whitequark commented 8 years ago

Yes. tgls is expected to be broken right now. I should probably remove it.

joelreymont commented 8 years ago

Is there a way to fix it? Should I attempt it?

whitequark commented 8 years ago

Yes. With the freshly updated ctypes it should be possible to build unmodified tgls.

joelreymont commented 8 years ago

Anyway, feel free to remove this issue. I'll log one against tgls for correctness.

joelreymont commented 8 years ago

I'll try to submit a PR against the other ticket.

whitequark commented 8 years ago

I'll log one against tgls for correctness.

This is not a problem with tgls. Right now opam-cross-android is trying to build a hacky fork of tgls that I wrote (and it was not an approach that worked).

dbuenzli commented 8 years ago

I guess I may still need to fix the build system on 32-bit platforms. Now that topkg's overhaul has been done, I'll fix that.