Skip to content

[5.3 regression] Failure to compile on Cygwin #13421

@kit-ty-kate

Description

@kit-ty-kate

Using the 5.3 branch at a4e7cbd, ocaml fails to compile on cygwin when called with these arguments:

./configure --disable-debugger --disable-debug-runtime --disable-ocamldoc --disable-installing-bytecode-programs --disable-installing-source-artifacts
make -j world.opt
runtime/alloc.c:33:18: error: 'caml_alloc' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  CC runtime/bigarray.bpic.o
   33 | CAMLexport value caml_alloc (mlsize_t wosize, tag_t tag)
      |                  ^~~~~~~~~~
runtime/alloc.c:106:18: error: 'caml_alloc_1' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  106 | CAMLexport value caml_alloc_1 (tag_t tag, value a)
      |                  ^~~~~~~~~~~~
runtime/alloc.c:111:18: error: 'caml_alloc_2' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  111 | CAMLexport value caml_alloc_2 (tag_t tag, value a, value b)
      |                  ^~~~~~~~~~~~
runtime/alloc.c:116:18: error: 'caml_alloc_3' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  CC runtime/blake2.bpic.o
  116 | CAMLexport value caml_alloc_3 (tag_t tag, value a, value b, value c)
      |                  ^~~~~~~~~~~~
runtime/alloc.c:121:18: error: 'caml_alloc_4' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  121 | CAMLexport value caml_alloc_4 (tag_t tag, value a, value b, value c, value d)
      |                  ^~~~~~~~~~~~
runtime/alloc.c:126:18: error: 'caml_alloc_5' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  126 | CAMLexport value caml_alloc_5 (tag_t tag, value a, value b, value c, value d,
      |                  ^~~~~~~~~~~~
runtime/alloc.c:132:18: error: 'caml_alloc_6' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  132 | CAMLexport value caml_alloc_6 (tag_t tag, value a, value b, value c, value d,
      |                  ^~~~~~~~~~~~
runtime/alloc.c:138:18: error: 'caml_alloc_7' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  138 | CAMLexport value caml_alloc_7 (tag_t tag, value a, value b, value c, value d,
      |                  ^~~~~~~~~~~~
runtime/alloc.c:144:18: error: 'caml_alloc_8' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  144 | CAMLexport value caml_alloc_8 (tag_t tag, value a, value b, value c, value d,
      |                  ^~~~~~~~~~~~
runtime/alloc.c:150:18: error: 'caml_alloc_9' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  150 | CAMLexport value caml_alloc_9 (tag_t tag, value a, value b, value c, value d,
      |                  ^~~~~~~~~~~~
runtime/alloc.c:156:18: error: 'caml_alloc_small' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
  156 | CAMLexport value caml_alloc_small (mlsize_t wosize, tag_t tag)
      |                  ^~~~~~~~~~~~~~~~
runtime/alloc.c:169:18: error: 'caml_alloc_tuple' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
  169 | CAMLexport value caml_alloc_tuple(mlsize_t n)
      |                  ^~~~~~~~~~~~~~~~
[...]

This seems to be a regression in 5.3 as 5.2 compiles just fine with the same arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions