Re: [Caml-list] [ANN] Ocamlnet-3.5

Stéphane Glondu <[email protected]> Wed, 29 Feb 2012 09:57:31 +0100
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Le 23/02/2012 00:04, Gerd Stolpmann a écrit :
> it is time for another version of Ocamlnet. The new release 3.5 focuses on
> the system interface, and includes a long list of smaller improvements.
> [...]

It seems that this new release adds a new dependency to threads in some
situations:

$ cat test.ml
let () = ignore (Netconversion.ustring_of_uchar `Enc_utf8 0)
$ ocamlfind ocamlopt -package netstring -linkpkg test.ml
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`free_sem_block':
(.text+0x58): undefined reference to `sem_close'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_open':
(.text+0xba): undefined reference to `sem_open'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_close':
(.text+0x10c): undefined reference to `sem_close'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_unlink':
(.text+0x13a): undefined reference to `sem_unlink'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_init':
(.text+0x178): undefined reference to `sem_init'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_destroy':
(.text+0x1d8): undefined reference to `sem_destroy'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_getvalue':
(.text+0x220): undefined reference to `sem_getvalue'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_post':
(.text+0x272): undefined reference to `sem_post'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_wait':
(.text+0x2cc): undefined reference to `sem_wait'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_sem.o): In function
`netsys_sem_wait':
(.text+0x2d8): undefined reference to `sem_trywait'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_spawn.o): In function
`netsys_spawn_nat':
(.text+0x81): undefined reference to `pthread_sigmask'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_spawn.o): In function
`netsys_spawn_nat':
(.text+0xa7b): undefined reference to `pthread_sigmask'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_spawn.o): In function
`netsys_spawn_nat':
(.text+0xb6d): undefined reference to `pthread_sigmask'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_subprocess.o): In function
`sigchld_lock':
(.text+0x34): undefined reference to `pthread_sigmask'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_subprocess.o): In function
`sigchld_unlock':
(.text+0x11a): undefined reference to `pthread_sigmask'
/usr/lib/ocaml/netsys/libnetsys.a(netsys_c_subprocess.o): In function
`netsys_watch_subprocess':
(.text+0x65e): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
$ ocamlfind ocamlopt -thread -package netstring -linkpkg test.ml
$ echo $?
0

Whith ocamlnet 3.4.1, the -thread switch was not needed. Is that
expected? Even if it is, I would expect a more explanatory error message...


Cheers,

-- 
Stéphane

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/