Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-bounces at yquem.inria.fr; domainkey=neutral (no query protocol specified; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=YyICbx8HvWTB+d1XtPLRUHU2RKe1bisaJ7Ncrd+sycI=; b=Qvb84FH3xUnBp7hgyv2RzdCGaQ5xQL+yTiyw+8/IQVFX2SVzjdYGRJ1qYr5k5QM+4p qoJFW6+AOsI558RJ6SRUcFIaFlGrlzGflOuf35MUsM2gFt2b+OWOR/YQcwNad2RsrXND aotsSvMH6vgu55Wgfh/HUfHia6fJmFcrfQ6c4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=R8z+Rp1su7NptIp4cSoMJ+3pXOzeEdLEGWuBm4SI2KdTGEol9wplCt7a9oj+vqbOWh 81ZKRk/sv0K2YsyH1RJSypvZMEfHFEN/MzTfUoA1vFaTQdHTM84JwhmgCqEJ/YxkxD9c Fc2i5zv3Wi2qNUx1WiyRzjWMI2mKRJ2Gn4HXA= MIME-Version: 1.0 Date: Tue, 14 Sep 2010 11:50:15 +0200 Message-ID: From: Johan Mazel To: lablgtk at yquem.inria.fr Subject: [Lablgtk] Cairo/GTK and cube example Content-Type: multipart/mixed; boundary="===============1525512485==" Mime-version: 1.0 Status: U --===============1525512485== Content-Type: multipart/alternative; boundary=0016e645abbecc936304903523e4 --0016e645abbecc936304903523e4 Content-Type: text/plain; charset=ISO-8859-1 Hi I'm trying to use Cairo and GTK. As a first step, I tried to compile and understand the cube example given at this address: http://webcvs.cairographics.org/cairo-ocaml/test/. I use this line for the native compilation: ocamlopt -I +lablgtk2 -I +cairo lablgtk.cmxa cairo.cmxa cairo_lablgtk.cmxa cube.ml -o cube. The first problem is that the bytecode compilation do not work: ocamlc -I +lablgtk2 -I +cairo lablgtk.cma cairo.cma cairo_lablgtk.cma cube.ml -o cube File "cube.ml", line 1, characters 0-1: Error: Error on dynamically loaded library: /usr/lib/ocaml/stublibs/dllmlcairo.so: /usr/lib/ocaml/stublibs/dllmlcairo.so: undefined symbol: caml_ba_byte_size I however tried to run the native executable generated but I get the following error: (process:6496): GLib-GObject-WARNING **: invalid (NULL) pointer instance (process:6496): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed (process:6496): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_get_pixel_extents: assertion `PANGO_IS_LAYOUT (layout)' failed (process:6496): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_get_pixel_extents: assertion `PANGO_IS_LAYOUT (layout)' failed (process:6496): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (process:6496): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (process:6496): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed (process:6496): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (process:6496): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed (process:6496): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed (process:6496): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed (process:6496): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed (process:6496): Gdk-CRITICAL **: gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Gdk-CRITICAL **: gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed (process:6496): Gdk-CRITICAL **: gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Gdk-CRITICAL **: gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Gdk-CRITICAL **: gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Gdk-CRITICAL **: gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed Erreur de segmentation I am guessing that this might be linked to the compilation error in bytecode but since I am not a specialist of lablgtk or cairo at all, I don't really know how to fix this. Thanks in advance for your time. Regards. Johan Mazel --0016e645abbecc936304903523e4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi
I'm trying to use Cairo and GTK.
As a first step, I tried to c= ompile and understand the cube example given at this address: http://webcvs.cairographic= s.org/cairo-ocaml/test/.
I use this line for the native compilation: ocamlopt -I +lablgtk2 -I +cairo= lablgtk.cmxa cairo.cmxa cairo_lablgtk.cmxa cube= .ml -o cube.

The first problem is that the bytecode compilation = do not work:
ocamlc -I +lablgtk2 -I +cairo lablgtk.cma cairo.cma cairo_lablgtk.cma cube.ml -o cube
File "cube.ml", line 1, characters 0-1:
Error: Error on dynam= ically loaded library: /usr/lib/ocaml/stublibs/dllmlcairo.so: /usr/lib/ocam= l/stublibs/dllmlcairo.so: undefined symbol: caml_ba_byte_size

I however tried to run the native executable generated but I get the fo= llowing error:
(process:6496): GLib-GObject-WARNING **: invalid (NULL) p= ointer instance
(process:6496): GLib-GObject-CRITICAL **: g_signal_conne= ct_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(process:6496): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertio= n `GDK_IS_SCREEN (screen)' failed
(process:6496): Pango-CRITICAL **:= pango_context_set_font_description: assertion `context !=3D NULL' fail= ed
(process:6496): Pango-CRITICAL **: pango_context_set_base_dir: assertion `c= ontext !=3D NULL' failed
(process:6496): Pango-CRITICAL **: pango_co= ntext_set_language: assertion `context !=3D NULL' failed
(process:64= 96): Pango-CRITICAL **: pango_layout_new: assertion `context !=3D NULL'= failed
(process:6496): Pango-CRITICAL **: pango_layout_set_text: assertion `layout= !=3D NULL' failed
(process:6496): Pango-CRITICAL **: pango_layout_g= et_pixel_extents: assertion `PANGO_IS_LAYOUT (layout)' failed
(proce= ss:6496): Pango-CRITICAL **: pango_layout_set_text: assertion `layout !=3D = NULL' failed
(process:6496): Pango-CRITICAL **: pango_layout_get_pixel_extents: assertio= n `PANGO_IS_LAYOUT (layout)' failed
(process:6496): GLib-GObject-CRI= TICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(process:6496): Gtk-WARNING **: Screen for GtkWindow not set; you must alwa= ys set
a screen for a GtkWindow before using the window
(process:6496= ): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCR= EEN (screen)' failed
(process:6496): Pango-CRITICAL **: pango_context_set_font_description: asse= rtion `context !=3D NULL' failed
(process:6496): Pango-CRITICAL **: = pango_context_set_base_dir: assertion `context !=3D NULL' failed
(pr= ocess:6496): Pango-CRITICAL **: pango_context_set_language: assertion `cont= ext !=3D NULL' failed
(process:6496): Pango-CRITICAL **: pango_layout_new: assertion `context != =3D NULL' failed
(process:6496): GLib-GObject-CRITICAL **: g_object_= unref: assertion `G_IS_OBJECT (object)' failed
(process:6496): Gdk-C= RITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (scr= een)' failed
(process:6496): Pango-CRITICAL **: pango_context_set_font_description: asse= rtion `context !=3D NULL' failed
(process:6496): Pango-CRITICAL **: = pango_context_set_base_dir: assertion `context !=3D NULL' failed
(pr= ocess:6496): Pango-CRITICAL **: pango_context_set_language: assertion `cont= ext !=3D NULL' failed
(process:6496): Pango-CRITICAL **: pango_layout_new: assertion `context != =3D NULL' failed
(process:6496): Pango-CRITICAL **: pango_layout_set= _text: assertion `layout !=3D NULL' failed
(process:6496): Pango-CRI= TICAL **: pango_layout_set_alignment: assertion `layout !=3D NULL' fail= ed
(process:6496): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `P= ANGO_IS_LAYOUT (layout)' failed
(process:6496): Pango-CRITICAL **: p= ango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)&= #39; failed
(process:6496): Pango-CRITICAL **: pango_layout_set_width: assertion `layou= t !=3D NULL' failed
(process:6496): Pango-CRITICAL **: pango_layout_= get_extents: assertion `layout !=3D NULL' failed
(process:6496): Gdk= -CRITICAL **: gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (sc= reen)' failed
(process:6496): Gdk-CRITICAL **: gdk_colormap_get_visual: assertion `GDK_IS= _COLORMAP (colormap)' failed
(process:6496): Gdk-CRITICAL **: gdk_sc= reen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed (process:6496): Gdk-CRITICAL **: gdk_screen_get_root_window: assertion `GDK= _IS_SCREEN (screen)' failed
(process:6496): Gdk-CRITICAL **: gdk_scr= een_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
(proc= ess:6496): Gdk-CRITICAL **: gdk_window_new: assertion `GDK_IS_WINDOW (paren= t)' failed
Erreur de segmentation

I am guessing that this might be linked to th= e compilation error in bytecode but since I am not a specialist of lablgtk = or cairo at all, I don't really know how to fix this.

Thanks in = advance for your time.

Regards.
Johan Mazel
--0016e645abbecc936304903523e4-- --===============1525512485== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk --===============1525512485==--