[ocaml-ctypes] Build error when compiling Ctypes on centos 5

Thomas Braibant thomas.braibant at gmail.com
Wed May 13 14:46:45 BST 2015


Follow up issue https://github.com/ocamllabs/ocaml-ctypes/issues/302

On Wed, May 13, 2015 at 3:28 PM, Thomas Braibant <thomas.braibant at gmail.com>
wrote:

> I am ashamed by this patch, but it seems to be a functional workaround...
>
>
> https://github.com/cryptosense/ocaml-ctypes/commit/8be776abc7d805e1c09ca20b360607a7ff1f8fd6
>
> On Wed, May 13, 2015 at 3:25 PM, Jeremy Yallop <yallop at gmail.com> wrote:
>
>> On 13 May 2015 at 14:08, Thomas Braibant <thomas.braibant at gmail.com>
>> wrote:
>> > On Wed, May 13, 2015 at 3:03 PM, Jeremy Yallop <yallop at gmail.com>
>> wrote:
>> >> On 13 May 2015 at 13:51, Thomas Braibant <thomas.braibant at gmail.com>
>> >> wrote:
>> >> >
>> /home/vagrant/ocamlbrew/ocaml-4.02.1/.opam/4.02.1+PIC/build/ctypes.0.4.0/src/ctypes/ctypes_primitives.h:99:3:
>> >> > error: #error "No suitable OCaml type available for representing long
>> >> > longs"
>> >>
>> >> That's odd.  Could you post the output of the following program?
>> >
>> > gcc c.c
>> > c.c: In function ‘main’:
>> > c.c:10: error: ‘ULLONG_MAX’ undeclared (first use in this function)
>>
>> Hmm.  I didn't realise that long long support was such a recent
>> addition to GCC.  Do you know whether it supports any 64-bit integer
>> types?  If it supports int64_t and uint64_t, for example, then you
>> might be able to get quite far with running something like this on the
>> ctypes code:
>>
>>    find . -name '*.c' -o -name '*.h' | xargs sed -i 's!unsigned long
>> long!uint64_t!g; s!long long!int64_t!g; s!LLONG!INT64!g'
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/ctypes/attachments/20150513/fd3bfab5/attachment.html>


More information about the Ctypes mailing list