[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Demexp-dev] Compilation of demexp
From: |
David MENTRE |
Subject: |
Re: [Demexp-dev] Compilation of demexp |
Date: |
Mon, 16 Jan 2006 20:44:45 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Hello Sylvain,
Sylvain Chevillard <address@hidden> writes:
> Now, it is Demexp itself which refuses to compile. Everything gets fine
> until it tries to link the object code. It seems to be related with
> Cduce again.
[...]
> ld: Undefined symbols:
> _camlAst
> _camlAtoms
> _camlAuto_pat
[...]
> Error during linking
> make: *** [srv/demexp-server] Error 2
> rm srv/xml.cdo
>
> I'm using the official distribution of Ocaml 3.09.1 downloaded from
> Ocaml's site and compiled from sources over a Powerbook (powerpc G4)
> under Mac OS X 10.3.9, Cduce 0.4.0 downloaded from
> http://www.cduce.org/download/cduce-0.4.0.tar.gz and demexp 0.7
> downloaded from http://www.linux-france.org/~dmentre/demexp/latest-src
Well, you should start with stable 0.6.x release. 0.7 is rather a moving
target.
> Any idea ?
Not many. :(
1. Simple things first: have you compiled CDuce with --mliface option?
2. Could you try with a simple program, to check CDuce is working?
Ref:
http://article.gmane.org/gmane.politics.organizations.demexp.devel/706
Try following program (it was for version 0.91 of cduce, option --mlstub
might have changed for 0.4):
* Setup of files to compile:
address@hidden:~/00-poubelle$ mkdir test-cduce
address@hidden:~/00-poubelle$ cd test-cduce/
address@hidden:~/00-poubelle/test-cduce$ cat > cdnum.mli
(* File cdnum.mli: *)
val fact: Big_int.big_int -> Big_int.big_int
address@hidden:~/00-poubelle/test-cduce$ cat > cdnum.cd
(* File cdnum.cd: *)
let aux ((Int,Int) -> Int)
| (x, 0 | 1) -> x
| (x, n) -> aux (x * n, n - 1)
let fact (x : Int) : Int = aux (Big_int.unit_big_int, x)
(* Could write 1 instead of Big_int.unit_big_int. Just for fun. *)
* It works:
address@hidden:~/00-poubelle/test-cduce$ ocamlc -c cdnum.mli
address@hidden:~/00-poubelle/test-cduce$ cduce --compile cdnum.cd
address@hidden:~/00-poubelle/test-cduce$ ocamlc -c -I
/usr/local/lib/ocaml/site-lib/cduce -pp "cduce --mlstub" -impl cdnum.cdo
3. If this works, then the issue is definitely on the demexp side. But
right now, I'm stuck. :( Maybe you could put somewhere the complete
log of a compilation (from ./configure to make error). That might
gives some ideas...
4. Ah! One idea: try to compile only the bytecode version of the
server with following command. It might help to see of this issue is
related to MacOS X specific linking:
make srv/demexp-server.bc
Best wishes,
d.
--
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <address@hidden>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A