opam icon indicating copy to clipboard operation
opam copied to clipboard

prims.c:1619:3: error: missing terminating " character

Open Simn opened this issue 2 years ago • 0 comments

I'm sure this is some sort of setup issue on my end, but I'm currently seeing this when running the make cold step of the "How to Test opam on Windows" instructions:

x86_64-w64-mingw32-gcc -c -O2 -fno-strict-aliasing -fwrapv -mms-bitfields -Wno-unused -Wall -Wdeclaration-after-statement -fexcess-precision=standard -fno-tree-vrp -g  -I ../flexdll -DCAML_NAME_SPACE -D__USE_MINGW_ANSI_STDIO=0 -DUNICODE -D_UNICODE -DWINDOWS_UNICODE=1 -DCAMLDLLIMPORT=  \
  -o prims.o prims.c
prims.c:1619:3: warning: missing terminating " character
prims.c:1619:3: error: missing terminating " character

The file in question looks like this:

char * caml_names_of_builtin_cprim[] = {
  "caml_abs_float
",
  "caml_acos_float
",
  "caml_acosh_float
",
  "caml_add_float
",

Fixing this by hand makes compilation run quite a bit longer, until it runs into this:

../../ocamlc.opt.exe -g -nostdlib -I ../../stdlib -o extract_crc.exe dynlink.cma byte/dynlink_compilerlibs.cmo extract_crc.cmo
[1mFile "_none_", line 1[0m:
[1;31mError[0m: Error while linking ../../stdlib\stdlib.cma(Stdlib):
       The external function `caml_ml_input' is not available

Edit: I should mention that this happens when building inside cmd. It works fine inside the cygwin shell, which I usually use for all opam things anyway. The instructions make it sound like cmd should be fine too though.

Simn avatar Jan 05 '24 21:01 Simn