Bug 830549

Summary: swig generates bad code for ocaml
Product: [Fedora] Fedora Reporter: John Ellson <john.ellson>
Component: swigAssignee: Adam Tkac <atkac>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: atkac, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-19 11:01:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Ellson 2012-06-10 14:47:30 UTC
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,
                 from gv_ocaml.cpp:752:
/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 );

mlvalues.h expects:
    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):
swig-2.0.7-1.fc18.x86_64
ocaml-4.00.0-0.3.beta2.fc18.x86_64

How reproducible:
100%

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.)
2.
3.
  
Actual results:
compile errors as above

Expected results:
no compile errors

Additional info:
Only affects x86_64

Comment 1 John Ellson 2012-06-11 13:23:14 UTC
Correction - also affects i686 (build must have run before upgrade yesterday, sorry)

Comment 2 Adam Tkac 2012-06-12 10:40:01 UTC
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...

Comment 3 Adam Tkac 2012-06-19 11:01:17 UTC
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.