Skip to content

Instantly share code, notes, and snippets.

@phi-gamma
Created May 8, 2015 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phi-gamma/d756d3165a0770ee48ac to your computer and use it in GitHub Desktop.
Save phi-gamma/d756d3165a0770ee48ac to your computer and use it in GitHub Desktop.
ocamlc -ccopt "-I/usr/lib/ocaml -DZ_OCAML_HASH -DZ_OCAML_COMPARE_EXT -DHAS_GMP -DZ_ELF -DZ_DOT_LABEL_PREFIX -O3 -Wall -Wextra " -c caml_z.c
In file included from /usr/include/stdio.h:33:0,
from caml_z.c:24:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/stddef.h:212:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
typedef __SIZE_TYPE__ size_t;
^
In file included from caml_z.c:24:0:
/usr/include/stdio.h:48:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
typedef struct _IO_FILE FILE;
^
/usr/include/stdio.h:64:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
typedef struct _IO_FILE __FILE;
^
In file included from /usr/include/libio.h:56:0,
from /usr/include/stdio.h:74,
from caml_z.c:24:
/usr/include/sys/cdefs.h:41:20: error: missing binary operator before token "("
# if __GNUC_PREREQ (4, 6) && !defined _LIBC
^
/usr/include/sys/cdefs.h:54:44: error: missing binary operator before token "("
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
^
/usr/include/sys/cdefs.h:59:44: error: missing binary operator before token "("
# if defined __cplusplus && __GNUC_PREREQ (2,8)
^
/usr/include/sys/cdefs.h:135:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4,3)
^
/usr/include/sys/cdefs.h:148:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,97)
^
/usr/include/sys/cdefs.h:210:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,96)
^
/usr/include/sys/cdefs.h:218:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4, 3)
^
/usr/include/sys/cdefs.h:228:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,96)
^
/usr/include/sys/cdefs.h:235:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,5)
^
/usr/include/sys/cdefs.h:244:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,1)
^
/usr/include/sys/cdefs.h:253:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,2)
^
/usr/include/sys/cdefs.h:265:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,8)
^
/usr/include/sys/cdefs.h:275:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,97)
^
/usr/include/sys/cdefs.h:284:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,3)
^
/usr/include/sys/cdefs.h:292:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,4)
^
/usr/include/sys/cdefs.h:306:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,2)
^
/usr/include/sys/cdefs.h:314:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4,3)
^
/usr/include/sys/cdefs.h:329:44: error: missing binary operator before token "("
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
^
/usr/include/sys/cdefs.h:348:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4,3)
^
/usr/include/sys/cdefs.h:357:20: error: missing binary operator before token "("
#if !__GNUC_PREREQ (2,8)
^
/usr/include/sys/cdefs.h:362:20: error: missing binary operator before token "("
#if !__GNUC_PREREQ (2,92)
^
/usr/include/sys/cdefs.h:369:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,1) && !defined __GNUG__
^
/usr/include/sys/cdefs.h:394:25: error: missing binary operator before token "("
&& !__GNUC_PREREQ (4,7))
^
In file included from /usr/include/stdio.h:74:0,
from caml_z.c:24:
/usr/include/libio.h:306:3: error: unknown type name ‘size_t’
size_t __pad5;
^
/usr/include/libio.h:310:67: error: ‘size_t’ undeclared here (not in a function)
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
^
/usr/include/libio.h:338:62: error: expected declaration specifiers or ‘...’ before ‘size_t’
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
^
/usr/include/libio.h:347:6: error: expected declaration specifiers or ‘...’ before ‘size_t’
size_t __n);
^
/usr/include/libio.h:469:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_sgetn’
extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t);
^
In file included from caml_z.c:24:0:
/usr/include/stdio.h:195:8: error: unknown type name ‘FILE’
extern FILE *tmpfile (void) __wur;
^
/usr/include/stdio.h:237:20: error: unknown type name ‘FILE’
extern int fclose (FILE *__stream);
^
/usr/include/stdio.h:242:20: error: unknown type name ‘FILE’
extern int fflush (FILE *__stream);
^
/usr/include/stdio.h:272:8: error: unknown type name ‘FILE’
extern FILE *fopen (const char *__restrict __filename,
^
/usr/include/stdio.h:278:8: error: unknown type name ‘FILE’
extern FILE *freopen (const char *__restrict __filename,
^
/usr/include/stdio.h:280:9: error: unknown type name ‘FILE’
FILE *__restrict __stream) __wur;
^
/usr/include/stdio.h:332:21: error: unknown type name ‘FILE’
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
^
/usr/include/stdio.h:336:21: error: unknown type name ‘FILE’
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
^
/usr/include/stdio.h:337:20: error: expected declaration specifiers or ‘...’ before ‘size_t’
int __modes, size_t __n) __THROW;
^
/usr/include/stdio.h:356:21: error: unknown type name ‘FILE’
extern int fprintf (FILE *__restrict __stream,
^
/usr/include/stdio.h:371:22: error: unknown type name ‘FILE’
extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
^
/usr/include/stdio.h:425:20: error: unknown type name ‘FILE’
extern int fscanf (FILE *__restrict __stream,
^
/usr/include/stdio.h:531:19: error: unknown type name ‘FILE’
extern int fgetc (FILE *__stream);
^
/usr/include/stdio.h:532:18: error: unknown type name ‘FILE’
extern int getc (FILE *__stream);
^
/usr/include/stdio.h:573:28: error: unknown type name ‘FILE’
extern int fputc (int __c, FILE *__stream);
^
/usr/include/stdio.h:574:27: error: unknown type name ‘FILE’
extern int putc (int __c, FILE *__stream);
^
/usr/include/stdio.h:622:52: error: unknown type name ‘FILE’
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
^
/usr/include/stdio.h:689:47: error: unknown type name ‘FILE’
extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
^
/usr/include/stdio.h:702:29: error: unknown type name ‘FILE’
extern int ungetc (int __c, FILE *__stream);
^
/usr/include/stdio.h:709:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fread’
extern size_t fread (void *__restrict __ptr, size_t __size,
^
/usr/include/stdio.h:715:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwrite’
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
^
/usr/include/stdio.h:749:19: error: unknown type name ‘FILE’
extern int fseek (FILE *__stream, long int __off, int __whence);
^
/usr/include/stdio.h:754:24: error: unknown type name ‘FILE’
extern long int ftell (FILE *__stream) __wur;
^
/usr/include/stdio.h:759:21: error: unknown type name ‘FILE’
extern void rewind (FILE *__stream);
^
/usr/include/stdio.h:798:21: error: unknown type name ‘FILE’
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
^
/usr/include/stdio.h:803:21: error: unknown type name ‘FILE’
extern int fsetpos (FILE *__stream, const fpos_t *__pos);
^
/usr/include/stdio.h:826:23: error: unknown type name ‘FILE’
extern void clearerr (FILE *__stream) __THROW;
^
/usr/include/stdio.h:828:18: error: unknown type name ‘FILE’
extern int feof (FILE *__stream) __THROW __wur;
^
/usr/include/stdio.h:830:20: error: unknown type name ‘FILE’
extern int ferror (FILE *__stream) __THROW __wur;
^
In file included from caml_z.c:25:0:
/usr/include/stdlib.h:139:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ctype_get_mb_cur_max’
extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
^
/usr/include/stdlib.h:466:22: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
^
/usr/include/stdlib.h:468:22: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *calloc (size_t __nmemb, size_t __size)
^
/usr/include/stdlib.h:468:38: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *calloc (size_t __nmemb, size_t __size)
^
/usr/include/stdlib.h:480:36: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *realloc (void *__ptr, size_t __size)
^
/usr/include/stdlib.h:755:9: error: expected declaration specifiers or ‘...’ before ‘size_t’
size_t __nmemb, size_t __size, __compar_fn_t __compar)
^
/usr/include/stdlib.h:755:25: error: expected declaration specifiers or ‘...’ before ‘size_t’
size_t __nmemb, size_t __size, __compar_fn_t __compar)
^
/usr/include/stdlib.h:764:34: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void qsort (void *__base, size_t __nmemb, size_t __size,
^
/usr/include/stdlib.h:764:50: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void qsort (void *__base, size_t __nmemb, size_t __size,
^
/usr/include/stdlib.h:862:36: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern int mblen (const char *__s, size_t __n) __THROW;
^
/usr/include/stdlib.h:866:34: error: expected declaration specifiers or ‘...’ before ‘size_t’
const char *__restrict __s, size_t __n) __THROW;
^
/usr/include/stdlib.h:873:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mbstowcs’
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
^
/usr/include/stdlib.h:876:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wcstombs’
extern size_t wcstombs (char *__restrict __s,
^
In file included from caml_z.c:26:0:
/usr/include/string.h:39:69: error: missing binary operator before token "("
#if defined __cplusplus && (__cplusplus >= 199711L || __GNUC_PREREQ (4, 4))
^
/usr/include/string.h:47:8: error: expected declaration specifiers or ‘...’ before ‘size_t’
size_t __n) __THROW __nonnull ((1, 2));
^
/usr/include/string.h:50:56: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *memmove (void *__dest, const void *__src, size_t __n)
^
/usr/include/string.h:66:42: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
^
/usr/include/string.h:69:56: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern int memcmp (const void *__s1, const void *__s2, size_t __n)
^
/usr/include/string.h:96:48: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void *memchr (const void *__s, int __c, size_t __n)
^
/usr/include/string.h:133:39: error: expected declaration specifiers or ‘...’ before ‘size_t’
const char *__restrict __src, size_t __n)
^
/usr/include/string.h:141:9: error: expected declaration specifiers or ‘...’ before ‘size_t’
size_t __n) __THROW __nonnull ((1, 2));
^
/usr/include/string.h:147:57: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern int strncmp (const char *__s1, const char *__s2, size_t __n)
^
/usr/include/string.h:154:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strxfrm’
extern size_t strxfrm (char *__restrict __dest,
^
/usr/include/string.h:284:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strcspn’
extern size_t strcspn (const char *__s, const char *__reject)
^
/usr/include/string.h:288:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strspn’
extern size_t strspn (const char *__s, const char *__accept)
^
/usr/include/string.h:398:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘strlen’
extern size_t strlen (const char *__s)
^
/usr/include/string.h:450:33: error: expected declaration specifiers or ‘...’ before ‘size_t’
extern void __bzero (void *__s, size_t __n) __THROW __nonnull ((1));
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:97:21: error: missing binary operator before token "("
# if !__GNUC_PREREQ (3, 0)
^
/usr/include/bits/string2.h:193:20: error: missing binary operator before token "("
# if __GNUC_PREREQ (2, 91)
^
/usr/include/bits/string2.h:394:20: error: missing binary operator before token "("
# if __GNUC_PREREQ (3, 2)
^
/usr/include/bits/string2.h:410:58: error: missing binary operator before token "("
#if (!defined _HAVE_STRING_ARCH_strcpy && !__GNUC_PREREQ (3, 0)) \
^
/usr/include/bits/string2.h:759:20: error: missing binary operator before token "("
# if __GNUC_PREREQ (3, 2)
^
/usr/include/bits/string2.h:783:22: error: missing binary operator before token "("
# elif __GNUC_PREREQ (3, 2)
^
/usr/include/bits/string2.h:798:20: error: missing binary operator before token "("
# if __GNUC_PREREQ (3, 2)
^
/usr/include/bits/string2.h:910:21: error: missing binary operator before token "("
# if __GNUC_PREREQ (3, 2)
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:945:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t __strcspn_c1 (const char *__s, int __reject);
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:945:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c1’
__STRING_INLINE size_t __strcspn_c1 (const char *__s, int __reject);
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:946:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:947:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c1’
__strcspn_c1 (const char *__s, int __reject)
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:955:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t __strcspn_c2 (const char *__s, int __reject1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:955:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c2’
__STRING_INLINE size_t __strcspn_c2 (const char *__s, int __reject1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:957:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:958:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c2’
__strcspn_c2 (const char *__s, int __reject1, int __reject2)
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:967:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t __strcspn_c3 (const char *__s, int __reject1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:967:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c3’
__STRING_INLINE size_t __strcspn_c3 (const char *__s, int __reject1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:969:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:970:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strcspn_c3’
__strcspn_c3 (const char *__s, int __reject1, int __reject2,
^
/usr/include/bits/string2.h:986:21: error: missing binary operator before token "("
# if __GNUC_PREREQ (3, 2)
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1021:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t __strspn_c1 (const char *__s, int __accept);
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1021:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strspn_c1’
__STRING_INLINE size_t __strspn_c1 (const char *__s, int __accept);
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1022:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1023:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strspn_c1’
__strspn_c1 (const char *__s, int __accept)
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1032:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t __strspn_c2 (const char *__s, int __accept1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1032:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strspn_c2’
__STRING_INLINE size_t __strspn_c2 (const char *__s, int __accept1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1034:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1035:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strspn_c2’
__strspn_c2 (const char *__s, int __accept1, int __accept2)
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1044:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t __strspn_c3 (const char *__s, int __accept1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1044:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strspn_c3’
__STRING_INLINE size_t __strspn_c3 (const char *__s, int __accept1,
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1046:1: error: unknown type name ‘__extern_inline’
__STRING_INLINE size_t
^
In file included from /usr/include/string.h:634:0,
from caml_z.c:26:
/usr/include/bits/string2.h:1047:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__strspn_c3’
__strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3)
^
/usr/include/bits/string2.h:1062:21: error: missing binary operator before token "("
# if __GNUC_PREREQ (3, 2)
^
/usr/include/bits/string2.h:1097:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *__strpbrk_c2 (const char *__s, int __accept1,
^
/usr/include/bits/string2.h:1099:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *
^
/usr/include/bits/string2.h:1108:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *__strpbrk_c3 (const char *__s, int __accept1,
^
/usr/include/bits/string2.h:1110:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *
^
/usr/include/bits/string2.h:1124:57: error: missing binary operator before token "("
#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97)
^
/usr/include/bits/string2.h:1147:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
^
/usr/include/bits/string2.h:1148:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *
^
/usr/include/bits/string2.h:1197:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *__strsep_1c (char **__s, char __reject);
^
/usr/include/bits/string2.h:1198:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *
^
/usr/include/bits/string2.h:1207:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2);
^
/usr/include/bits/string2.h:1208:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *
^
/usr/include/bits/string2.h:1234:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2,
^
/usr/include/bits/string2.h:1236:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
__STRING_INLINE char *
^
In file included from /usr/include/math.h:32:0,
from caml_z.c:27:
/usr/include/bits/huge_val.h:26:18: error: missing binary operator before token "("
#if __GNUC_PREREQ(3,3)
^
/usr/include/bits/huge_val.h:28:20: error: missing binary operator before token "("
#elif __GNUC_PREREQ(2,96)
^
In file included from caml_z.c:27:0:
/usr/include/math.h:409:42: error: missing binary operator before token "("
#if defined __USE_ISOC99 && __GNUC_PREREQ(2,97)
^
In file included from caml_z.c:31:0:
/usr/include/gmp.h:482:57: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t),
^
/usr/include/gmp.h:483:11: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
void *(*) (void *, size_t, size_t),
^
/usr/include/gmp.h:487:58: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t),
^
/usr/include/gmp.h:488:11: error: expected ‘;’, ‘,’ or ‘)’ before ‘void’
void *(**) (void *, size_t, size_t),
^
/usr/include/gmp.h:545:33: error: unknown type name ‘FILE’
__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...);
^
/usr/include/gmp.h:562:42: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...);
^
/usr/include/gmp.h:597:32: error: unknown type name ‘FILE’
__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...);
^
/usr/include/gmp.h:748:42: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr);
^
/usr/include/gmp.h:748:57: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr);
^
/usr/include/gmp.h:748:70: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr);
^
/usr/include/gmp.h:854:42: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *);
^
/usr/include/gmp.h:854:55: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *);
^
/usr/include/gmp.h:854:68: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *);
^
/usr/include/gmp.h:882:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *);
^
/usr/include/gmp.h:882:45: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *);
^
/usr/include/gmp.h:887:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int);
^
/usr/include/gmp.h:887:45: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int);
^
/usr/include/gmp.h:957:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr);
^
/usr/include/gmp.h:957:36: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr);
^
/usr/include/gmp.h:962:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr);
^
/usr/include/gmp.h:962:36: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr);
^
/usr/include/gmp.h:1048:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE;
^
/usr/include/gmp.h:1052:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE;
^
/usr/include/gmp.h:1195:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int);
^
/usr/include/gmp.h:1195:45: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int);
^
/usr/include/gmp.h:1214:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr);
^
/usr/include/gmp.h:1214:36: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr);
^
/usr/include/gmp.h:1334:60: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr);
^
/usr/include/gmp.h:1365:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int);
^
/usr/include/gmp.h:1365:45: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int);
^
/usr/include/gmp.h:1385:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr);
^
/usr/include/gmp.h:1385:36: error: unknown type name ‘FILE’
__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr);
^
/usr/include/gmp.h:1385:49: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr);
^
/usr/include/gmp.h:1428:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE;
^
/usr/include/gmp.h:1520:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t);
^
/usr/include/gmp.h:1585:70: error: expected declaration specifiers or ‘...’ before ‘size_t’
__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int);
^
/usr/include/gmp.h:1588:16: error: unknown type name ‘size_t’
__GMP_DECLSPEC size_t mpn_sizeinbase (mp_srcptr, mp_size_t, int);
^
/usr/include/gmp.h:1860:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__gmpz_size’
mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW
^
In file included from /usr/lib/ocaml/caml/mlvalues.h:21:0,
from zarith.h:29,
from caml_z.c:38:
/usr/lib/ocaml/caml/misc.h:31:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asize_t’
typedef size_t asize_t;
^
In file included from caml_z.c:45:0:
/usr/lib/ocaml/caml/memory.h:38:1: warning: parameter names (without types) in function declaration
CAMLextern void * caml_stat_alloc (asize_t); /* Size in bytes. */
^
/usr/lib/ocaml/caml/memory.h:40:45: error: unknown type name ‘asize_t’
CAMLextern void * caml_stat_resize (void *, asize_t); /* Size in bytes. */
^
/usr/lib/ocaml/caml/memory.h:41:28: error: unknown type name ‘asize_t’
char *caml_alloc_for_heap (asize_t request); /* Size in bytes. */
^
caml_z.c: In function ‘ml_z_dump’:
caml_z.c:227:3: warning: implicit declaration of function ‘fflush’ [-Wimplicit-function-declaration]
fflush(stdout);
^
caml_z.c: In function ‘ml_z_cpy_limb’:
caml_z.c:318:3: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration]
memcpy(dst, src, sz * sizeof(mp_limb_t));
^
caml_z.c:318:3: warning: incompatible implicit declaration of built-in function ‘memcpy’
caml_z.c: In function ‘ml_z_dup_limb’:
caml_z.c:324:3: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
mp_limb_t* r = (mp_limb_t*) malloc(sz * sizeof(mp_limb_t));
^
caml_z.c:324:31: warning: incompatible implicit declaration of built-in function ‘malloc’
mp_limb_t* r = (mp_limb_t*) malloc(sz * sizeof(mp_limb_t));
^
caml_z.c:325:3: warning: incompatible implicit declaration of built-in function ‘memcpy’
memcpy(r, src, sz * sizeof(mp_limb_t));
^
caml_z.c: In function ‘ml_z_of_string_base’:
caml_z.c:567:3: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
sz = strlen(d);
^
caml_z.c:567:8: warning: incompatible implicit declaration of built-in function ‘strlen’
sz = strlen(d);
^
caml_z.c:571:23: warning: incompatible implicit declaration of built-in function ‘malloc’
char* dd = (char*)malloc(strlen(d)+1);
^
caml_z.c:582:5: warning: implicit declaration of function ‘__gmpn_set_str’ [-Wimplicit-function-declaration]
sz2 = mpn_set_str(Z_LIMB(r), (unsigned char*)dd, sz, base);
^
caml_z.c: In function ‘ml_z_format’:
caml_z.c:777:17: warning: incompatible implicit declaration of built-in function ‘malloc’
buf = (char*) malloc(max_size);
^
caml_z.c:797:16: warning: incompatible implicit declaration of built-in function ‘strlen’
for (i = strlen(prefix); i > 0; i--, size_dst++)
^
caml_z.c:805:16: warning: incompatible implicit declaration of built-in function ‘strlen’
for (i = strlen(prefix); i > 0; i--, size_dst++)
^
caml_z.c:813:14: warning: incompatible implicit declaration of built-in function ‘strlen’
width -= strlen(prefix) + (sign ? 1 : 0);
^
caml_z.c: In function ‘ml_z_to_bits’:
caml_z.c:915:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
memset(p, 0, size_arg * sizeof(mp_limb_t));
^
caml_z.c:915:3: warning: incompatible implicit declaration of built-in function ‘memset’
caml_z.c: In function ‘ml_z_from_mpz’:
caml_z.c:2388:10: error: expected ‘;’ before ‘sz’
size_t sz = mpz_size(op);
^
caml_z.c:2389:18: error: ‘sz’ undeclared (first use in this function)
r = ml_z_alloc(sz);
^
caml_z.c:294:45: note: in definition of macro ‘ml_z_alloc’
caml_alloc_custom(&ml_z_custom_ops, (1 + (sz)) * sizeof(value), 0, 1)
^
caml_z.c:2389:18: note: each undeclared identifier is reported only once for each function it appears in
r = ml_z_alloc(sz);
^
caml_z.c:294:45: note: in definition of macro ‘ml_z_alloc’
caml_alloc_custom(&ml_z_custom_ops, (1 + (sz)) * sizeof(value), 0, 1)
^
caml_z.c:2392:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
project.mak:141: recipe for target 'caml_z.o' failed
make: *** [caml_z.o] Error 2
@phi-gamma
Copy link
Author

Resolved by erasing borked $PATH; looks like /usr/lib/glib-2.0/include/ was the culprit.
Removing it allows zarith to compile. HTH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment