English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] CamlLight installation on MacOS X : the answer (english version)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-12 (20:30)
From: Laurent_Chéno <laurent.cheno@n...>
Subject: [Caml-list] CamlLight installation on MacOS X : the answer (english version)
(Thanks to Philippe Esperet for this translation ... my english is very 

Thanks to Sébastien Carlier for his help during the installation
of CamlLight on MacOS X. You will find below a short how-to summing up
the steps involved.

1. Edit and modify the Makefile according to:

### Configuration section

# Which C compiler to use.
# Performance is often improved if you use gcc 2.x instead of cc.

# Additional options to $(CC).
# If you are using gcc, add -fno-defer-pop.
# This option circumvents a gcc bug on some platforms (680x0, 80386).
OPTS=-fno-defer-pop -traditional-cpp

# Extra libraries that have to be linked with the runtime system.
# The math library "-lm" is linked by default.
# On most machines, nothing else is needed.
# Under Solaris: -lsocket -lnsl

# How to call the C preprocessor on a file that does not have the .c
# That's /lib/cpp on most machines, sometimes /usr/bin/cpp,
# and /usr/ccs/lib/cpp under Solaris.
# The -P option suppresses the generation of "# linenum" directives,
# which are not understood by Caml Light.
# The -Dunix option ensures that the symbol "unix" is defined --
# not all Unix C preprocessors define it.
# If your cpp is too fussy, make tools/clprepro and use this:
# CPP=../../src/tools/clprepro -Dunix
# CPP=/lib/cpp -P -Dunix
CPP=/usr/bin/cpp -P -Dunix

# The directory where public executables will be installed

# The directory where the Caml Light standard library will be installed

# The manual section where the manual pages will be installed

# The directory where the manual pages will be installed

# Some "make"s need this to ensure that they call the Bourne shell,
# not the C shell. Seems harmless on most other "make"s.
# Try removing this line if you run into trouble.

### End of configuration section

2. For the two files src/runtime/main.c and src/runtime/io.c, insert
as first line

#include <unistd.h>

It ought to work

Some explanations from Sébastien, far beyond my ken

1. The origin of the problem is the preprocessor C, not compatible
with the extensions of GCC used by the interpreter in CamlLight.

2. lseek needs a 64-bits offset in MacOS X when the paramater by
default is a 32-bits int.
hope this helps

Laurent Chéno
Prof. de mathématiques en PSI*
et de l'option informatique en MP/MP*
Lycée Louis-le-Grand, Paris

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr