Loading ...
Sorry, an error occurred while loading the content.

Compilation of ocaml to cross-compile for android target

Expand Messages
  • Bernie Discale
    Hello Is it possible to compile ocaml to cross-compile (my host is a x86_64, my target is an arm) ? I ve tried miscellaneous patches on two versions of ocaml
    Message 1 of 9 , Feb 27, 2013
    • 0 Attachment
      Hello

      Is it possible to compile ocaml to cross-compile (my host is a x86_64, my target is an arm) ?

      I've tried miscellaneous patches on two versions of ocaml (3.12 and 4.0.1), with mitigated success.

      Is there a paper detailing the compilation process of ocaml, or anything that would help to hack correctly the build chain ?
      I've transposed on the 4.00.1 a patch that was made for the cross-compilation on the 3.12.x version, and applied a patch coming from the mantis bug tracker of ocaml, to correct the sys/context lack on the arm compiler, without succeeding to complete the make.

      My misunderstanding of the build chain does not allow me to do better st the moment. Before going deeper in the analysis of the build configuration files, I will be pleased to have some advices.

      If no this list is not the right place for this topic I apologize and would be grateful if anyone point me to the right one.


      Any help would be very appreciated

      Thank you
      Best regards



      --
      Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.

      [Non-text portions of this message have been removed]
    • Sebastien Mondet
      I haven t tried yet, but did you know about this project: https://github.com/vouillon/ocaml-android ? ... [Non-text portions of this message have been removed]
      Message 2 of 9 , Feb 27, 2013
      • 0 Attachment
        I haven't tried yet, but did you know about this project:
        https://github.com/vouillon/ocaml-android ?





        On Wed, Feb 27, 2013 at 4:40 PM, Bernie Discale <bernie.discale@...>wrote:

        > Hello
        >
        > Is it possible to compile ocaml to cross-compile (my host is a x86_64, my
        > target is an arm) ?
        >
        > I've tried miscellaneous patches on two versions of ocaml (3.12 and
        > 4.0.1), with mitigated success.
        >
        > Is there a paper detailing the compilation process of ocaml, or anything
        > that would help to hack correctly the build chain ?
        > I've transposed on the 4.00.1 a patch that was made for the
        > cross-compilation on the 3.12.x version, and applied a patch coming from
        > the mantis bug tracker of ocaml, to correct the sys/context lack on the arm
        > compiler, without succeeding to complete the make.
        >
        > My misunderstanding of the build chain does not allow me to do better st
        > the moment. Before going deeper in the analysis of the build configuration
        > files, I will be pleased to have some advices.
        >
        > If no this list is not the right place for this topic I apologize and
        > would be grateful if anyone point me to the right one.
        >
        >
        > Any help would be very appreciated
        >
        > Thank you
        > Best regards
        >
        >
        >
        > --
        > Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > ------------------------------------
        >
        > Archives up to December 31, 2011 are also downloadable at
        > http://www.connettivo.net/cntprojects/ocaml_beginners
        > The archives of the very official ocaml list (the seniors' one) can be
        > found at http://caml.inria.fr
        > Attachments are banned and you're asked to be polite, avoid flames
        > etc.Yahoo! Groups Links
        >
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Hendrik Boom
        ... my target is an arm) ? ... 4.0.1), with mitigated success. ... anything that would help to hack correctly the build chain ? ... compilation on the 3.12.x
        Message 3 of 9 , Feb 27, 2013
        • 0 Attachment
          On Wed, 27 Feb 2013 22:40:00 +0100, Bernie Discale wrote:

          > Hello
          >
          > Is it possible to compile ocaml to cross-compile (my host is a x86_64,
          my target is an arm) ?
          >
          > I've tried miscellaneous patches on two versions of ocaml (3.12 and
          4.0.1), with mitigated success.
          >
          > Is there a paper detailing the compilation process of ocaml, or
          anything that would help to hack correctly the build chain ?
          > I've transposed on the 4.00.1 a patch that was made for the cross-
          compilation on the 3.12.x version, and applied a patch coming from the
          mantis bug tracker of ocaml, to correct the sys/context lack on the arm
          compiler, without succeeding to complete the make.
          >
          > My misunderstanding of the build chain does not allow me to do better
          st the moment. Before going deeper in the analysis of the build
          configuration files, I will be pleased to have some advices.
          >
          > If no this list is not the right place for this topic I apologize and
          would be grateful if anyone point me to the right one.
          >
          >
          > Any help would be very appreciated
          >
          > Thank you
          > Best regards

          Check the archives of the Gambit-C mailing list. Gambit is a Scheme
          implementation that compiles to C. Its REPL app is available on
          Android. You could ask there. THe author might well have some clues
          about how he did it.

          -- hendrik
        • Bernie Discale
          Hello Hendrick Thank you for your answer, which I don t understand completely (what does Scheme has to do with my problem). Anyway I trust you, and will ask my
          Message 4 of 9 , Feb 28, 2013
          • 0 Attachment
            Hello Hendrick

            Thank you for your answer, which I don't understand completely (what does Scheme has to do with my problem). Anyway I trust you, and will ask my question to this forum (I guess that the Gambit-C is made in ocaml and they managed to compile it to run on android)..

            My questions about compilation process is still open, any further information will be appreciated.

            Best regards


            Hendrik Boom <hendrik@...> a écrit :

            >On Wed, 27 Feb 2013 22:40:00 +0100, Bernie Discale wrote:
            >
            >> Hello
            >>
            >> Is it possible to compile ocaml to cross-compile (my host is a
            >x86_64,
            >my target is an arm) ?
            >>
            >> I've tried miscellaneous patches on two versions of ocaml (3.12 and
            >4.0.1), with mitigated success.
            >>
            >> Is there a paper detailing the compilation process of ocaml, or
            >anything that would help to hack correctly the build chain ?
            >> I've transposed on the 4.00.1 a patch that was made for the cross-
            >compilation on the 3.12.x version, and applied a patch coming from the
            >mantis bug tracker of ocaml, to correct the sys/context lack on the arm
            >
            >compiler, without succeeding to complete the make.
            >>
            >> My misunderstanding of the build chain does not allow me to do better
            >
            >st the moment. Before going deeper in the analysis of the build
            >configuration files, I will be pleased to have some advices.
            >>
            >> If no this list is not the right place for this topic I apologize and
            >
            >would be grateful if anyone point me to the right one.
            >>
            >>
            >> Any help would be very appreciated
            >>
            >> Thank you
            >> Best regards
            >
            >Check the archives of the Gambit-C mailing list. Gambit is a Scheme
            >implementation that compiles to C. Its REPL app is available on
            >Android. You could ask there. THe author might well have some clues
            >about how he did it.
            >
            >-- hendrik


            [Non-text portions of this message have been removed]
          • Hendrik Boom
            ... Nothing, directly, except being a functinal language. ... Gambit-C is written in gambit-C. It has an interpreter. It has a compiler that compiles Scheme
            Message 5 of 9 , Feb 28, 2013
            • 0 Attachment
              On Thu, Feb 28, 2013 at 12:36:06PM +0100, Bernie Discale wrote:
              > Hello Hendrick
              >
              > Thank you for your answer, which I don't understand completely (what
              > does Scheme has to do with my problem).

              Nothing, directly, except being a functinal language.

              > Anyway I trust you, and will ask my question to this forum (I guess
              > that the Gambit-C is made in ocaml and they managed to compile it to
              > run on android)..

              Gambit-C is written in gambit-C. It has an interpreter. It has a
              compiler that compiles Scheme to C. What they'e managed to do is to
              move the ARM-compiled C to Android even though Android natively does
              Java, and it seemed to me that OCaml object code could perhaps be
              transported the same way.

              >
              > My questions about compilation process is still open, any further information will be appreciated.

              But I have found

              https://sites.google.com/site/keigoattic/ocaml-on-android

              and

              https://play.google.com/store/apps/details?id=fr.vernoux.ocaml&hl=en

              seems even to be an android-installable app. I'll have to try it out.

              >
              > Best regards
              >
              >
              > Hendrik Boom <hendrik@...> a écrit :
              >
              > >On Wed, 27 Feb 2013 22:40:00 +0100, Bernie Discale wrote:
              > >
              > >> Hello
              > >>
              > >> Is it possible to compile ocaml to cross-compile (my host is a
              > >x86_64,
              > >my target is an arm) ?
              > >>
              > >> I've tried miscellaneous patches on two versions of ocaml (3.12 and
              > >4.0.1), with mitigated success.

              Or is it you that did one of these two projects, but perhaps do not
              consider it a success?

              -- hendrik
            • Bernie Discale
              Thank you Hendrick, now I understand better The projects you mention are indeed better success than what I ve done so far. The app available for android
              Message 6 of 9 , Feb 28, 2013
              • 0 Attachment
                Thank you Hendrick, now I understand better

                The projects you mention are indeed better success than what I've done so far. The app available for android addresses only caml interpretation, when I do need compilation (either in bytecode or, better, in native).

                Moreover I prefer a caml cross-compiler for android target, rather than a caml compiler hosted on an android platform. If this is too complicated, I will try to compile it on an android platform, but first I hope I can get it to cross-compile.

                Best regards




                [Non-text portions of this message have been removed]
              • Hendrik Boom
                ... But isn t that what my first link, https://sites.google.com/site/keigoattic/ocaml-on-android, provides? Or have I missed something? I admit, haven t tried
                Message 7 of 9 , Feb 28, 2013
                • 0 Attachment
                  On Thu, Feb 28, 2013 at 02:18:33PM +0100, Bernie Discale wrote:
                  > Thank you Hendrick, now I understand better
                  >
                  > The projects you mention are indeed better success than what I've done so far. The app available for android addresses only caml interpretation, when I do need compilation (either in bytecode or, better, in native).
                  >
                  > Moreover I prefer a caml cross-compiler for android target, rather than a caml compiler hosted on an android platform. If this is too complicated, I will try to compile it on an android platform, but first I hope I can get it to cross-compile.

                  But isn't that what my first link,
                  https://sites.google.com/site/keigoattic/ocaml-on-android, provides?
                  Or have I missed something? I admit, haven't tried it, not having set
                  up the Android Development Kit yet. But that page does make it seem to
                  be a cross-compiler.

                  -- hendrik
                • Bernie Discale
                  Damn you are right! I missed the last paragraph about the native code compiler, and as soon as I saw the above example, I deduced it was only to build on
                  Message 8 of 9 , Mar 1, 2013
                  • 0 Attachment
                    Damn you are right!

                    I missed the last paragraph about the native code compiler, and as soon as I saw the above example, I deduced it was only to build on android!

                    I will try this this evening, it seems that the hole process of bootstrapping is handled manually, but that's correct.

                    Thank you


                    Hendrik Boom <hendrik@...> a écrit :

                    >On Thu, Feb 28, 2013 at 02:18:33PM +0100, Bernie Discale wrote:
                    >> Thank you Hendrick, now I understand better
                    >>
                    >> The projects you mention are indeed better success than what I've
                    >done so far. The app available for android addresses only caml
                    >interpretation, when I do need compilation (either in bytecode or,
                    >better, in native).
                    >>
                    >> Moreover I prefer a caml cross-compiler for android target, rather
                    >than a caml compiler hosted on an android platform. If this is too
                    >complicated, I will try to compile it on an android platform, but first
                    >I hope I can get it to cross-compile.
                    >
                    >But isn't that what my first link,
                    >https://sites.google.com/site/keigoattic/ocaml-on-android, provides?
                    >Or have I missed something? I admit, haven't tried it, not having set
                    >up the Android Development Kit yet. But that page does make it seem to
                    >
                    >be a cross-compiler.
                    >
                    >-- hendrik

                    --
                    Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.

                    [Non-text portions of this message have been removed]
                  • Bernie Discale
                    Ok I made it following the page of keigoi Now the next step : compiling unison for android Thank you Hendricks for your precious advice [Non-text portions of
                    Message 9 of 9 , Mar 2, 2013
                    • 0 Attachment
                      Ok I made it following the page of keigoi
                      Now the next step : compiling unison for android

                      Thank you Hendricks for your precious advice

                      [Non-text portions of this message have been removed]
                    Your message has been successfully submitted and would be delivered to recipients shortly.