[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [bugreport] lablgtk un{st,us}able



On Wed, Jan 22, 2003 at 06:39:45PM +0100, Remi VANICAT wrote:
> Sven Luther <luther@dpt-info.u-strasbg.fr> writes:
> 
> > On Wed, Jan 22, 2003 at 05:59:39PM +0100, Remi VANICAT wrote:
> >> Stefano Zacchiroli <zack@debian.org> writes:
> >> 
> >> > I'm a bit puzzled about the behaviour of lablgtk on debian/unstable, I'm
> >> > using the latest 1.x lablgtk version (1.2.5-6+20021031).
> >> >
> >> > Even the simplest /usr/share/doc/liblablgtk-ocaml-dev/examples/hello.ml
> >> > doesn't work (I've removed some blank lines from the a.out output
> >> > between various Gtk/Glib messages to trim down this mail):
> >> 
> >> [...]
> >> 
> >> 
> >> > libgtk1.2 version is 1.2.10-14.
> >> >
> >> > I'm able to reproduce the same behaviour on at least 3 debian/unstable
> >> > and also on some woody boxes with my lablgtk rebuilt packages.
> >> 
> >> It's normal, those example need to be compiled with the init predicate:
> >
> > :)))
> >
> >> moi@debian:/tmp$ ocamlfind ocamlc -predicates init -package lablgtk -linkpkg hello.ml 
> >> File "hello.ml", line 10, characters 2-98:
> >> Warning: this expression should have type unit.
> >> File "hello.ml", line 12, characters 2-44:
> >> Warning: this expression should have type unit.
> >> File "hello.ml", line 13, characters 2-74:
> >> Warning: this expression should have type unit.
> >> File "hello.ml", line 14, characters 2-49:
> >> Warning: this expression should have type unit.
> >> moi@debian:/tmp$ ./a.out 
> >> Hello World
> >> moi@debian:/tmp$ 
> >> 
> >> why it is not the default ? because someone may want to have an
> >> executable that some time initialize the gtk part, sometime don't. 
> 
> Well, by rethinking to it, why isn't it the default ? may be it would
> be better that initialization is the default, and have a noinit flag
> for people that doesn't want the initialization (it's uncommon).
> 
> Of course, to change now may be a bad thing, I don't know.

Well, i will be rebuilding lablgtk this evening, so let's see if we can
agree on this.

But first, Stefano, why is your META file not in the BTS ?

Are there other issues with lablgtk i need to change.

Notice, that libc6 is only waiting on a problem with m68k gcc 3.2
examples not building, before going in testing. That said, nobody seems
to have an idea about what is causing the problem, and there is the RPC
licence problem also, altough apparently this will not stop it from
entering testing.

Now, back to the above problem.

The correct way of testing lablgtk examples is with :

lablgtk [-labels] /usr/share/doc/liblablgtk-ocaml-dev/examples/hello.ml.

Now, lablgtk evidently includes the init.cmo, so this cause no problem.

I think, since it is best not to deviate from upstream practices, to
keep things as is, and have a more adequate documentation, in the
examples/README file. ... Huh, there is no such file, maybe i will add
one then.

Now, another idea, would be to add a little test at the end of each
example file, and add a new variable to the gtkInit (and gtkThInit)
module, and just access it or whatever in the examples. If the variable
name is sufficiently explicit (forgot_to_link_gtkInit or something
such), then each user trying to run the examples will get an error at
compile time, and not at run time as before.

Friendly,

Sven Luther



Reply to: