2021-01-27 11:06 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000225Frama-CGraphical User Interfacepublic2009-09-09 08:55
Reportermehdi 
Assigned Tosignoles 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product VersionFrama-C Beryllium-20090601-beta1 
Target VersionFixed in VersionFrama-C Beryllium-20090901 
Summary0000225: Incorrect linking order for the viewer
Description
Hi,

When compiling the viewer using a system-installation of ocamlgraph, the compilation fails with the following error:

ocamlc.opt -w Ael -warn-error A -annot -I src/misc -I src/ai -I src/memory_state -I src/toplevel -I src/slicing_types -I src/pdg_types -I src/kernel -I src/logic -I src/lib -I src/project -I src/buckx -I external -I cil/src -I cil/src/ext -I cil/src/frontc -I cil/src/logic -I cil/ocamlutil -I lib/plugins -I lib -I +ocamlgraph -g -I src/gui -I +lablgtk2 -I +ocamlgraph -linkall -custom -o bin/viewer.byte nums.cma unix.cma bigarray.cma str.cma dynlink.cma src/buckx/mybigarray.o src/buckx/buckx_c.o graph.cma /usr/lib/ocaml/ocamlgraph/viewGraph.cmo /usr/lib/ocaml/ocamlgraph/viewGraph_select.cmo /usr/lib/ocaml/ocamlgraph/viewGraph_utils.cmo lablgtk.cma lablgnomecanvas.cma lablgtksourceview.cma /usr/lib/ocaml/ocamlgraph/viewGraph.cmo /usr/lib/ocaml/ocamlgraph/viewGraph_select.cmo /usr/lib/ocaml/ocamlgraph/viewGraph_utils.cmo
[...]
File "_none_", line 1, characters 0-1:
Error: Error while linking /usr/lib/ocaml/ocamlgraph/viewGraph.cmo:
Reference to undefined global `GnoCanvas'

As you can see, viewGraph.cmo (and friends) are specified twice when linking and between the two groups there is lablgnomecanvas.cma which is needed by viewGraph.cmo.

Please find attached a patch that fixes this issue.

Kind regards,
TagsNo tags attached.
Attached Files
  • patch file icon 0002-Do-not-add-GRAPH_GUICMO-to-BYTE_GUI_LIBS.patch (712 bytes) 2009-09-01 14:12 -
    From: Mehdi Dogguy <mehdi@debian.org>
    Date: Fri, 28 Aug 2009 08:43:22 +0200
    Subject: [PATCH] Do not add $(GRAPH_GUICMO) to $(BYTE_GUI_LIBS)
    
    Otherwise, they will appear before lablgtk.cma and lablgnomecanvas.cma
    when linking which are needed by viewGraph.cmo (and al.).
    ---
     Makefile.in |    2 --
     1 files changed, 0 insertions(+), 2 deletions(-)
    
    diff --git a/Makefile.in b/Makefile.in
    index fbf5f4d..2e0f6b3 100644
    --- a/Makefile.in
    +++ b/Makefile.in
    @@ -358,8 +358,6 @@ GRAPH_GUICMO=$(GRAPH_GUICMO_BASE:%=$(OCAMLGRAPH_HOME)/%)
     GRAPH_GUICMX= $(GRAPH_GUICMO:.cmo=.cmx)
     GRAPH_GUIO= $(GRAPH_GUICMO:.cmo=.o)
     HAS_VIEWGRAPH=yes
    -BYTE_GUI_LIBS+= $(GRAPH_GUICMO)
    -OPT_GUI_LIBS+= $(GRAPH_GUICMX)
     endif
     endif
     
    -- 
    

-Relationships
+Relationships

-Notes

~0000370

monate (reporter)

Can you confirm if the bug is still present in Beryllium?

~0000371

mehdi (reporter)

I would have been able to answer if the interface of Jessie doesn't change. I'll answer then when I'll resolve this issue:

File "src/jessie/interp.ml", line 2093, characters 54-60:
Error: This expression has type
         ((bool * bool) * Jc.Jc_constructors.ptype * string * int option)
         list
       but an expression was expected of type
         (bool * Jc.Jc_ast.ptype * string * int option) list
make[2]: *** [src/jessie/interp.cmx] Erreur 2

Cheers,

~0000373

signoles (manager)

Last edited: 2009-09-04 18:44

You're right: you have to wait the next version of why or to use the synchronized version of why comming within Frama-C. You can also configure frama-c with "./configure --disable-jessie"

~0000374

mehdi (reporter)

My plan was to come up with a patch to make it compile. I don't feel like disabling the Jessie plugin, nor using Why shipped within Frama-c.

It would have been so nice to have stable versions (frama-c and why) synchronized. IMHO, synchronizing a beta version of Frama-c and a stable one of Why seems to me like a no-sense.

Do you have any idea on the release date of the next stable version of Why?

~0000384

signoles (manager)

Already fixed in Beryllium. Thank's for the report and the patch.
+Notes

-Issue History
Date Modified Username Field Change
2009-09-01 14:12 mehdi New Issue
2009-09-01 14:12 mehdi File Added: 0002-Do-not-add-GRAPH_GUICMO-to-BYTE_GUI_LIBS.patch
2009-09-02 10:48 signoles Status new => assigned
2009-09-02 10:48 signoles Assigned To => signoles
2009-09-02 16:47 monate Note Added: 0000370
2009-09-04 16:08 mehdi Note Added: 0000371
2009-09-04 16:17 signoles Status assigned => acknowledged
2009-09-04 18:43 signoles Note Added: 0000373
2009-09-04 18:44 signoles Note Edited: 0000373
2009-09-05 00:50 mehdi Note Added: 0000374
2009-09-07 13:29 virgile Status acknowledged => resolved
2009-09-07 13:29 virgile Fixed in Version => Frama-C Beryllium
2009-09-07 13:29 virgile Resolution open => fixed
2009-09-09 08:55 signoles Note Added: 0000384
2009-09-09 08:55 signoles Status resolved => closed
+Issue History