Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] OCaml and Leopard

9 views
Skip to first unread message

Joel Reymont

unread,
Nov 2, 2007, 3:25:02 PM11/2/07
to caml-list List
I'm having trouble compiling OCaml from CVS on Mac OSX Leopard.

Any suggestions on how to troubleshoot this?

Thanks, Joel

---

+ cd asmrun
+ make all meta.o dynlink.o
..
gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_i386 -
DSYS_macosx -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -c -o
signals_asm.o signals_asm.c
signals_asm.c: In function ‘segv_handler’:
signals_asm.c:193: error: dereferencing pointer to incomplete type
signals_asm.c:193: error: dereferencing pointer to incomplete type
signals_asm.c: In function ‘caml_init_signals’:
signals_asm.c:241: error: storage size of ‘stk’ isn’t known
signals_asm.c:241: warning: unused variable ‘stk’
make: *** [signals_asm.o] Error 1

and then

cp -p driver/optmain.byte ocamlopt
boot/ocamlrun ./ocamlopt -nostdlib -a -I stdlib stdlib/pervasives.cmi
stdlib/arg.cmi stdlib/array.cmi stdlib/arrayLabels.cmi stdlib/
buffer.cmi stdlib/callback.cmi stdlib/obj.cmi stdlib/
camlinternalMod.cmi stdlib/camlinternalOO.cmi stdlib/char.cmi stdlib/
complex.cmi stdlib/digest.cmi stdlib/filename.cmi stdlib/format.cmi
stdlib/gc.cmi stdlib/stream.cmi stdlib/genlex.cmi stdlib/hashtbl.cmi
stdlib/int32.cmi stdlib/int64.cmi stdlib/lazy.cmi stdlib/lexing.cmi
stdlib/list.cmi stdlib/listLabels.cmi stdlib/map.cmi stdlib/
marshal.cmi stdlib/set.cmi stdlib/moreLabels.cmi stdlib/nativeint.cmi
stdlib/oo.cmi stdlib/parsing.cmi stdlib/printexc.cmi stdlib/printf.cmi
stdlib/queue.cmi stdlib/random.cmi stdlib/scanf.cmi stdlib/sort.cmi
stdlib/stack.cmi stdlib/stdLabels.cmi stdlib/string.cmi stdlib/
stringLabels.cmi stdlib/sys.cmi stdlib/weak.cmi -o stdlib/stdlib.cmxa
/ocamlopt: don't know what to do with stdlib/pervasives.cmi.
Usage: ocamlopt <options> <files>
Options are:
..
Exit code 2 while executing this command:...

--
http://wagerlabs.com

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Nathaniel Gray

unread,
Nov 2, 2007, 6:21:45 PM11/2/07
to Joel Reymont, caml-list List
On Nov 2, 2007 12:24 PM, Joel Reymont <joe...@gmail.com> wrote:
> I'm having trouble compiling OCaml from CVS on Mac OSX Leopard.
>
> Any suggestions on how to troubleshoot this?

I got the same problem building 3.10 on godi.


> ---
>
> + cd asmrun
> + make all meta.o dynlink.o

> ...


> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_i386 -
> DSYS_macosx -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -c -o
> signals_asm.o signals_asm.c
> signals_asm.c: In function 'segv_handler':
> signals_asm.c:193: error: dereferencing pointer to incomplete type
> signals_asm.c:193: error: dereferencing pointer to incomplete type
> signals_asm.c: In function 'caml_init_signals':
> signals_asm.c:241: error: storage size of 'stk' isn't known
> signals_asm.c:241: warning: unused variable 'stk'
> make: *** [signals_asm.o] Error 1

This makes me think maybe there's a system header file that's moved,
though I haven't looked in any detail yet.

Cheers,
-n8

--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->

Ralph Douglass

unread,
Nov 3, 2007, 9:34:43 AM11/3/07
to Nathaniel Gray, caml-list List
sudo su -
cd ~/<you>/Downloads/godi-bootstrap-20061228
/bootstrap --prefix /opt/local/godi
export PATH=/opt/local/godi/bin:/opt/local/godi/sbin:$PATH
export MACOSX_DEPLOYMENT_TARGET=10.4
/boostrap_stage2

Enjoy.

--
Ralph

Ralph Douglass

unread,
Nov 3, 2007, 9:36:06 AM11/3/07
to Caml List
Oh right, edit your /opt/local/godi/etc/godi.conf for 3.10 between bootstrap
and bootstrap_stage2.

On 11/3/07, Ralph Douglass <ra...@grayskies.net> wrote:
>
> sudo su -
> cd ~/<you>/Downloads/godi-bootstrap-20061228

> ./bootstrap --prefix /opt/local/godi


> export PATH=/opt/local/godi/bin:/opt/local/godi/sbin:$PATH
> export MACOSX_DEPLOYMENT_TARGET=10.4

> ./boostrap_stage2


--
Ralph

Nathaniel Gray

unread,
Nov 3, 2007, 8:25:38 PM11/3/07
to Ralph Douglass, Caml List
I think that did the trick. Thanks!

-n8

Gordon Henriksen

unread,
Nov 3, 2007, 9:57:24 PM11/3/07
to caml...@inria.fr
On Nov 2, 2007, at 15:24, Joel Reymont wrote:

> I'm having trouble compiling OCaml from CVS on Mac OSX Leopard.
>

> + cd asmrun
> + make all meta.o dynlink.o

> ...


> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_i386 -
> DSYS_macosx -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -c -o
> signals_asm.o signals_asm.c
> signals_asm.c: In function ‘segv_handler’:
> signals_asm.c:193: error: dereferencing pointer to incomplete type
> signals_asm.c:193: error: dereferencing pointer to incomplete type
> signals_asm.c: In function ‘caml_init_signals’:
> signals_asm.c:241: error: storage size of ‘stk’ isn’t known
> signals_asm.c:241: warning: unused variable ‘stk’
> make: *** [signals_asm.o] Error 1

Compiling prior releases, I advise using setenv
MACOSX_DEPLOYMENT_TARGET 10.4.

For top-of-tree, see http://caml.inria.fr/mantis/view.php?id=4439

I'd appreciate if someone could test the change on x64.

— Gordon

Henry Hollenberg

unread,
Nov 16, 2007, 9:43:39 PM11/16/07
to
On Nov 3, 7:57 pm, Gordon Henriksen <gordonhenrik...@mac.com> wrote:
> On Nov 2, 2007, at 15:24, Joel Reymont wrote:
>
> > I'm having trouble compiling OCaml from CVS on Mac OSX Leopard.
>
> > + cd asmrun
> > + make all meta.o dynlink.o
> > ...
> > gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_i386 -
> > DSYS_macosx -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -c -o
> > signals_asm.o signals_asm.c
> > signals_asm.c: In function 'segv_handler':
> > signals_asm.c:193: error: dereferencing pointer to incomplete type
> > signals_asm.c:193: error: dereferencing pointer to incomplete type
> > signals_asm.c: In function 'caml_init_signals':
> > signals_asm.c:241: error: storage size of 'stk' isn't known
> > signals_asm.c:241: warning: unused variable 'stk'
> > make: *** [signals_asm.o] Error 1
>
> Compiling prior releases, I advise using setenv
> MACOSX_DEPLOYMENT_TARGET 10.4.
>
> For top-of-tree, seehttp://caml.inria.fr/mantis/view.php?id=4439

>
> I'd appreciate if someone could test the change on x64.
>
> -- Gordon

>
> _______________________________________________
> Caml-list mailing list. Subscription management:http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives:http://caml.inria.fr
> Beginner's list:http://groups.yahoo.com/group/ocaml_beginners
> Bug reports:http://caml.inria.fr/bin/caml-bugs

