[ocaml-ctypes] Build error when compiling Ctypes on centos 5
Thomas Braibant
thomas.braibant at gmail.com
Wed May 13 14:08:27 BST 2015
gcc c.c
c.c: In function ‘main’:
c.c:10: error: ‘ULLONG_MAX’ undeclared (first use in this function)
c.c:10: error: (Each undeclared identifier is reported only once
c.c:10: error: for each function it appears in.)
this is not surprising when you look at the output (attached) of gcc -dM -E
limits.h
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:
> > For some obscure reason, I need to compile Ctypes on centos 5.x in a
> hurry.
> > Unfortunately, I get the following error message in the compilation
> process
> >
> [...]
> >
> /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?
>
> #include <stdio.h>
> #include <limits.h>
> #include <stdint.h>
> #include <inttypes.h>
>
> int main(void)
> {
> printf("ULLONG_MAX: %llu\nUINT64_MAX: %" PRIu64"\n",
> ULLONG_MAX, UINT64_MAX);
> return 0;
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/ctypes/attachments/20150513/685a3040/attachment.html>
-------------- next part --------------
#define __DBL_MIN_EXP__ (-1021)
#define _POSIX2_BC_SCALE_MAX 99
#define RE_DUP_MAX (0x7fff)
#define __FLT_MIN__ 1.17549435e-38F
#define __flexarr []
#define __stub_fchflags
#define __CHAR_BIT__ 8
#define SHRT_MAX __SHRT_MAX__
#define PIPE_BUF 4096
#define MQ_PRIO_MAX 32768
#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
#define _POSIX2_BC_DIM_MAX 2048
#define _POSIX_TTY_NAME_MAX 9
#define __WCHAR_MAX__ 2147483647
#define __stub___kernel_rem_pio2l
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __USE_BSD 1
#define _POSIX2_BC_STRING_MAX 1000
#define __FLT_EVAL_METHOD__ 0
#define SHRT_MIN (-SHRT_MAX - 1)
#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
#define ARG_MAX 131072
#define SSIZE_MAX LONG_MAX
#define _POSIX_DELAYTIMER_MAX 32
#define XATTR_SIZE_MAX 65536
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define _POSIX_SYMLINK_MAX 255
#define PATH_MAX 4096
#define __LDBL_REDIR1(name,proto,alias) name proto
#define _LIMITS_H___
#define __always_inline __inline __attribute__ ((__always_inline__))
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define NAME_MAX 255
#define SCHAR_MAX __SCHAR_MAX__
#define __UINTMAX_TYPE__ long unsigned int
#define __linux 1
#define __stub_sigreturn
#define __unix 1
#define _POSIX_AIO_MAX 1
#define _POSIX_PIPE_BUF 512
#define __linux__ 1
#define SCHAR_MIN (-SCHAR_MAX - 1)
#define _POSIX_AIO_LISTIO_MAX 2
#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
#define __SCHAR_MAX__ 127
#define __USING_NAMESPACE_STD(name)
#define __KERNEL_STRICT_NAMES
#define __NTH(fct) __attribute__ ((__nothrow__)) fct
#define _POSIX_THREAD_THREADS_MAX 64
#define _POSIX_MQ_OPEN_MAX 8
#define _POSIX_LINK_MAX 8
#define COLL_WEIGHTS_MAX 255
#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
#define _POSIX_SOURCE 1
#define __stub___kernel_sinl
#define __attribute_used__ __attribute__ ((__used__))
#define _POSIX_CHILD_MAX 25
#define __USER_LABEL_PREFIX__
#define __GLIBC__ 2
#define __END_DECLS
#define __CONCAT(x,y) x ## y
#define __STDC_HOSTED__ 1
#define __GNU_LIBRARY__ 6
#define __DBL_DIG__ 15
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define _POSIX_NAME_MAX 14
#define RTSIG_MAX 32
#define __unix__ 1
#define __STDC_IEC_559__ 1
#define __STDC_ISO_10646__ 200009L
#define __DECIMAL_DIG__ 21
#define _POSIX2_RE_DUP_MAX 255
#define __USE_FORTIFY_LEVEL 0
#define __gnu_linux__ 1
#define MAX_INPUT 255
#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
#define _POSIX_LOGIN_NAME_MAX 9
#define DELAYTIMER_MAX 2147483647
#define __LDBL_HAS_QUIET_NAN__ 1
#define __THROW __attribute__ ((__nothrow__))
#define __GLIBC_HAVE_LONG_LONG 1
#define __GNUC__ 4
#define __MMX__ 1
#define __USE_SVID 1
#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
#define LONG_MAX __LONG_MAX__
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
#define _POSIX_HOST_NAME_MAX 255
#define NGROUPS_MAX 65536
#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
#define HOST_NAME_MAX 64
#define _POSIX_SEM_NSEMS_MAX 256
#define __DBL_MAX__ 1.7976931348623157e+308
#define _POSIX_SIGQUEUE_MAX 32
#define __DBL_HAS_INFINITY__ 1
#define _POSIX_NGROUPS_MAX 8
#define __USE_XOPEN2K 1
#define __END_NAMESPACE_C99
#define _POSIX_PATH_MAX 256
#define LONG_MIN (-LONG_MAX - 1L)
#define __USE_POSIX199506 1
#define _FEATURES_H 1
#define __stub_getmsg
#define __stub_setlogin
#define __stub_fattach
#define __stub___kernel_tanl
#define __DBL_MAX_EXP__ 1024
#define __WORDSIZE_COMPAT32 1
#define __SSE2_MATH__ 1
#define __amd64 1
#define _POSIX_TZNAME_MAX 6
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_RE_DUP_MAX 255
#define __bounded
#define __BEGIN_NAMESPACE_STD
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __stub_bdflush
#define _BITS_POSIX2_LIM_H 1
#define __ptrvalue
#define __GXX_ABI_VERSION 1002
#define __FLT_MIN_EXP__ (-125)
#define __x86_64 1
#define _POSIX_CLOCKRES_MIN 20000000
#define __DBL_MIN__ 2.2250738585072014e-308
#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
#define __LP64__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define _POSIX_SYMLOOP_MAX 8
#define __nonnull(params) __attribute__ ((__nonnull__ params))
#define CHAR_MAX SCHAR_MAX
#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
#define _POSIX_HIWAT _POSIX_PIPE_BUF
#define __REGISTER_PREFIX__
#define LOGIN_NAME_MAX 256
#define CHAR_BIT __CHAR_BIT__
#define __attribute_pure__ __attribute__ ((__pure__))
#define __USE_POSIX2 1
#define __NO_INLINE__ 1
#define __warndecl(name,msg) extern void name (void)
#define CHAR_MIN SCHAR_MIN
#define MAX_CANON 255
#define __FLT_MANT_DIG__ 24
#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
#define __VERSION__ "4.1.2 20080704 (Red Hat 4.1.2-52)"
#define AIO_PRIO_DELTA_MAX 20
#define _SYS_CDEFS_H 1
#define _BSD_SOURCE 1
#define LINE_MAX _POSIX2_LINE_MAX
#define __STRING(x) #x
#define __unbounded
#define _POSIX2_EXPR_NEST_MAX 32
#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#define _POSIX_STREAM_MAX 8
#define __stub_gtty
#define __stub_sstk
#define __wur
#define __STDC_IEC_559_COMPLEX__ 1
#define _POSIX_RTSIG_MAX 8
#define USHRT_MAX (SHRT_MAX * 2 + 1)
#define unix 1
#define _POSIX_MAX_INPUT 255
#define __SIZE_TYPE__ long unsigned int
#define XATTR_LIST_MAX 65536
#define _POSIX_QLIMIT 1
#define __ELF__ 1
#define __stub___kernel_cosl
#define __stub_lutimes
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __GNUC_RH_RELEASE__ 52
#define _POSIX_C_SOURCE 200112L
#define PTHREAD_STACK_MIN 16384
#define __SSE_MATH__ 1
#define __long_double_t long double
#define _POSIX_ARG_MAX 4096
#define __k8 1
#define __stub_feupdateenv
#define __LDBL_REDIR(name,proto) name proto
#define UCHAR_MAX (SCHAR_MAX * 2 + 1)
#define __restrict_arr __restrict
#define __USE_MISC 1
#define _GCC_LIMITS_H_
#define __LDBL_DIG__ 18
#define __x86_64__ 1
#define _POSIX2_COLL_WEIGHTS_MAX 2
#define __stub_revoke
#define INT_MAX __INT_MAX__
#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
#define _POSIX2_LINE_MAX 2048
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 9223372036854775807L
#define __FLT_HAS_INFINITY__ 1
#define __bos0(ptr) __builtin_object_size (ptr, 0)
#define _POSIX2_CHARCLASS_NAME_MAX 14
#define __USING_NAMESPACE_C99(name)
#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
#define INT_MIN (-INT_MAX - 1)
#define __stub_lchmod
#define __PMT(args) args
#define _LINUX_LIMITS_H
#define linux 1
#define __WORDSIZE 64
#define __BEGIN_DECLS
#define __LDBL_MANT_DIG__ 64
#define __USE_ANSI 1
#define __k8__ 1
#define __WCHAR_TYPE__ int
#define __stub_fdetach
#define __stub_chflags
#define TTY_NAME_MAX 32
#define __USE_POSIX 1
#define __FLT_DIG__ 6
#define __LDBL_REDIR_DECL(name)
#define __INT_MAX__ 2147483647
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
#define UINT_MAX (INT_MAX * 2U + 1U)
#define __FLT_MAX_EXP__ 128
#define __ptr_t void *
#define __DBL_MANT_DIG__ 53
#define _POSIX_SEM_VALUE_MAX 32767
#define __GLIBC_MINOR__ 5
#define __WINT_TYPE__ unsigned int
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
#define _POSIX_MAX_CANON 255
#define __amd64__ 1
#define __USE_POSIX199309 1
#define __LDBL_MAX_EXP__ 16384
#define __LDBL_MAX_10_EXP__ 4932
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
#define XATTR_NAME_MAX 255
#define _SVID_SOURCE 1
#define _LP64 1
#define __stub_stty
#define __GNUC_PATCHLEVEL__ 2
#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
#define __END_NAMESPACE_STD
#define CHARCLASS_NAME_MAX 2048
#define __LDBL_HAS_INFINITY__ 1
#define _POSIX_UIO_MAXIOV 16
#define _POSIX2_BC_BASE_MAX 99
#define _POSIX_MQ_PRIO_MAX 32
#define _LIBC_LIMITS_H_ 1
#define __INTMAX_MAX__ 9223372036854775807L
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __BEGIN_NAMESPACE_C99
#define CHILD_MAX 999
#define __FLT_MAX__ 3.40282347e+38F
#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
#define __SSE2__ 1
#define __FLT_MIN_10_EXP__ (-37)
#define __INTMAX_TYPE__ long int
#define _BITS_POSIX1_LIM_H 1
#define _POSIX_TIMER_MAX 32
#define __GNUC_MINOR__ 1
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __STDC__ 1
#define __attribute_malloc__ __attribute__ ((__malloc__))
#define __PTRDIFF_TYPE__ long int
#define __attribute_noinline__ __attribute__ ((__noinline__))
#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
#define PTHREAD_KEYS_MAX 1024
#define __LDBL_MIN_10_EXP__ (-4931)
#define __attribute_deprecated__ __attribute__ ((__deprecated__))
#define _POSIX_OPEN_MAX 20
#define _POSIX_THREAD_KEYS_MAX 128
#define __GNUC_GNU_INLINE__ 1
#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
#define MB_LEN_MAX 16
#define __stub_putmsg
#define __P(args) args
More information about the Ctypes
mailing list