From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 726AE7EEE0 for ; Fri, 6 Mar 2015 11:16:10 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of san.vu-ngoc@laposte.net) identity=pra; client-ip=194.117.213.100; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="san.vu-ngoc@laposte.net"; x-sender="san.vu-ngoc@laposte.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of san.vu-ngoc@laposte.net designates 194.117.213.100 as permitted sender) identity=mailfrom; client-ip=194.117.213.100; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="san.vu-ngoc@laposte.net"; x-sender="san.vu-ngoc@laposte.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.laposte.net) identity=helo; client-ip=194.117.213.100; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="san.vu-ngoc@laposte.net"; x-sender="postmaster@smtp.laposte.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CnAACGfflUnGTVdcJcg1hawV6HfgEBAQEBARABAQEBAQgLCQkULoROCAEBNgI7FhgDAgECAVgIAQGIFgEDEQS0SIVSAQWPZBA6E4VaBpAihBWTb4c9hSCMfIFoDDEcgVFugkMBAQE X-IPAS-Result: A0CnAACGfflUnGTVdcJcg1hawV6HfgEBAQEBARABAQEBAQgLCQkULoROCAEBNgI7FhgDAgECAVgIAQGIFgEDEQS0SIVSAQWPZBA6E4VaBpAihBWTb4c9hSCMfIFoDDEcgVFugkMBAQE X-IronPort-AV: E=Sophos;i="5.11,351,1422918000"; d="scan'208";a="124695780" Received: from smtpoutz25.laposte.net (HELO smtp.laposte.net) ([194.117.213.100]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 06 Mar 2015 11:16:09 +0100 Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout013 (Postfix) with ESMTP id 6310228401FE for ; Fri, 6 Mar 2015 11:16:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=laposte.net; s=mail1; t=1425636969; bh=s1wS9IMd2CUd6GAzErDANN4TFw9JeTci8Tlr933DrMk=; h=Date:From:To:Subject; b=iyXvNZD+B3lXjmcJQNMhwKhr9T9QC7DmG2uFQz9J1ot4ErPqp/V3QVpf2i6qxgD7S fRbLz+e+utX9UcXMNxgmmDjudqOCiRUH+bAyPaxWb1msQbAg5F8eqwyGfPMjbop/As TZJH1uKXcreynGvu2XtPNtL7mWVYSIbx9ANeM55hzOydyO4sAtRhu1VEFDOPEwWLUy hPX3MtR2Pl4vVh+Vh6v+lTkM7awCjEJCIbCcotKvGDRBZL8KpR28tIeA4f18AKzamf XIPfMV+X9zlvsDwy4KzkXLMVI5bbe5Y6NuW3eb0+yXJgM0Y1ZYDqk3AuVWwU24qsTh kEp1aUwYYO92w== Received: from lpn-prd-vrin002 (unknown [10.128.63.3]) by lpn-prd-vrout013 (Postfix) with ESMTP id 5D657284014D for ; Fri, 6 Mar 2015 11:16:09 +0100 (CET) Received: from lpn-prd-vrin002 (localhost [127.0.0.1]) by lpn-prd-vrin002 (Postfix) with ESMTP id 4E93F5A9333 for ; Fri, 6 Mar 2015 11:16:09 +0100 (CET) Received: from [129.20.36.37] (pr036037.math.univ-rennes1.fr [129.20.36.37]) by lpn-prd-vrin002 (Postfix) with ESMTPA id 3A5975A930B for ; Fri, 6 Mar 2015 11:16:09 +0100 (CET) Message-ID: <54F97E68.3010100@laposte.net> Date: Fri, 06 Mar 2015 11:16:08 +0100 From: Vu Ngoc San User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-VR-SrcIP: 129.20.36.37 X-VR-FullState: 0 X-VR-Score: 0 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeejledrhedugddufecutefuodetggdotefrucfrrhhofhhilhgv X-VR-Cause-2: mecunfetrffquffvgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefkfffhfgggvffutgfg X-VR-Cause-3: sehtjegrtddtfeelnecuhfhrohhmpegguhcupfhgohgtucfurghnuceoshgrnhdrvhhuqdhnghhotges X-VR-Cause-4: lhgrphhoshhtvgdrnhgvtheqnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghloheplgdu X-VR-Cause-5: vdelrddvtddrfeeirdefjegnpdhinhgvthepuddvledrvddtrdefiedrfeejpdhmrghilhhfrhhomhep X-VR-Cause-6: shgrnhdrvhhuqdhnghhotgeslhgrphhoshhtvgdrnhgvthdprhgtphhtthhopegtrghmlhdqlhhishht X-VR-Cause-7: sehinhhrihgrrdhfrh X-VR-AvState: No X-VR-State: 0 Subject: [Caml-list] Warning 31: files b.cma(Str) and a.cma(Str) both define a module named Str Hello list I have a basic compilation question: I want to write two independent libraries, say A an B, and both use a third library, eg. Str When I write a program which uses A and B, I get File "b.cma(Str)", line 1: Warning 31: files b.cma(Str) and a.cma(Str) both define a module named Str How to get rid of this warning ? Am I doing something wrong ? Thanks San ---- Here is a minimal example: (* This is a.ml *) let version = "A";; let _ = print_endline (Str.string_before "Loading the A library -- foo" 22);; (* This is b.ml *) let version = "B";; let _ = print_endline (Str.string_before ("Loading the " ^ version ^" library -- bar") 23);; # this is Makefile.a SOURCES = a.ml LIBS = str RESULT = a all: byte-code-library -include OCamlMakefile # this is Makefile.b SOURCES = b.ml LIBS = str RESULT = b all: byte-code-library -include OCamlMakefile (* this is test.ml *) let _ = print_endline (Str.string_before ("Hello " ^ A.version ^ " and " ^ B.version ^"---") 13);; # this is Makefile.test SOURCES = test.ml LIBS = a b RESULT = test all: byte-code -include OCamlMakefile