caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Guillaume Valadon <guillaume@valadon.net>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Cross-compile ocaml for ARM
Date: Wed, 25 Sep 2002 14:29:03 +0200	[thread overview]
Message-ID: <20020925122903.GJ13162@adelscott.lanetcie.com> (raw)
In-Reply-To: <20020923231124U.garrigue@kurims.kyoto-u.ac.jp>

re,

> This message is a bit strange: ocamlcomp.sh is only supposed to call
> ocamlc.opt if you have built it after ocamlc. And logically you
> [ ... ]
> If this is the case, erase ocamlc and start again using "make world"
> and then "make opt", and eventually "make opt.opt" if you need it.

Yes, I did something wrong this week end ...

But now, I did:

$ ./configure -prefix /home/QtPalmtop -no-curses
Then I edited config/Makefile, utils/ccomp.ml, and asmcomp/arm/proc.ml
according to the thread starting with
http://caml.inria.fr/archives/200110/msg00334.html

$ make world
$ make op
[ ... ]
signals.c:545: `segv_handler' undeclared (first use in this function)
signals.c:545: (Each undeclared identifier is reported only once
signals.c:545: for each function it appears in.)
make[1]: *** [signals.o] Error 1
make[1]: Leaving directory `/opt/Qtopia/tmp/ocaml-3.06/asmrun'
make: *** [runtimeopt] Error 2

I did my dirty hack then:
$ make opt

It works fine but it produce x86 binaries instead of arm ...

I the, tried
$ make opt.opt
[ ... ]
../../ocamlcompopt.sh -warn-error A -I ../../otherlibs/dynlink -c -impl
odyl_config.ppo
../../ocamlcompopt.sh: line 5:
/opt/Qtopia/tmp/ocaml-3.06/camlp4/odyl/../../ocamlopt.opt: cannot
execute binary file
../../ocamlcompopt.sh: line 5:
/opt/Qtopia/tmp/ocaml-3.06/camlp4/odyl/../../ocamlopt.opt: Success
make[2]: *** [odyl_config.cmx] Error 1
make[2]: Leaving directory `/opt/Qtopia/tmp/ocaml-3.06/camlp4/odyl'
make[1]: *** [opt.opt] Error 2
make[1]: Leaving directory `/opt/Qtopia/tmp/ocaml-3.06/camlp4'
make: *** [camlp4optopt] Error 2

This week-end I managed to build arm binaries using these steps :
- edit config/Makefile and *.ml
- make coldstart
- edit asmrun/signals.c and enable function at line 486
- edit ocamlcomp.sh replace ocamlc.opt by $topdir/ocamlrun ocamlc
- edit ocamlcompopt.sh replace ocamlopt.opt by $topdir/ocamrun ocamlopt
- make opt.opt
- edit config/Makefile : put arm-linux-gcc in NATIVECC and MKSHAREDLIB
- make coldstart

I only tested ocamlrun, ocaml and pervasives.* on an arm computer but it
works fine.

Guillaume
-- 
mailto:guillaume@valadon.net
ICQ uin : 1752110

Page ouebe : http://guillaume.valadon.net

     "Une gonzesse de perdue, c'est dix copains qui reviennent." - Renaud
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


      reply	other threads:[~2002-09-25 12:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-22 14:31 Guillaume Valadon
2002-09-23  8:48 ` Sven LUTHER
2002-09-23 14:11   ` Jacques Garrigue
2002-09-25 12:29     ` Guillaume Valadon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020925122903.GJ13162@adelscott.lanetcie.com \
    --to=guillaume@valadon.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).