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 6499A7FD27 for ; Tue, 10 Nov 2015 19:20:22 +0100 (CET) IronPort-PHdr: 9a23:R6x85BPPqCB1ps1eW/cl6mtUPXoX/o7sNwtQ0KIMzox0KPT+rarrMEGX3/hxlliBBdydsKIZzbaL+Pm4CSQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTqkbzvsMSLM01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCeG+HoQGl4dlQZUS1ze5xbmQtH9sAP1s+N83G+ROsigHp4uXjH3zaBrTlfXiCYbNjg27GbRwphyi6JdiBmmpxFlzojIb5ucLPp/dbibdtRcWGkXDZUZbDBIHo7pN9hHNOEGJ+sN6tCl/1Y= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=john@coherentgraphics.co.uk; spf=None smtp.mailfrom=john@coherentgraphics.co.uk; spf=None smtp.helo=postmaster@mx2.ukhost4u.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=pra; client-ip=188.64.186.7; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=mailfrom; client-ip=188.64.186.7; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mx2.ukhost4u.com) identity=helo; client-ip=188.64.186.7; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="postmaster@mx2.ukhost4u.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B2AADJNEJWlAe6QLxehA51wDYjhW0CgUc8EAEBAQEBAQEBEAEBAQEJCwkJIS6CLoIIAQEEIxVAARALBxECAgUWBAcCAgkDAgECAUUGDog3AQiyZpBYAQEBAQEFAQEBAQEBAQEbgQGKUYd1gUQBBJZIhR2FUYMVgRSHLJMoOIJSHYFAhRkBgQYBAQE X-IPAS-Result: A0B2AADJNEJWlAe6QLxehA51wDYjhW0CgUc8EAEBAQEBAQEBEAEBAQEJCwkJIS6CLoIIAQEEIxVAARALBxECAgUWBAcCAgkDAgECAUUGDog3AQiyZpBYAQEBAQEFAQEBAQEBAQEbgQGKUYd1gUQBBJZIhR2FUYMVgRSHLJMoOIJSHYFAhRkBgQYBAQE X-IronPort-AV: E=Sophos;i="5.20,271,1444687200"; d="scan'208";a="186985503" Received: from mx2.ukhost4u.com ([188.64.186.7]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Nov 2015 19:20:21 +0100 Received: from bluechip4.ukhost4u.com ([188.64.184.40]) by mx2.ukhost4u.com with esmtps (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZwDWh-0006m9-Nx; Tue, 10 Nov 2015 18:20:20 +0000 Received: from [86.5.45.179] (port=51065 helo=[192.168.0.2]) by bluechip4.ukhost4u.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZwDWT-001box-22; Tue, 10 Nov 2015 18:20:14 +0000 Message-ID: <56423550.5050000@coherentgraphics.co.uk> Date: Tue, 10 Nov 2015 18:20:00 +0000 From: John Whitington User-Agent: Postbox 4.0.8 (Macintosh/20151105) MIME-Version: 1.0 To: David Scott CC: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-2.9 X-AuthUser: john@coherentgraphics.co.uk X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluechip4.ukhost4u.com X-AntiAbuse: Original Domain - X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Get-Message-Sender-Via: bluechip4.ukhost4u.com: none X-Filter-ID: s0sct1PQhAABKnZB5plbIf846yA3iTMvdsVmSdrHPMU9CTo+a6AtXGOZ5s/KMzk3GXNQvgP2LFpq 9ASq+UttQTc2QyPwvIt/EnBUmyTZIrXjjhMXbCnqL4HMfo8q7VfT8rX8RCl1NyXksx+7CJNMsQ5y yJAlV7jYhxWXvHoVtdcyVRLR1ArValUv7zCidwMIODtt5nxFJT4N9oXPAoiqLG025jO64ZMvqMnp gCXd6Y9m4zuNRcgRKiGg7nXFaZTx1nqluSyxW93RtmrKueBjDSEEbvzUxIOTAXw4rKujEwhWOn4s utQCHg5rTKbG8eBVUb++VSiQu8mBLHpY7P9BSH6m+UeFXprlCOm3BAEbJtDIhwNbStIl9f0XhlAZ 2MnkRABfKqSgbBnXD1zaVjKO4iCNRlRDWFqPTZ/y+bG98VaTnon1l6UcUeTb0FalyOJr1XKtEhFA o9bz/1u5KXwU+VGDAnrhhgokKhnlL9ICU8xOlpC/+uDlA8C3W0fS+NsWcHk87M2tJgDwJdyoiwSZ z3Knj0AN+N+X/FEeysVXIvd0WI9ixdbUQ7q67BGQPjSxWTzbEHxI7622k+0xrFE0BTjoQHnvNJo/ RPguruh72p6tI4g+l6rCWbY0MZcgnbHsUbuGpLVijn4dsBdWrj64LIJ56yob3dnXmGYL/eeazRRH DZR44q0a8OMzwKKk6MWdg2GvGQQyKNx8tloMSTmHyw== X-Report-Abuse-To: spam@mx1.ukhost4u.com X-Filter-Fingerprint: IFrWXGses7OKB5S5G8/dJRn/7L7+nnclbWGk7OJ1jHJA3cTUQ1R++keuE7RDJ8Kg3RbMLUalw1oC mj99/u+PoqoVy8a3lsStJtAvpObFX0Wok1JBYnOLzfRIhlEHQynLUpndEJ0YoaLytXXo8BMTaVt0 ARHRi6XGuAluI1udprFy32DUYpEhA3j9NJFmItfypuoazoDH3m92PL21GfhFYWcYmGLKZUTyGy/B A6iJtsD8WFC+rpTT4JYvoDjVeZUw3fI9smEy0EupqfCN6sn6Zg== X-Originating-IP: 188.64.184.40 X-SpamExperts-Domain: bluechip4.ukhost4u.com X-SpamExperts-Username: 188.64.184.40 X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.00) X-Recommended-Action: accept Subject: Re: [Caml-list] Simplifying link steps when making shared libraries containing OCaml (possibly OSX specific) Hi David, David Scott wrote: > Hi, > > I've packaged up some OCaml code with a C shim and made a shared library > (a ".so" file) on OSX. It's all working fine! However the build steps > I'm using are a bit verbose -- I wonder if anyone knows how to simplify > them? > > I'm building all the objects and then using a custom linker invocation, > see below. Notice that I'm tediously listing all the stubs for all my > ocamlfind packages-- this seems like it could be simplified somehow. No answers, I'm afraid, but if you do find a good generic way of doing it for OS X (and indeed, Linux), it would be great have patches to this: https://github.com/johnwhitington/ocaml-main-program-in-c (which only does static binaries when run under Unix or OS X, but both static binaries and dynamic libraries when under Windows.) You can see that I didn't manage to find a way to automatically extract which ocamlfind packs are needed, or indeed if unix or bigarray is needed. They must be specified: https://github.com/johnwhitington/ocaml-main-program-in-c/blob/master/build Thanks, John -- John Whitington Director, Coherent Graphics Ltd http://www.coherentpdf.com/