Bug 830549 - swig generates bad code for ocaml
Summary: swig generates bad code for ocaml
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: swig
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-10 14:47 UTC by John Ellson
Modified: 2013-04-30 23:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-19 11:01:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.