Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] Conflict between .../caml/config.h and Cocoa Security.framework
@ 2012-05-16 18:35 John Velman
  0 siblings, 0 replies; only message in thread
From: John Velman @ 2012-05-16 18:35 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-16 18:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 18:35 [Caml-list] Conflict between .../caml/config.h and Cocoa Security.framework John Velman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox