Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] problem compiling libunix on Linux
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: wang yin <shredder@s...>
Subject: [Caml-list] problem compiling libunix on Linux
Hi,

I'm trying to compile libunix in contrib directory for my
Linux machine, because HOL-light uses libunix.

But it seem that libunix uses BSD style headers. And I get
the following compiler error from GCC:

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:257: parse error before '(' token
/usr/include/string.h:257: conflicting types for `memmove'
/usr/include/string.h:43: previous declaration of `memmove'
/usr/include/string.h:257: parse error before "const"
make: *** [accept.o] Error 1

Stracing into string.h, I found that problem emerges from
the BSD prototype:

#ifdef __USE_BSD
/* Copy N bytes of SRC to DEST (like memmove, but args
reversed).  */
extern void bcopy (__const void *__src, void *__dest, size_t
__n) __THROW;

....

Why is __USE_BSD defined? I can't find it anywhere in my
distribution. How can I solve this problem? HOL Light can be
used without libunix, but it requires libnum, and libnum
depends on libunix. And many other contrib libraries depends
on it. So I must get libunix compiled!

Can any one give some hints?


-- 
Wang Yin
Deparment of Computer Science and Technology,
Tsinghua University,
100084
Beijing China

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners