From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 99B06BBBB for ; Thu, 30 Mar 2006 18:03:20 +0200 (CEST) Received: from mail-white.research.att.com ([192.20.225.110]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k2UG3JLm013642 for ; Thu, 30 Mar 2006 18:03:20 +0200 Received: from NJFPSRVEXG2KCL.research.att.com (njfpsrvexg2k1.research.att.com [135.207.26.243]) by mail-green.research.att.com (Postfix) with ESMTP id AC09C860F for ; Thu, 30 Mar 2006 11:03:18 -0500 (EST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C65413.75E4F76E" X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Subject: MacOS (darwin) shared library creation Date: Thu, 30 Mar 2006 11:03:18 -0500 Message-ID: <77E42FE8D777074488824B5D4056A2FE017CEBAF@NJFPSRVEXG2KCL.research.att.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: MacOS (darwin) shared library creation Thread-Index: AcZUE5AIYf2TdCl3RBu9Ney1tcmmsQ== From: To: X-Miltered: at nez-perce with ID 442C0147.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; macos:01 3.08:01 o'caml:01 macos:01 dylib:01 o'caml:01 api:01 libasmrun:01 compiler:01 libasmrun:01 dylib:01 ocaml:01 api:01 ocaml:01 rath:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DNS_FROM_RFC_WHOIS, HTML_MESSAGE,NO_REAL_NAME autolearn=disabled version=3.0.3 This is a multi-part message in MIME format. ------_=_NextPart_001_01C65413.75E4F76E Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable With the 3.08 version of O'Caml, our project was able to create a MacOS X (darwin) shared library (dylib, not a bundle), by linking a mixture of O'Caml code, C object code, and all of the supporting O'Caml libraries. This allowed the users of our system to simply link to this one library to build a C application that uses our library's C API. To do this, we linked in the O'Caml .a libraries and libasmrun.a. =20 With 3.09.1 this no longer works. The compiler complains that libasmrun.a has common symbols, which are incompatible with the creation of a dylib. I took a look at the configure script for ocaml 3.09.1 and see that for MacOS, the -fno-common flag is commented out of the configuration. =20 Is there a reason -fno-common was commented out? =20 Even if I fix this, I will eventually run into difficulties because we would have to require users of our C API to rebuild their OCaml with this change. Also, we are planning to use GODI to distribute our package, and can't rely on the no-common version of OCaml being used to build our package. =20 Any suggestions? =20 Chris Rath AT&T Labs Research car@research.att.com =20 ------_=_NextPart_001_01C65413.75E4F76E Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

With the 3.08 version of = O’Caml, our project was able to create a MacOS X (darwin) shared library (dylib, not = a bundle), by linking a mixture of O’Caml code, C object code, and = all of the supporting O’Caml libraries.  This allowed the users of = our system to simply link to this one library to build a C application that = uses our library’s C API.  To do this, we linked in the O’Caml = .a libraries and libasmrun.a.

 

With 3.09.1 this no longer = works.  The compiler complains that libasmrun.a has common symbols, which are = incompatible with the creation of a dylib.  I took a look at the configure = script for ocaml 3.09.1 and see that for MacOS, the –fno-common flag is = commented out of the configuration.

 

Is there a reason –fno-common = was commented out?

 

Even if I fix this, I will = eventually run into difficulties because we would have to require users of our C API to rebuild their OCaml with this change.  Also, we are planning to use = GODI to distribute our package, and can’t rely on the no-common version = of OCaml being used to build our package.

 

Any suggestions?

 

Chris Rath

AT&T Labs = Research

car@research.att.com

 

------_=_NextPart_001_01C65413.75E4F76E--