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 3D12E7FC86 for ; Thu, 19 Mar 2015 19:19:41 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kennethadammiller@gmail.com) identity=pra; client-ip=209.85.214.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kennethadammiller@gmail.com designates 209.85.214.169 as permitted sender) identity=mailfrom; client-ip=209.85.214.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.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-ob0-f169.google.com) identity=helo; client-ip=209.85.214.169; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="postmaster@mail-ob0-f169.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B7AAAzEgtVm6nWVdFcg1haBIMJwSCBdodFB0wBAQEBAQERAQEBAQEGCwsJFC6EKBEdARseAxIJBzcCJAERAQUBIjWHeAEDEaJZgyw+MYsxgWuCd5EeChknDVSEewEFDpJpgUUFlDqFf4FVjDGEWBIjgQwJhCwiMYJDAQEB X-IPAS-Result: A0B7AAAzEgtVm6nWVdFcg1haBIMJwSCBdodFB0wBAQEBAQERAQEBAQEGCwsJFC6EKBEdARseAxIJBzcCJAERAQUBIjWHeAEDEaJZgyw+MYsxgWuCd5EeChknDVSEewEFDpJpgUUFlDqFf4FVjDGEWBIjgQwJhCwiMYJDAQEB X-IronPort-AV: E=Sophos;i="5.11,431,1422918000"; d="scan'208";a="126808676" Received: from mail-ob0-f169.google.com ([209.85.214.169]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Mar 2015 19:19:40 +0100 Received: by obbgg8 with SMTP id gg8so60966660obb.1 for ; Thu, 19 Mar 2015 11:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=N9Xmudmc3Gv7blmi3BOID/utIJMMujYr6JFteqGrtyk=; b=bT/e8sRb6QUacgQyTSvWQsZrASyupDYcRWMloydJ7i7SzM/hOkDw3ZbbZDdUIB4nku MI5EPgCZSeufSe3XRfk3B/nwTWOTJflcm3xy5jth0WZUgioolfRn+ixHWJK9lZVB+nt7 fuz8uUSFmtcJ4X2/KWF2oip0cJxpxN3teOSircQKWaCsQYSG9aEuDzj+VM/pOmRgromp uzlHP9Nru9NT7BIIg8u97XfUrrx8s6rrEt3E1ow7AmA/DPPJOLHMyhAtf+w58cEpsM25 oDX+aM9kJ+S7HXFN4hxQBT6xx6vkw1uRsk3f9gep7vb5mCgXbedgk+hkRqTltBb2oNFX 6Iog== MIME-Version: 1.0 X-Received: by 10.182.125.130 with SMTP id mq2mr63060863obb.52.1426789179355; Thu, 19 Mar 2015 11:19:39 -0700 (PDT) Received: by 10.202.185.8 with HTTP; Thu, 19 Mar 2015 11:19:39 -0700 (PDT) Date: Thu, 19 Mar 2015 14:19:39 -0400 Message-ID: From: Kenneth Adam Miller To: caml users Content-Type: multipart/alternative; boundary=089e012277463478ec0511a83e20 Subject: [Caml-list] Utop Difficulties with C callbacks --089e012277463478ec0511a83e20 Content-Type: text/plain; charset=UTF-8 So, I've been working for a while with a library and I've made a good iteration. My code compiles and is nice, it does what is expected, but it depends on a library, Piqi, that doesn't want to play nice in the interpreter. I want to be a good citizen and do my homework and due diligence, but nothing I do seems to make utop want to play nice with piqi. Here goes: When I execute utop -require mypackage repository with the newly built package mypackage, but I get this error: File "_none_", line 1: Error: The external function `camlidl_piqi_c_piqi_strtoull' is not available I checked out piqi locally, and pinned the package to my local build, where I tried to ensure that the appropriate .c file is getting compiled and linked into the cma and cmxa. They are without a shadow of a doubt. I then thought maybe I would add an include directive to utop to tell it to pick up the mli where the the external func : type = "name" is. Nope. I've done everything I can, from adding all combinations of additional piqirun/piqilib/piqirun.pb/piqirun.ext combinations to the _oasis file that specifies the serialization to trying to build my own utop to adding additional require statements and include statements in the utop script. So after trying to add the dependency to BuildDepends for myouterlib, I had backed off to just adding the mylibrary to the specific binary that consumes it, which is where my changes are (in that binary). I even went so far as to just try and get the changes compiled into a custom utop. Nope. I got errors and errors; I built it with: ocamlbuild -use-ocamlfind -pkg threads -pkg utop -pkg myouterlib -pkg camlp4 -pkg core_kernel customtop.top (At the time I ran this, I had bap package's _oasis updated with the appropriate compile BuildDepends so that it would link mylibrary too) and I had the let () = Utop_main.main ();; in "utopmain.ml" and customary customtop.mltop containing just "Utopmain". I got: (Unbound value ) I don't know what else to do besides ship code that is watered down without an interactive component. :/ --089e012277463478ec0511a83e20 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
So, I've been working for a while with a library and I= 've made a good iteration. My code compiles and is nice, it does what i= s expected, but it depends on a library, Piqi, that doesn't want to pla= y nice in the interpreter. I want to be a good citizen and do my homework a= nd due diligence, but nothing I do seems to make utop want to play nice wit= h piqi.

Here goes:

When I execu= te utop -require mypackage repository with the newly built package mypackag= e, but I get this error:

File "_none_&qu= ot;, line 1:
Error: The external function `camlidl_piqi_c_piqi_st= rtoull' is not available

I checked out p= iqi locally, and pinned the package to my local build, where I tried to ens= ure that the appropriate .c file is getting compiled and linked into the cm= a and cmxa. They are without a shadow of a doubt. I then thought maybe I wo= uld add an include directive to utop to tell it to pick up the mli where th= e the external func : type =3D "name" is. Nope.

I've done everything I can, from adding all combinations of add= itional piqirun/piqilib/piqirun.pb/piqirun.ext combinations to the _oasis f= ile that specifies the serialization to trying to build my own utop to addi= ng additional require statements and include statements in the utop script.= So after trying to add the dependency to BuildDepends for myouterlib, I ha= d backed off to just adding the mylibrary to the specific binary that consu= mes it, which is where my changes are (in that binary).

I even went so far as to just try and get the changes compiled into a= custom utop. Nope. I got errors and errors; I built it with:
oca= mlbuild -use-ocamlfind -pkg threads -pkg utop -pkg myouterlib -pkg camlp4 -= pkg core_kernel customtop.top

(At the time I r= an this, I had bap package's _oasis updated with the appropriate compil= e BuildDepends so that it would link mylibrary too)

and I had the let () =3D Utop_main.main ();; in "utopmain.ml" and customary customtop.mltop containing = just "Utopmain". I got:=C2=A0

(Unbound v= alue <everything I need *and* that's contained in mylibrary which is= specified in -pkg!>)

I don't know what els= e to do besides ship code that is watered down without an interactive compo= nent. :/
--089e012277463478ec0511a83e20--