Browse thread
[Caml-list] CamlLight install on MacOS X
- Laurent_Chéno
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Laurent_Chéno <laurent.cheno@n...> |
| Subject: | [Caml-list] CamlLight install on MacOS X |
(mon anglais étant très mauvais, je poste en français ; si quelqu'un veut traduire, merci !) Merci à Sébastien Carlier qui m'a aidé dans l'installation de CamlLight sur MacOS X. Je récapitule la manoeuvre suffisante (et nécessaire) : 1. éditer le Makefile, voici ce que doit être la section de configuration : ### Configuration section # Which C compiler to use. # Performance is often improved if you use gcc 2.x instead of cc. CC=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 LIBS= # How to call the C preprocessor on a file that does not have the .c extension. # 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 BINDIR=/usr/local/bin # The directory where the Caml Light standard library will be installed LIBDIR=/usr/local/lib/caml-light # The manual section where the manual pages will be installed MANEXT=1 # The directory where the manual pages will be installed MANDIR=/usr/local/man/man$(MANEXT) # 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. SHELL=/bin/sh ### End of configuration section 2. ajouter en tête des fichiers src/runtime/main.c et src/runtime/io.c la ligne : #include <unistd.h> normalement, après, ça roule ! Voici les explications de Sébastien (qui dépasse largement mon niveau d'expertise) : 1. Le probleme vient du preprocesseur C de MacOS X qui ne supporte pas les extenstions de GCC utilisees par l'interpreteur de CamlLight. 2. Le problème était du à la fonction lseek qui sous MacOS X prend un offset sur 64 bits. Sans prototypage, le type par défaut du second argument est int (32 bits)... d'où le problème. Cordialement, espérant que cela pourra aider d'autres que moi ! Laurent -- Laurent Chéno Prof. de mathématiques en PSI* et de l'option informatique en MP/MP* Lycée Louis-le-Grand, Paris http://pauillac.inria.fr/~cheno/ ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr