Closed ellson closed 4 years ago
This issue does not occur on Fedora31 using: gcc-9.2.1-1.fc31.x86_64 swig-4.0.1-3.fc31.x86_64 ocaml-4.08.1-0.rc2.1.fc31.x86_64
The version of ocaml on fc32 is: ocaml-4.09.0-3.fc32.x86_64
So perhaps the error is not the result of a change in swig, but instead change in gcc or in the latest ocaml?
I see similar issue wit Arch Linux that uses ocaml 4.09.0
example_wrap.c: In member function ‘virtual bool SwigDirector_shape::cover(double, double)’:
example_wrap.c:2098:43: error: invalid conversion from ‘const caml_value_t*’ {aka ‘const long int*’} to ‘caml_value_t*’ {aka ‘long int*’} [-fpermissive]
2098 | swig_ocaml_func_val = caml_named_value("swig_runmethod");
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
| |
| const caml_value_t* {aka const long int*}
I think newer version of ocaml modified API.
caml_named_value()
was modified to return a const value*
in OCaml 4.09.0 (ocaml/ocaml@9f0bebf). I have opened #1693 to fix this issue.
I got this error (and a few other similar errors) from swig generated code:
~~~~^~~~~~~~when building graphviz (www.graphviz.org) on Fedora32 (aka rawhide) using gcc-9.2.1-1.fc32.3.x86_64 swig-4.0.1-3.fc32.x86_64
I was able to work-around the issue by adding -fpermissive to the CPPFLAGS for this file.