Browse thread
[Caml-list] CamlLight installation on MacOS X : the answer (english version)
- 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 installation on MacOS X : the answer (english version) |
(Thanks to Philippe Esperet for this translation ... my english is very trash) 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. 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. 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 -- 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