From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id B1B207ED1A for ; Wed, 16 May 2012 20:35:26 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcDAIvTs09E5vGRnGdsb2JhbABEtAsiAQEBAQEICwkJFCeCVoEOJhgRTodzmXuhLY1FgkFiA4hjjRaTSoE2Gg X-IronPort-AV: E=Sophos;i="4.75,604,1330902000"; d="scan'208";a="158720809" Received: from fed1rmfepo103.cox.net ([68.230.241.145]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 May 2012 20:35:25 +0200 Received: from fed1rmimpo110.cox.net ([68.230.241.159]) by fed1rmfepo103.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20120516183524.QCDU9100.fed1rmfepo103.cox.net@fed1rmimpo110.cox.net> for ; Wed, 16 May 2012 14:35:24 -0400 Received: from jrv.local ([68.5.247.155]) by fed1rmimpo110.cox.net with bizsmtp id AibD1j00D3Mu9Dg03ibQhl; Wed, 16 May 2012 14:35:24 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A02020A.4FB3F36C.004C,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=ijZP+ambozbxyExrPsRbHgG6xGtlNZmtmXYN5Djs3jM= c=1 sm=1 a=XYJHFtupD_QA:10 a=InnjUweBx28A:10 a=G8Uczd0VNMoA:10 a=kj9zAlcOel0A:10 a=ij3c9D1uOT+vVYGYhpp3bw==:17 a=MYVsWgpwyxC36tm1Ib8A:9 a=oMj62GQG0JU2Qd-AIysA:7 a=CjuIK1q_8ugA:10 a=ij3c9D1uOT+vVYGYhpp3bw==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: by jrv.local (Postfix, from userid 502) id 72F6FF7302E; Wed, 16 May 2012 11:35:12 -0700 (PDT) Date: Wed, 16 May 2012 11:35:12 -0700 From: John Velman To: caml-list@inria.fr Message-ID: <20120516183511.GA489@cox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [Caml-list] Conflict between .../caml/config.h and Cocoa Security.framework I'm feeling my way into using OCaml to provide calculations for a Cocoa application for OS X using XCode on an iMac. I'm totally new at OCaml. I'm working with the example in the manual, section 18.8 as a basis. After taking small steps via plain C versions, finally, I made a simple cocoa app with entry an entry field for an integer, and a value field for the fibonacci value for the entry. Compiliation failed due to an inconsistency between /usr/local/lib/ocaml/caml/config.h and cocoa's ...Security.framework/cssmconfig.h Specifically in this sequence: #if defined(ARCH_INT64_TYPE) typedef ARCH_INT64_TYPE int64; typedef ARCH_UINT64_TYPE uint64; #else ... Here the typedef for uint64 is in conflict with the framework's typedef in cssmconfig.h: #ifndef _UINT64 typedef uint64_t uint64; #define _UINT64 #endif Here is the complete XCode compilation error output: ------ Compile error output: /usr/local/lib/ocaml/caml/config.h /usr/local/lib/ocaml/caml/config.h:130:26: error: typedef redefinition with different types ('unsigned long' vs 'uint64_t' (aka 'unsigned long long')) [3] In file included from /usr/local/lib/ocaml/caml/mlvalues.h:22: In file included from /usr/local/lib/ocaml/caml/callback.h:24: In file included from /Users/jr/test/OCaml-for-C/XCodeGUIVersion/OcamlFibTestCocoa/OcamlFibTestCocoa/main.m:10: Typedef redefinition with different types ('unsigned long' vs 'uint64_t' (aka 'unsigned long long')) in /usr/local/lib/ocaml/caml/config.h /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:53:18: note: previous definition is here ------ end compile error output The "here" refers to the file cssmconfig.h in the cocoa Security.framework. I did a temporary fix by commenting out the typedef for uint64 in .../caml/config.h, and everything worked fine. But this probably isn't the right solution! Further info: Using XCode 4.2 with Mac OS X Lion 10.7.4. When I installed OCaml, I used the source ocaml-3.12.1.tar. I did configure with no options. I followed the instructions in the INSTALL file exactly (as far as I can tell!). Best, John Velman