Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Cross-compile ocaml for ARM
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-25 (12:29)
From: Guillaume Valadon <guillaume@v...>
Subject: Re: [Caml-list] Cross-compile ocaml for ARM

> This message is a bit strange: 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/, and asmcomp/arm/
according to the thread starting with

$ 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
[ ... ]
../../ -warn-error A -I ../../otherlibs/dynlink -c -impl
../../ line 5:
/opt/Qtopia/tmp/ocaml-3.06/camlp4/odyl/../../ocamlopt.opt: cannot
execute binary file
../../ 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 replace ocamlc.opt by $topdir/ocamlrun ocamlc
- edit 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.

ICQ uin : 1752110

Page ouebe :

     "Une gonzesse de perdue, c'est dix copains qui reviennent." - Renaud
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: