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 65E677F0BA for ; Fri, 3 Feb 2017 11:15:10 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=christoph.hoeger@celeraone.com; spf=Pass smtp.mailfrom=christoph.hoeger@celeraone.com; spf=None smtp.helo=postmaster@mail-io0-f173.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of christoph.hoeger@celeraone.com) identity=pra; client-ip=209.85.223.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@celeraone.com"; x-sender="christoph.hoeger@celeraone.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of christoph.hoeger@celeraone.com designates 209.85.223.173 as permitted sender) identity=mailfrom; client-ip=209.85.223.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@celeraone.com"; x-sender="christoph.hoeger@celeraone.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@mail-io0-f173.google.com) identity=helo; client-ip=209.85.223.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="christoph.hoeger@celeraone.com"; x-sender="postmaster@mail-io0-f173.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3Az1B2zxNAqCZClrMimMYl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0KP/8rarrMEGX3/hxlliBBdydsKMYzbWP+Pi/ESxYuNDa7yBEKMQNHzY+yu?= =?us-ascii?q?wo3CUYSPafDkP6KPO4JwcbJ+9lEGFfwnegLEJOE9z/bVCB6le77DoVBwmtfVEt?= =?us-ascii?q?fre9Msfogs+2z+G//YHIK0UN3WLlIOA6EBLjiwTasc2fmrxFKKs9wyzjLmEAL+?= =?us-ascii?q?JXzmRsLEnVmBTx6s729pd52yBdq/Mv9ohLVqCsLIoiSrkNJzQ8Mnsp49Xrgjld?= =?us-ascii?q?QgaVri8XUn8XiQZPGwiD7Bb3UZrrmiD3sudn0S6cMIv9SrViCmfq1LtiVBK90H?= =?us-ascii?q?RPDDU+6myCz5Uo1K8=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BeAAACV5RYgK3fVdFdGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFQEBAQECAQEBAQgBAQEBhAmBCQeDUZwTlTuCDSKGAAKCUgdBFgEBAQE?= =?us-ascii?q?BAQEBAQEBEgEBCQ0JChsxgjMEARYBBIIWAQEBAwEjHQEBNwEECwkCBAcNKgICI?= =?us-ascii?q?hIBBQEcBhOJaQiPWZENP4saaIIlgwgBAQWIKgEBAQEGAQEBAQEBGggSiyiHU4J?= =?us-ascii?q?flU+EUYFIhmiLIIJOjjSRQxQegRUlAYF8UBcFhBlFgUk/NQGHUYFOAQEB?= X-IPAS-Result: =?us-ascii?q?A0BeAAACV5RYgK3fVdFdGgEBAQECAQEBAQgBAQEBFQEBAQE?= =?us-ascii?q?CAQEBAQgBAQEBhAmBCQeDUZwTlTuCDSKGAAKCUgdBFgEBAQEBAQEBAQEBEgEBC?= =?us-ascii?q?Q0JChsxgjMEARYBBIIWAQEBAwEjHQEBNwEECwkCBAcNKgICIhIBBQEcBhOJaQi?= =?us-ascii?q?PWZENP4saaIIlgwgBAQWIKgEBAQEGAQEBAQEBGggSiyiHU4JflU+EUYFIhmiLI?= =?us-ascii?q?IJOjjSRQxQegRUlAYF8UBcFhBlFgUk/NQGHUYFOAQEB?= X-IronPort-AV: E=Sophos;i="5.33,328,1477954800"; d="scan'208,217";a="258700089" Received: from mail-io0-f173.google.com ([209.85.223.173]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 03 Feb 2017 11:15:09 +0100 Received: by mail-io0-f173.google.com with SMTP id j13so14010783iod.3 for ; Fri, 03 Feb 2017 02:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=celeraone-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=G679voQT/YHw/h/PCq22pdlLwARs40ORLqHj7a3kttk=; b=SiwYrWT2b7uGHZAnWhRcgCS+aQxRy/rIzcTJTjHVD6EJDvoSSQYm+MjVPL2aCSujEM jkCIkgTimyHzz9xYBpkiyq6i+xPL3yLFL0wXC6ruLxuDLvNcEc5t3MbBl+2jVDdNEg9M 27l7nW8F7Ke+zHLJOVP+lxtYB6IaP2duYuZoYaSq7TxMf9oA3cruCGsUfjCsAcdefbQi WOXhxXPwntQUQkkDVnxfKBWNvT7qFZ/YmXdmEQ41IswraT89iQNin/Rsk6S08y/bBzD+ EgGeE5COAj1xJiy3WF14FQQ/J0RrHR68/E5sqCVZoOcvZDkNzRMkqY0gdB4HOJOghCUu z3Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=G679voQT/YHw/h/PCq22pdlLwARs40ORLqHj7a3kttk=; b=oJjwznK/Zr46VALL1KT9JO8pY3N59Njr9iWQKj54Y8+rLsX8faEQe5V0XNlAMtQuu+ Kbl7JAyAR6P+5Nw2M0UWbkcayLUqqRNqC4vZGGIuzWhI1eZuSuPLXcGlKb3IcE85zJrZ Vpw9cfCWZWqOj8qkZTL831cMDXRAmRE96baMdePADJYcAranCWF+3Yfwq6BKMdMv6ea1 qgeq8+pcUUjWt1Eni2FrmRSsvI0oJvw1Q1Usqzp/DLXoVjz2cQTaW9C0eXMQG64r1/aQ rkB9y+T3jcuOobOd6VPGLbimDShVHv9usbdF0FDuGcp8/zqs7eQ3Iko7E39twkJCemcC 5VmQ== X-Gm-Message-State: AIkVDXJbxbw215s7pWvgpcwOL8jz+RtLmJXvXKTH0rmTQkfS6jbpQ/RzedzENYKXOruDND6OhB8rGdFi2FyxH6dv X-Received: by 10.107.32.199 with SMTP id g190mr9146051iog.178.1486116908406; Fri, 03 Feb 2017 02:15:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.48.211 with HTTP; Fri, 3 Feb 2017 02:15:08 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Christoph_H=C3=B6ger?= Date: Fri, 3 Feb 2017 11:15:08 +0100 Message-ID: To: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Cc: OCaml Mailing List Content-Type: multipart/alternative; boundary=001a1140338a6bac9805479d8e2a Subject: Re: [Caml-list] Is there some builtin function that flushes buffers on shutdown? --001a1140338a6bac9805479d8e2a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable That sounded totally reasonable, but is not the cause. When I think about it, it cannot work that way, since the linker should have complained about a missing symbol, right? On Fri, Feb 3, 2017 at 10:16 AM, Nicol=C3=A1s Ojeda B=C3=A4r < nicolas.ojeda.bar@lexifi.com> wrote: > Hi Christoph, > > I can't check now, but it sounds like you forgot to link $(ocamlc > -where)/std_exit.o into your executable. > > Cheers! > Nicolas > > > On Fri, Feb 3, 2017 at 9:56 AM, Christoph H=C3=B6ger < > christoph.hoeger@celeraone.com> wrote: > >> Dear all, >> >> I managed to manually link and run an object file generated by ocamlopt. >> A small part seems to be missing, however: >> >> =E2=9E=9C llvmlink ocamlfind opt -package ANSITerminal -linkpkg -verbose >> -output-obj -o test.object.o test.ml >> >> =E2=9E=9C llvmlink clang -I$(ocamlc -where) -lm wrapper.c test.object.o= -o >> wrapper ~/.opam/4.04.0/lib/ocaml/libunix.a -ldl >> ~/.opam/4.04.0/lib/ocaml/libasmrun.a /home/choeger/.opam/4.04.0/lib >> /ANSITerminal/libANSITerminal_stubs.a >> >> These commands produce an executable output, but the screen remains >> empty. This changes, when I manually flush the stdout buffer in the code= (I >> obtain the desired results then). >> >> Find attached the test sources. When I uncomment the Printf.printf in >> test.ml, everything seems to work fine. But when I compile the test >> using ocamlopt solely, this is not necessary. It seems some buffers do n= ot >> get flushed here. Does anyone know, why? >> >> regards, >> >> Christoph >> >> > --001a1140338a6bac9805479d8e2a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That sounded totally reasonable, but is not the cause. Whe= n I think about it, it cannot work that way, since the linker should have c= omplained about a missing symbol, right?

On Fri, Feb 3, 2017 at 10:16 AM, Nicol=C3= =A1s Ojeda B=C3=A4r <nicolas.ojeda.bar@lexifi.com> wrote:
Hi Christoph,
I can't check now, but it sounds like you forgot to l= ink $(ocamlc -where)/std_exit.o into your executable.

<= div>Cheers!
Nicolas


On Fri, Feb 3, 2017 at 9:56 AM, Christoph H=C3=B6ger = <chr= istoph.hoeger@celeraone.com> wrote:
Dear all,

I managed to manually link and run an object file generated by ocamlopt= . A small part seems to be missing, however:

=E2=9E=9C=C2=A0 llvmlin= k ocamlfind opt -package ANSITerminal -linkpkg -verbose -output-obj -o test= .object.o test.ml

= =E2=9E=9C=C2=A0 llvmlink clang -I$(ocamlc -where) -lm wrapper.c test.object= .o -o wrapper ~/.opam/4.04.0/lib/ocaml/libunix.a -ldl ~/.opam/4.04.0/l= ib/ocaml/libasmrun.a /home/choeger/.opam/4.04.0/lib/ANSITerminal/= libANSITerminal_stubs.a

These commands produce an executa= ble output, but the screen remains empty. This changes, when I manually flu= sh the stdout buffer in the code (I obtain the desired results then).
<= br>
Find attached the test sources. When I uncomment the Printf.printf= in test.ml, everything se= ems to work fine. But when I compile the test using ocamlopt solely, this i= s not necessary. It seems some buffers do not get flushed here. Does anyone= know, why?

regards,

Christoph



--001a1140338a6bac9805479d8e2a--