From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 405F1BBCA for ; Thu, 3 Apr 2008 03:07:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnYFAO3J80fAXQIn/2dsb2JhbACCQjCCGacW X-IronPort-AV: E=Sophos;i="4.25,596,1199660400"; d="scan'208,217";a="9127056" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 03 Apr 2008 03:07:00 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m3316xaa016848 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 3 Apr 2008 03:06:59 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlMBAO3J80fAFOFvo2dsb2JhbACCQjCCGYxFAQEBAQEBBwUJBxaaGQ X-IronPort-AV: E=Sophos;i="4.25,596,1199660400"; d="scan'208,217";a="24527663" Received: from mail-pink.research.att.com ([192.20.225.111]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Apr 2008 03:06:59 +0200 Received: from mail-blue.research.att.com (H-135-207-30-102.research.att.com [135.207.30.102]) by mail-pink.research.att.com (Postfix) with ESMTP id 4A6521948D4 for ; Wed, 2 Apr 2008 21:06:58 -0400 (EDT) Received: from bigmail.research.att.com (bigmail.research.att.com [135.207.30.101]) by mail-blue.research.att.com (Postfix) with ESMTP id 338CD147EAF for ; Wed, 2 Apr 2008 21:06:58 -0400 (EDT) Received: from [192.168.0.100] (vpn-22.research.att.com [135.207.240.22]) by bigmail.research.att.com (8.13.7+Sun/8.11.6) with ESMTP id m3316vZa018238 for ; Wed, 2 Apr 2008 21:06:58 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v753) To: caml List Message-Id: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> Content-Type: multipart/alternative; boundary=Apple-Mail-79--903134057 From: Yitzhak Mandelbaum Subject: Ocamlnet and EINPROGRESS Date: Wed, 2 Apr 2008 21:06:56 -0400 X-Mailer: Apple Mail (2.753) X-Miltered: at concorde with ID 47F42DB3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; yitzhak:01 mandelbaum:01 yitzhak:01 ocamlnet:01 mandelbaum:01 unix:01 unix:01 exception:01 exception:01 module:03 module:03 labs:06 labs:06 seem:08 seem:08 --Apple-Mail-79--903134057 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi, I'm using the Http_client.Convenience module to get web pages. Unfortunately, if I link the Unix module into my program, then suddenly I get the Unix_error exception with code EINPROGRESS (38). I noticed this issue raised on the list last August, but it does not seem to have been resolved. Does anyone know how to solve this? Thanks, Yitzhak Mandelbaum -------------------------------------------------- Yitzhak Mandelbaum AT&T Labs - Research http://www.research.att.com/~yitzhak --Apple-Mail-79--903134057 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi,

I'm using the=A0Http_client.Convenience module to = get web pages. Unfortunately, if I link the Unix module into my program, = then suddenly I get the Unix_error exception with code EINPROGRESS (38). = =A0I noticed this issue raised on the list last August, but it does not = seem to have been resolved. Does anyone know how to solve = this?

Thanks,

= --Apple-Mail-79--903134057-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2E75ABBCA for ; Thu, 3 Apr 2008 03:52:54 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoAANPV80eAArkpjWdsb2JhbACBWo92AQEBAQkFBwcYmh8 X-IronPort-AV: E=Sophos;i="4.25,596,1199660400"; d="scan'208";a="9127689" Received: from chokecherry.srv.cs.cmu.edu ([128.2.185.41]) by mail2-smtp-roc.national.inria.fr with ESMTP; 03 Apr 2008 03:52:53 +0200 Received: from stratocaster.home (c-71-199-104-241.hsd1.pa.comcast.net [71.199.104.241]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id m331qpoA022866 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 2 Apr 2008 21:52:51 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.69) (envelope-from ) id 1JhEdH-0005e9-Hc for caml-list@yquem.inria.fr; Wed, 02 Apr 2008 21:52:51 -0400 Date: Wed, 2 Apr 2008 21:52:51 -0400 From: Eric Cooper To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS Message-ID: <20080403015251.GA20849@stratocaster.home> Mail-Followup-To: caml-list@yquem.inria.fr References: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Spam: no; 0.00; ocamlnet:01 yitzhak:01 mandelbaum:01 trivial:01 argv:01 non-blocking:01 strace:01 wrote:01 unix:01 unix:01 exception:01 exception:01 caml-list:01 string:02 sys:03 On Wed, Apr 02, 2008 at 09:06:56PM -0400, Yitzhak Mandelbaum wrote: > I'm using the Http_client.Convenience module to get web pages. > Unfortunately, if I link the Unix module into my program, then suddenly > I get the Unix_error exception with code EINPROGRESS (38). I don't see this with a trivial program that just does http_get: open Http_client.Convenience let () = print_string (http_get Sys.argv.(1)) The EINPROGRESS is from a connect() call on a socket that's been set non-blocking. Running the above program under strace shows that this occurs, but it's handled within http_get. Can you post a minimal example that shows the exception escaping? -- Eric Cooper e c c @ c m u . e d u From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 86F7BBBCA for ; Thu, 3 Apr 2008 04:08:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao0BACnZ80fAFOFvo2dsb2JhbACCQTGCGYxFAQEBAQEBBwUJBxaaJw X-IronPort-AV: E=Sophos;i="4.25,596,1199660400"; d="scan'208,217";a="10350024" Received: from mail-pink.research.att.com ([192.20.225.111]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Apr 2008 04:08:58 +0200 Received: from mail-green.research.att.com (H-135-207-30-103.research.att.com [135.207.30.103]) by mail-pink.research.att.com (Postfix) with ESMTP id 2224D194715; Wed, 2 Apr 2008 22:08:58 -0400 (EDT) Received: from bigmail.research.att.com (bigmail.research.att.com [135.207.30.101]) by mail-green.research.att.com (Postfix) with ESMTP id 082CE87F9; Wed, 2 Apr 2008 22:08:58 -0400 (EDT) Received: from [192.168.0.100] (vpn-22.research.att.com [135.207.240.22]) by bigmail.research.att.com (8.13.7+Sun/8.11.6) with ESMTP id m3328vBD024678; Wed, 2 Apr 2008 22:08:57 -0400 (EDT) In-Reply-To: <20080403015251.GA20849@stratocaster.home> References: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> <20080403015251.GA20849@stratocaster.home> Mime-Version: 1.0 (Apple Message framework v753) Content-Type: multipart/alternative; boundary=Apple-Mail-83--899414618 Message-Id: <46F1D786-911B-4177-8D51-82D86F4E6D45@research.att.com> Cc: caml-list@yquem.inria.fr From: Yitzhak Mandelbaum Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS Date: Wed, 2 Apr 2008 22:08:55 -0400 To: Eric Cooper X-Mailer: Apple Mail (2.753) X-Spam: no; 0.00; yitzhak:01 mandelbaum:01 yitzhak:01 ocamlnet:01 mandelbaum:01 trivial:01 argv:01 non-blocking:01 strace:01 beginner's:01 ocaml:01 bug:01 trivial:01 argv:01 non-blocking:01 --Apple-Mail-83--899414618 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Sure, here's one: let mystring = Http_client.Convenience.http_get "http://www.cnn.com" But, whether or not it raises the exception depends what I link it with, which is the essential problem. Yitzhak On Apr 2, 2008, at 9:52 PM, Eric Cooper wrote: > On Wed, Apr 02, 2008 at 09:06:56PM -0400, Yitzhak Mandelbaum wrote: >> I'm using the Http_client.Convenience module to get web pages. >> Unfortunately, if I link the Unix module into my program, then >> suddenly >> I get the Unix_error exception with code EINPROGRESS (38). > > I don't see this with a trivial program that just does http_get: > open Http_client.Convenience > let () = print_string (http_get Sys.argv.(1)) > > The EINPROGRESS is from a connect() call on a socket that's been set > non-blocking. Running the above program under strace shows that this > occurs, but it's handled within http_get. > > Can you post a minimal example that shows the exception escaping? > > -- > Eric Cooper e c c @ c m u . e d u > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -------------------------------------------------- Yitzhak Mandelbaum AT&T Labs - Research http://www.research.att.com/~yitzhak --Apple-Mail-83--899414618 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Sure, here's one:

let mystring =3D = Http_client.Convenience.http_get "http://www.cnn.com"

<= div>But, whether or not it raises the exception depends what I link it = with, which is the essential = problem.=A0

Yitzhak

On Apr 2, 2008, at 9:52 PM, Eric Cooper wrote:
On Wed, Apr 02, 2008 at 09:06:56PM -0400, Yitzhak = Mandelbaum wrote:
I'm using the Http_client.Convenience module to get = web pages.
Unfortunately, if I link the = Unix module into my program, then suddenly
I get = the Unix_error exception with code EINPROGRESS (38).
=

I don't see this with a trivial program that just = does http_get:
=A0 =A0 open = Http_client.Convenience
=A0 =A0 let () =3D print_string = (http_get Sys.argv.(1))

The EINPROGRESS is from a = connect() call on a socket that's been set
=A0 Running = the above program under strace shows that this
occurs, but it's handled within http_get.

Can you = post a minimal example that shows the exception escaping?

--=A0
Eric = Cooper =A0 =A0 =A0 =A0 =A0 =A0 = e c c @ c m u . e d u

Caml-list mailing list. Subscription = management:


=
= --Apple-Mail-83--899414618-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7EF51BBCA for ; Thu, 3 Apr 2008 04:31:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoAAAbe80eAArkpjWdsb2JhbACBWo92AQEBAQkFBwcYmik X-IronPort-AV: E=Sophos;i="4.25,596,1199660400"; d="scan'208";a="24529432" Received: from chokecherry.srv.cs.cmu.edu ([128.2.185.41]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Apr 2008 04:30:59 +0200 Received: from stratocaster.home (c-71-199-104-241.hsd1.pa.comcast.net [71.199.104.241]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id m332UwxS024315 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 2 Apr 2008 22:30:58 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.69) (envelope-from ) id 1JhFEA-0005ny-69 for caml-list@yquem.inria.fr; Wed, 02 Apr 2008 22:30:58 -0400 Date: Wed, 2 Apr 2008 22:30:58 -0400 From: Eric Cooper To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS Message-ID: <20080403023058.GA22150@stratocaster.home> Mail-Followup-To: caml-list@yquem.inria.fr References: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> <20080403015251.GA20849@stratocaster.home> <46F1D786-911B-4177-8D51-82D86F4E6D45@research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46F1D786-911B-4177-8D51-82D86F4E6D45@research.att.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Spam: no; 0.00; ocamlnet:01 yitzhak:01 mandelbaum:01 ocamlnet:01 wrote:01 unix:01 exception:01 caml-list:01 modules:02 referenced:02 linking:02 module:03 let:03 debian:04 depends:04 On Wed, Apr 02, 2008 at 10:08:55PM -0400, Yitzhak Mandelbaum wrote: > Sure, here's one: > > let mystring = Http_client.Convenience.http_get "http://www.cnn.com" > > But, whether or not it raises the exception depends what I link it > with, which is the essential problem. On my (Debian) system, I can't build that program without linking in the Unix module, since it's referenced by almost all of the ocamlnet modules. So I don't understand the problem you're seeing. -- Eric Cooper e c c @ c m u . e d u From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 2B7FABBCA for ; Thu, 3 Apr 2008 04:43:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgBAIvh80fAFOFwomdsb2JhbACCQTGCGYxFAQEBAQEBBwUHCRaaIw X-IronPort-AV: E=Sophos;i="4.25,596,1199660400"; d="scan'208,217";a="24529634" Received: from mail-dark.research.att.com (HELO mail-yellow.research.att.com) ([192.20.225.112]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Apr 2008 04:43:10 +0200 Received: from [192.168.0.100] (vpn-22.research.att.com [135.207.240.22]) by bigmail.research.att.com (8.13.7+Sun/8.11.6) with ESMTP id m332h8x9028509; Wed, 2 Apr 2008 22:43:09 -0400 (EDT) In-Reply-To: <20080403023058.GA22150@stratocaster.home> References: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> <20080403015251.GA20849@stratocaster.home> <46F1D786-911B-4177-8D51-82D86F4E6D45@research.att.com> <20080403023058.GA22150@stratocaster.home> Mime-Version: 1.0 (Apple Message framework v753) Content-Type: multipart/alternative; boundary=Apple-Mail-85--897362955 Message-Id: <2E48665C-67B4-4182-BC23-EBA1A6DF9BF6@research.att.com> Cc: caml-list@yquem.inria.fr From: Yitzhak Mandelbaum Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS Date: Wed, 2 Apr 2008 22:43:07 -0400 To: Eric Cooper X-Mailer: Apple Mail (2.753) X-Spam: no; 0.00; yitzhak:01 mandelbaum:01 yitzhak:01 ocamlnet:01 arises:01 makefile:01 arbitrarily:01 makefile:01 ocamlfind:01 ocamlc:01 -package:01 -linkpkg:01 ocamlfind:01 ocamlc:01 -thread:01 --Apple-Mail-85--897362955 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Its a little more complicated than that. The problem arises when linking with 1) a library that links with Unix and 2) a file that depends on Unix. I've found a minimal example that fails on my system (OS X). It involves 4 files: Makefile, mintime.ml, unixprog.ml, minprog.ml (names chosen arbitrarily): ######################## Makefile: ######################## all: minprog timelib.cma: mintime.ml ocamlfind ocamlc -package unix -linkpkg \ -o $@ -a mintime.ml minprog: timelib.cma unixprog.ml ocamlfind ocamlc $(INCLUDES) -thread -o $@ \ -package netclient -linkpkg $^ minprog.ml ######################## mintime.ml: ####################### let now () = Unix.time () ######################## unixprog.ml: ####################### let foo x = let in_channel, out_channel = Unix.open_process "cat" in let read_fd = Unix.descr_of_in_channel in_channel in let write_fd = Unix.descr_of_out_channel out_channel in () ######################## minprog.ml: ####################### let mystring = Http_client.Convenience.http_get "http://www.cnn.com" Then, make minprog ./minprog results in Fatal error: exception Unix.Unix_error(38, "connect", "") Yitzhak On Apr 2, 2008, at 10:30 PM, Eric Cooper wrote: > On Wed, Apr 02, 2008 at 10:08:55PM -0400, Yitzhak Mandelbaum wrote: >> Sure, here's one: >> >> let mystring = Http_client.Convenience.http_get "http:// >> www.cnn.com" >> >> But, whether or not it raises the exception depends what I link it >> with, which is the essential problem. > > On my (Debian) system, I can't build that program without linking in > the Unix module, since it's referenced by almost all of the ocamlnet > modules. So I don't understand the problem you're seeing. > > -- > Eric Cooper e c c @ c m u . e d u > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -------------------------------------------------- Yitzhak Mandelbaum AT&T Labs - Research http://www.research.att.com/~yitzhak --Apple-Mail-85--897362955 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Its a little more complicated than that. The problem arises when linking = with 1) a library that links with Unix and 2) a file that depends on = Unix. I've found a minimal example that fails on my system (OS X). It = involves 4 files: Makefile, mintime.ml, unixprog.ml, minprog.ml (names = chosen = arbitrarily):

########################
Makefi= le:
########################

all: = minprog

timelib.cma: = mintime.ml ocamlfind ocamlc -package unix = -linkpkg \ -o $@ -a = mintime.ml
minprog: timelib.cma = =A0unixprog.ml=A0 ocamlfind ocamlc $(INCLUDES) = -thread -o $@ \ -package netclient -linkpkg $^ = minprog.ml


######################= ##
mintime.ml:
#######################
let now () =3D Unix.time = ()

########################
unix= prog.ml:#######################

le= t foo x =3D=A0=A0let in_channel, out_channel =3D = Unix.open_process "cat" in=A0=A0let read_fd =3D = Unix.descr_of_in_channel in_channel in=A0=A0let write_fd =3D = Unix.descr_of_out_channel out_channel = in=A0=A0()

########################=
minprog.ml:
#######################

let mystring =3D Http_client.Convenience.http_get "http://www.cnn.com"

<= /div>

Then,=A0

make = minprog
./minprog

results = in

Fatal error: exception = Unix.Unix_error(38, "connect", = "")

Yitzhak

On Apr 2, 2008, at 10:30 PM, Eric Cooper wrote:
On Wed, Apr 02, 2008 at 10:08:55PM -0400, Yitzhak = Mandelbaum wrote:
=A0=A0 = Sure, here's one:

=A0=A0 let mystring =3D = Http_client.Convenience.http_get "http://www.cnn.com"

=A0=A0 But, whether or not it = raises the exception depends what I link it
=A0=A0 with, which is the = essential problem.

On my (Debian) system, I can't = build that program without linking in
the Unix = module, since it's referenced by almost all of the ocamlnet
modules. =A0 = So I don't understand the problem you're seeing.

--=A0
Eric = Cooper =A0 =A0 =A0 =A0 =A0 =A0 = e c c @ c m u . e d u

Caml-list mailing list. Subscription = management:


=

= --Apple-Mail-85--897362955-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 273D4BBCA for ; Thu, 3 Apr 2008 09:12:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvQBAPIe9EeK54gDiGdsb2JhbACRTwEBAQ8mmWk X-IronPort-AV: E=Sophos;i="4.25,597,1199660400"; d="scan'208";a="9135373" Received: from rouge.crans.org ([138.231.136.3]) by mail2-smtp-roc.national.inria.fr with ESMTP; 03 Apr 2008 09:12:15 +0200 Received: from localhost (localhost.crans.org [127.0.0.1]) by rouge.crans.org (Postfix) with ESMTP id E289D8079; Thu, 3 Apr 2008 09:12:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at crans.org Received: from rouge.crans.org ([10.231.136.3]) by localhost (rouge.crans.org [10.231.136.3]) (amavisd-new, port 10024) with LMTP id vVN-fGjK+aWQ; Thu, 3 Apr 2008 09:12:14 +0200 (CEST) Received: from [138.231.142.254] (korell.crans.org [138.231.142.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rouge.crans.org (Postfix) with ESMTP id 8CDC78071; Thu, 3 Apr 2008 09:12:14 +0200 (CEST) Message-ID: <47F4834D.6010800@glondu.net> Date: Thu, 03 Apr 2008 09:12:13 +0200 From: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= User-Agent: Thunderbird 1.5.0.14ubu (X11/20080306) MIME-Version: 1.0 To: Yitzhak Mandelbaum Cc: Eric Cooper , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS References: <42D3D95E-3C90-4C9E-BB4B-34F8107DE4F6@research.att.com> <20080403015251.GA20849@stratocaster.home> <46F1D786-911B-4177-8D51-82D86F4E6D45@research.att.com> <20080403023058.GA22150@stratocaster.home> <2E48665C-67B4-4182-BC23-EBA1A6DF9BF6@research.att.com> In-Reply-To: <2E48665C-67B4-4182-BC23-EBA1A6DF9BF6@research.att.com> X-Enigmail-Version: 0.94.0.0 OpenPGP: id=FCE03DAA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; ocamlnet:01 yitzhak:01 mandelbaum:01 ocamlfind:01 ocamlc:01 -package:01 -linkpkg:01 ocamlfind:01 ocamlc:01 -thread:01 -package:01 netclient:01 -linkpkg:01 cheers:01 phane:98 Yitzhak Mandelbaum a =C3=A9crit : > timelib.cma: mintime.ml ocamlfind ocamlc -package unix -linkpkg \ -o $@= > -a mintime.ml > minprog: timelib.cma unixprog.ml ocamlfind ocamlc $(INCLUDES) -thread= > -o $@ \ -package netclient -linkpkg $^ minprog.ml With these rules, you link the Unix module twice. Try without -linkpkg in the first rule. More generally, avoid using -linkpkg when making .cma unless you know what you are doing (use it only in the final stage of linking). Cheers, --=20 St=C3=A9phane From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 5A15CBBCA for ; Thu, 3 Apr 2008 15:33:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYCAON59EfOvjGufGdsb2JhbACRVwEBCwUCBwcWmgA X-IronPort-AV: E=Sophos;i="4.25,598,1199660400"; d="scan'208";a="10378371" Received: from web54604.mail.re2.yahoo.com ([206.190.49.174]) by mail1-smtp-roc.national.inria.fr with SMTP; 03 Apr 2008 15:33:14 +0200 Received: (qmail 35775 invoked by uid 60001); 3 Apr 2008 13:33:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=VgkaUFRiqjYGa2dmT6T4gpJzAgxkeIzvLudjTMKhpTTWNv18FiBUoxbU1DaOGspmxigOxBxeSuDIuKTPQ7X49n39sPEFnNOQEbfVN0Z4y7jLDbevnEo9VL6h68BJgyTwU6bYUmcY2RLTQk3eOi+JSN6t7DPYe1lYr71rxOBCqe0=; X-YMail-OSG: d99b5u4VM1kWjHSmVY0LtZoxoHbJUbTbAyHDXCAnRPEFt8V_MZp__qXTxKxrCtKnNL7RuL4PZ9CUEY83T4C5nXhqC8el8A3DOqKAfkI9c73r9SFm0y.DpMV_c3BF4A-- Received: from [82.155.120.75] by web54604.mail.re2.yahoo.com via HTTP; Thu, 03 Apr 2008 14:33:13 BST Date: Thu, 3 Apr 2008 14:33:13 +0100 (BST) From: Dario Teixeira Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS To: caml-list@yquem.inria.fr In-Reply-To: <47F4834D.6010800@glondu.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <974585.31607.qm@web54604.mail.re2.yahoo.com> X-Spam: no; 0.00; ocamlnet:01 -linkpkg:01 -linkpkg:01 ocamlfind:01 wiki:01 ocamlfind:01 ocaml:01 ocaml:01 unix:01 caml-list:01 cma:01 binary:02 linking:02 linking:02 module:03 > With these rules, you link the Unix module twice. Try without -linkpkg > in the first rule. More generally, avoid using -linkpkg when making .cma > unless you know what you are doing (use it only in the final stage of > linking). Indeed. And on that note I would like to report a similar problem with the "ocamlfind+ocamlbuild" plugin that was discussed on this list some weeks ago, and available on the Ocamlbuild wiki: http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild This is the offending code: (* When one link an OCaml library/binary/package, one should use -linkpkg. *) flag ["ocaml"; "link"] & A"-linkpkg"; As Stéphane mentioned, -linkpkg should normally not be used on libraries. (I have personally run into problems because of this). The solution I am using is to apply -linkpkg only when linking programmes: (* When linking Ocaml programmes (and programmes only!), we use -linkpkg. *) flag ["ocaml"; "link"; "program"] & A"-linkpkg"; Regards, Dario Teixeira ___________________________________________________________ Yahoo! For Good helps you make a difference http://uk.promotions.yahoo.com/forgood/