Variable-type mismatch for memcpy()
Steps to reproduce
- graphviz-2.49.0
- swig-4.0.2 (via fink)
- ocaml-4.12.0 (via fink)
- a ton of other external libs via fink, almost all at approx latest upstream versions
Do you want the full mile of ./configure flags and output? I'll include key parts that seem relevant for now:
$ ./configure [ton of flags, none related to swig/ocaml]
[...]
checking for swig... swig
[...]
checking for Lua compiling and linking... checking for ocaml... ocaml
checking for ocamlopt... ocamlopt
checking caml/mlvalues.h usability... yes
checking caml/mlvalues.h presence... yes
checking for caml/mlvalues.h... yes
[...]
swig: Yes ( 4.0.2 )
[...]
gv_ocaml: Yes
$ make V=1
[...]
SWIG:1: Warning 524: Experimental target language. Target language OCaml specified by -ocaml is an experimental language. Please read about SWIG experimental languages, http://swig.org/Doc4.0/Introduction.html#Introduction_experimental_status.
mv gv_ocaml.cpp gv_ocaml.cpp.orig
sed '/int caml_array_length/d' gv_ocaml.cpp.orig > gv_ocaml.cpp
rm gv_ocaml.cpp.orig
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib/gvc -I../../lib/common -I../../lib/cgraph -I../../lib/cdt -I../../lib/pathplan -DDEMAND_LOADING=1 -I/sw/lib/ocaml -Dint64=int64_t -fpermissive -I/sw/include -Wno-unused-function -Wno-unused-variable -g -O2 -fPIE -fPIC -MT libgv_ocaml_la-gv_ocaml.lo -MD -MP -MF .deps/libgv_ocaml_la-gv_ocaml.Tpo -c -o libgv_ocaml_la-gv_ocaml.lo `test -f 'gv_ocaml.cpp' || echo './'`gv_ocaml.cpp
libtool: compile: g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../.. -I../../lib -I../../lib/gvc -I../../lib/common -I../../lib/cgraph -I../../lib/cdt -I../../lib/pathplan -DDEMAND_LOADING=1 -I/sw/lib/ocaml -Dint64=int64_t -fpermissive -I/sw/include -Wno-unused-function -Wno-unused-variable -g -O2 -fPIC -MT libgv_ocaml_la-gv_ocaml.lo -MD -MP -MF .deps/libgv_ocaml_la-gv_ocaml.Tpo -c gv_ocaml.cpp -fno-common -DPIC -o .libs/libgv_ocaml_la-gv_ocaml.o
gv_ocaml.cpp:1324:2: error: no matching function for call to 'memcpy'
memcpy(String_val(SWIG_Field(vv,0)),p,len);
^~~~~~
/usr/include/string.h:72:7: note: candidate function not viable: no known conversion from 'const char *' to 'void *' for 1st argument
void *memcpy(void *__dst, const void *__src, size_t __n);
^
1 error generated.
Expected Behaviour
Successful build.
Actual Behaviour
FTBFS
OS Version
- OS X 10.13
- Xcode 10.1 (gcc-4.2.1/llvm-10.0.0/clang-1000.11.45.5)