Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] installing caml-light
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michel Quercia <michel.quercia@p...>
Subject: Re: [Caml-list] installing caml-light
Le vendredi 18 Juin 2004 18:44, Marco Maggesi a écrit :
> Hi everybody,
> I am trying to install Caml-light with no success (from
> cl75unix.tar.gz).  I made two attempts on two different machines:
>   1. On a Linux Gentoo box (you can find the complete trace of the
>      compilation at
>      Problem: The Caml-light core compiles correctly but I am not able
>      to compile the contributions, in particular "unix".  The precise
>      error is
>        make[1]: Entering directory `/home/maggesi/cl/cl75/contrib/libunix'
>        gcc -I../../src/runtime -O    -c -o accept.o accept.c
>        In file included from /usr/include/sys/un.h:38,
>                         from socketaddr.h:4,
>                         from accept.c:8:
>        /usr/include/string.h:278: error: syntax error before '(' token
>        /usr/include/string.h:278: error: syntax error before "const"
>        make[1]: *** [accept.o] Error 1

There is a micmac in the src/runtime/config.h file. Comment out (or fix) the 
definition of bcopy :

#define bcopy(src,dst,len) memmove((dst), (src), (len))
#ifdef HAS_BCOPY
/* Nothing to do */
#define bcopy(src,dst,len) memcpy((dst), (src), (len))
#define bcopy(src,dst,len) memmov((dst), (src), (len))

On Linux bcopy is already defined and the redefinition above triggers this 
(strange) error when HAS_MEMMOVE is set.

You will encounter another problem later when compiling libunix related to 
errno which is a macro and no longer an external variable. The fix for this 
is to remove all declarations "extern int errno" in libunix/*.c files and add 
"#include <errno.h>" when not already present.

Michel Quercia
23 rue de Montchapet, 21000 Dijon (maths) (informatique)

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: