Red Hat Bugzilla – Bug 830549
swig generates bad code for ocaml
Last modified: 2013-04-30 19:51:52 EDT
Description of problem:
Graphviz builds fail with:
gv_ocaml.cpp:866:54: error: declaration of C function 'int caml_array_length(caml_value_t)' conflicts with
In file included from /usr/lib64/ocaml/caml/alloc.h:24:0,
/usr/lib64/ocaml/caml/mlvalues.h:252:21: error: previous declaration 'mlsize_t caml_array_length(caml_value_t)' here
swig generated the gv_ocaml.cpp with:
SWIGSTATIC int caml_array_length( CAML_VALUE arr );
CAMLextern mlsize_t caml_array_length (value); /* size in items */
This is only a problem on x86_64; no eror on i686.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. build graphviz (I'm building upstream development snapshots, but ocaml code hasn't changed recently so I expect this will effect the Fedora version too.)
compile errors as above
no compile errors
Only affects x86_64
Correction - also affects i686 (build must have run before upgrade yesterday, sorry)
I untagged broken swig from f18-build collection so you should be able to compile ocaml successfully now. The patch for swig is on the way...
It seems this was a bug in ocaml package, I'm not able to reproduce this bug with swig-2.0.7-1 now.
Closing as notabug, please reopen it if problem still persists.