From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 BDF12820A2 for ; Tue, 10 Sep 2013 15:30:29 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.128.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of dra-news@metastack.com designates 62.13.128.53 as permitted sender) identity=mailfrom; client-ip=62.13.128.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; 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@outmail128053.authsmtp.com) identity=helo; client-ip=62.13.128.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail128053.authsmtp.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnAAAHAeL1I+DYA1jWdsb2JhbABbgmaBKr8/gnyBIxYOAQEBAQkWBxclgiUBAQEDAYEJAgEIGAokMiUCBBuHdAcDwCWOKoEAOIMdgQADiH6OeJULgio X-IPAS-Result: AnAAAHAeL1I+DYA1jWdsb2JhbABbgmaBKr8/gnyBIxYOAQEBAQkWBxclgiUBAQEDAYEJAgEIGAokMiUCBBuHdAcDwCWOKoEAOIMdgQADiH6OeJULgio X-IronPort-AV: E=Sophos;i="4.90,878,1371074400"; d="scan'208";a="32279513" Received: from outmail128053.authsmtp.com ([62.13.128.53]) by mail2-smtp-roc.national.inria.fr with ESMTP; 10 Sep 2013 15:30:17 +0200 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt8.authsmtp.com (8.14.2/8.14.2) with ESMTP id r8ADUGcv017257 for ; Tue, 10 Sep 2013 14:30:16 +0100 (BST) Received: from romulus.metastack.com (cpc1-cmbg5-0-0-cust241.5-4.cable.virginmedia.com [81.98.252.242]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r8ADU9AS076003 for ; Tue, 10 Sep 2013 14:30:09 +0100 (BST) Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id r8ADU8Fr016446 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 10 Sep 2013 14:30:08 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0158.001; Tue, 10 Sep 2013 14:30:08 +0100 From: David Allsopp To: caml-list Thread-Topic: [Caml-list] Using OCaml from C Thread-Index: AQHOriBnwYEbm2JY6UyFsny4fGerIpm+4OuAgAAUVPA= Date: Tue, 10 Sep 2013 13:30:08 +0000 Message-ID: References: <522F1A03.9020001@glondu.net> In-Reply-To: <522F1A03.9020001@glondu.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.18] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 1d204aa0-1a1d-11e3-94fa-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNlEAUAAU NkdBMnJSNkcdTBdX QSgKW0s3BR1uW2N0 aBpQaQ9eYkBOVkti UVZASkxQEQd2AxgD GRwbTRk8NQ03DBt5 FCViWXZbXEc0d0R4 RQBVQW8GYTYxaH0e AUEMagJVJQBXdxsT O01/VHEIaGVWZ3ll E1QlBR1jdQZ0ISFR BwUMNk4nCXsQHzgz DzcpFDArVUMfQCB7 BHQA X-Authentic-SMTP: 61633634383431.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 81.98.252.242/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] Using OCaml from C St=E9phane Glondu wrote: > Le 10/09/2013 14:21, Tom Ridge a =E9crit : > > /home/tr61/.opam/4.00.1/lib/core/libcore_stubs.a(unix_stubs.o): In > > function `unix_clock_gettime': > > unix_stubs.c:(.text+0x2776): undefined reference to `clock_gettime' > > > > I had -lrt after -lpthread, but the error was still reported; when I > > moved -lrt to end of command line things seemed to work; why? > > My real question is: what command *should* I be using to compile my > > example? Or is the above more-or-less expected? >=20 > Your calls to cp, ar and your use of -custom look suspicious. But it is > difficult to be more helpful without a concrete testcase. They're exactly as in the manual and are correct for compiling with ocamlc = for static linking with C code. The cp and ar calls are necessary to set-up= the static library (which should use libcamlrun.a as a starting point) - s= ee #19.8 (the example in question), #19.7.4, #19.7.5 and #19.1.3 in the man= ual. David=20