I'm having trouble following what you guys are doing. I am trying to
compile ocaml-3.10.0 on
mac OS X leopard 10.5.1. Do I need to edit a config file in the ocaml
sources? What does godi
have to do with compiling ocaml? I didn't have to use godi with OS X
10.4.

My target is to compile a unison executable and apparently it depends
on ocaml as it's compiler.

Thanks, Henry Hollenberg

Gordon Henriksen

unread,
Nov 18, 2007, 9:29:36 PM11/18/07
to caml...@inria.fr
On Nov 18, 2007, at 06:58, Valentyn Kamyshenko wrote:

> looks like I've got yet another compilation problem on Leopard:
>
> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_power -
> DSYS_rhapsody -O -Wall -DDARWIN_VERSION_6 -D_FILE_OFFSET_BITS=64 -
> D_REENTRANT -c signals.c
> In file included from signals.c:31:
> signals_osdep.h: In function 'context_gpr_p':
> signals_osdep.h:137: error: dereferencing pointer to incomplete type
> signals_osdep.h:141: error: dereferencing pointer to incomplete type
> *** Error code 1
>
> Happens even when I try to compile 3.09 version of OCaml (on PPC,
> Mac OS X v.10.5.1).
> Setting MACOSX_DEPLOYMENT_TARGET to 10.4 helps.


This is exactly the right fix for older releases. There is work
proceeding on top-of-tree so that subsequent releases will compile for
Leopard (rather than just on it).

Valentyn Kamyshenko

unread,
Nov 18, 2007, 10:42:08 PM11/18/07
to caml...@inria.fr
looks like I've got yet another compilation problem on Leopard:

gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_power -
DSYS_rhapsody -O -Wall -DDARWIN_VERSION_6 -D_FILE_OFFSET_BITS=64 -
D_REENTRANT -c signals.c
In file included from signals.c:31:
signals_osdep.h: In function 'context_gpr_p':
signals_osdep.h:137: error: dereferencing pointer to incomplete type
signals_osdep.h:141: error: dereferencing pointer to incomplete type
*** Error code 1

Happens even when I try to compile 3.09 version of OCaml (on PPC, Mac
OS X v.10.5.1).
Setting MACOSX_DEPLOYMENT_TARGET to 10.4 helps.

Regards,

Valentyn.

Bünzli Daniel

unread,
Nov 19, 2007, 8:43:14 PM11/19/07
to Gordon Henriksen, caml...@inria.fr

Le 18 nov. 07 à 16:27, Gordon Henriksen a écrit :

> This is exactly the right fix for older releases. There is work
> proceeding on top-of-tree so that subsequent releases will compile
> for Leopard (rather than just on it).

Dear Gordon,

Do you happen to know if it is expected that executables produced for
ppc in 10.5 by compiling the compilers with MACOSX_DEPLOYMENT_TARGET
set to 10.4 do segfault on a 10.4 ppc ? Or did I do something wrong ?

Thanks,

Daniel

Gordon Henriksen

unread,
Nov 19, 2007, 9:04:36 PM11/19/07
to caml...@yquem.inria.fr
On 2007-11-19, at 20:42, Bünzli Daniel wrote:

> Le 18 nov. 07 à 16:27, Gordon Henriksen a écrit :
>
>> This is exactly the right fix for older releases. There is work
>> proceeding on top-of-tree so that subsequent releases will compile
>> for Leopard (rather than just on it).
>

> Do you happen to know if it is expected that executables produced
> for ppc in 10.5 by compiling the compilers with
> MACOSX_DEPLOYMENT_TARGET set to 10.4 do segfault on a 10.4 ppc ? Or
> did I do something wrong ?

Sorry, I can't say. Especially not knowing whether you're building
3.10, CVS, or some other tree.

I will remark that such cross-compiles do not seem to be well-tested,
although patches or even just analysis of your problem would likely be
welcomed at http://caml.inria.fr/mantis/.

— Gordon

0 new messages