Vala and Genie programming
Yes, I know.
I tried to compile on upup-476 but doesn't work. So I decided to do something in windows waiting for a new alpha release.
EDIT: I forget to say that to choice-unchoise a package you have double click on it. the buttons ADD-REMOVE probably are not useful.
also, I did not try the fixmenu command of course , and I think we also don't need /tmp/PBG_rettags.txt. check it yourself and let me know.
thanks
Giorgio
I tried to compile on upup-476 but doesn't work. So I decided to do something in windows waiting for a new alpha release.
EDIT: I forget to say that to choice-unchoise a package you have double click on it. the buttons ADD-REMOVE probably are not useful.
also, I did not try the fixmenu command of course , and I think we also don't need /tmp/PBG_rettags.txt. check it yourself and let me know.
thanks
Giorgio
- gposil
- Posts: 1300
- Joined: Mon 06 Apr 2009, 10:00
- Location: Stanthorpe (The Granite Belt), QLD, Australia
- Contact:
Any clues as to what is causing this....
I've upgraded Glib to 2.18 as has been suggested...still no joy, I can't even get it to work on Ubuntu 9.04...same messages and it has later everything...# valac --pkg gtk+-2.0 text_viewer.gs
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_update'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_get_string'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_new'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_strcmp0'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `glib_gettext'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_assertion_message_expr'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_free'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_hash_table_iter_next'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_hash_table_iter_init'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_uri_escape_string'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_set_error_literal'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_warn_message'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]
gposil,
use:
valac --pkg gtk+-2.0 --pkg gtksourceview-2.0 texteditor.gs
which Puppy?
You will need the pet "gtksourceview".
In upup, it is included.
Please look if you have:
/usr/lib/libgtksourceview-2.0.so.0.0.0
If not:
In Puppy 4, it can be installed from:
http://ftp.nluug.nl/ftp/pub/os/Linux/di ... -2.4.2.pet
http://ftp.nluug.nl/ftp/pub/os/Linux/di ... -2.4.2.pet
Mark
use:
valac --pkg gtk+-2.0 --pkg gtksourceview-2.0 texteditor.gs
which Puppy?
You will need the pet "gtksourceview".
In upup, it is included.
Please look if you have:
/usr/lib/libgtksourceview-2.0.so.0.0.0
If not:
In Puppy 4, it can be installed from:
http://ftp.nluug.nl/ftp/pub/os/Linux/di ... -2.4.2.pet
http://ftp.nluug.nl/ftp/pub/os/Linux/di ... -2.4.2.pet
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
- gposil
- Posts: 1300
- Joined: Mon 06 Apr 2009, 10:00
- Location: Stanthorpe (The Granite Belt), QLD, Australia
- Contact:
Yes tried that....with only slightly different results
Very curious
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_update'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_get_string'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_new'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_strcmp0'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `glib_gettext'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgtksourceview-2.0.so: undefined reference to `g_assertion_message_expr'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_checksum_free'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_hash_table_iter_next'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_hash_table_iter_init'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_uri_escape_string'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_set_error_literal'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgtksourceview-2.0.so: undefined reference to `g_assertion_message'
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../libgio-2.0.so: undefined reference to `g_warn_message'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
Very curious
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]
If I remember well, I had similar errors.
I then extracted the glib.pet in console (tar -xzvf glib-xxx.pet).
Then copied the files by hand.
I then tried it in a fresh setup of 4.2.0, and here this step was not required.
Maybe thepet does not install correctly, when devx_420.sfs is mounted?
Mark
I then extracted the glib.pet in console (tar -xzvf glib-xxx.pet).
Then copied the files by hand.
I then tried it in a fresh setup of 4.2.0, and here this step was not required.
Maybe thepet does not install correctly, when devx_420.sfs is mounted?
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
Be certain to use 2.20 from this thread:gposil wrote:I've upgraded Glib to 2.18 as has been suggested...still no joy, I can't even get it to work on Ubuntu 9.04...same messages and it has later everything...
http://www.murga-linux.com/puppy/viewtopic.php?t=39736
That is the one I tried with success in 4.2.0.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
It looks like it might be finding an older version of glib. I've attached a small program that will print the current glib version you can use to verify.
Mike
Mike
- Attachments
-
- GLIBVersion.zip
- Run from a terminal to print the glib version
- (2.52 KiB) Downloaded 296 times
- gposil
- Posts: 1300
- Joined: Mon 06 Apr 2009, 10:00
- Location: Stanthorpe (The Granite Belt), QLD, Australia
- Contact:
Ok I got 2.2 from the post you suggested, installed and now I get this
Not much of an improvement
valac --pkg gtk+-2.0 --pkg gtksourceview-2.0 texteditor.gs
texteditor.gs:483.30-483.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:485.9-485.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), nu ll)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
texteditor.gs:494.23-494.68: warning: unhandled error `GLib.Error'
var renamed = file.set_display_name ("samplefile.bak", null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:495.30-495.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:497.9-497.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), nu ll)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
texteditor.gs:498.9-498.28: warning: unhandled error `GLib.Error'
renamed.delete(null)
^^^^^^^^^^^^^^^^^^^^
texteditor.gs:357.35-357.45: error: method `TextFileViewer.on_response' is incom patible with signal `Gtk.Dialog.response', expected `void on_response (Gtk.Dialo g, int)'
search_dialog.response += on_response
^^^^^^^^^^^
texteditor.gs:452.30-452.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:454.9-454.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), nu ll)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
Compilation failed: 1 error(s), 8 warning(s)
# ./getglibversion
GLIB Version = 2.20.0
Not much of an improvement
Last edited by gposil on Wed 03 Jun 2009, 03:33, edited 1 time in total.
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]
that is good!
Nicolas did not put file operations in a
so you get warnings, that is just a hint, to add that. It is not critical.
Just this is:
There will be a function that needs a different parameter or returnvalue.
You can comment that line for a first test.
Mark
Nicolas did not put file operations in a
Code: Select all
try
except e: IOStreamError
Just this is:
I must look after some sleep, what causes this.texteditor.gs:357.35-357.45: error: method `TextFileViewer.on_response' is incom patible with signal `Gtk.Dialog.response', expected `void on_response (Gtk.Dialo g, int)'
search_dialog.response += on_response
There will be a function that needs a different parameter or returnvalue.
You can comment that line for a first test.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
- gposil
- Posts: 1300
- Joined: Mon 06 Apr 2009, 10:00
- Location: Stanthorpe (The Granite Belt), QLD, Australia
- Contact:
I had noticed the error nad commented it out but to no avail
Compiling still failed.# valac --pkg gtk+-2.0 --pkg gtksourceview-2.0 texteditor.gs
texteditor.gs:483.30-483.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:485.9-485.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:494.23-494.68: warning: unhandled error `GLib.Error'
var renamed = file.set_display_name ("samplefile.bak", null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:495.30-495.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:497.9-497.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:498.9-498.28: warning: unhandled error `GLib.Error'
renamed.delete(null)
^^^^^^^^^^^^^^^^^^^^
texteditor.gs:452.30-452.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
texteditor.gs:454.9-454.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: - 8 warning(s)
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]
Try changing line 361 to:
Code: Select all
def private on_response(search_dialog : Gtk.Dialog, response_id : int)
Strange, this is what I get in Newyearspup:
Is the gcc compiler in 4.12 equipped with different settings, so that it refuses to compile with warnings?
Then the code had to be cleaned up like this:
example:
I don't know, how to set the global compiler options, to be less restrictive.
I can try to reproduce the issues in Puppy 4.12 this evening.
But I already compiled programs with warnings - so I am curious, what is the issue in this case here.
-------------
And PupMike, thanks again
Mark
So I get the warnings, but compilation succeeds.# valac --pkg gtk+-2.0 --pkg gtksourceview-2.0 main.gs
main.gs:483.30-483.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.gs:485.9-485.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.gs:494.23-494.68: warning: unhandled error `GLib.Error'
var renamed = file.set_display_name ("samplefile.bak", null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.gs:495.30-495.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.gs:497.9-497.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.gs:498.9-498.28: warning: unhandled error `GLib.Error'
renamed.delete(null)
^^^^^^^^^^^^^^^^^^^^
main.gs:452.30-452.69: warning: unhandled error `GLib.Error'
var thefile_stream = file.create (FileCreateFlags.NONE, null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.gs:454.9-454.83: warning: unhandled error `GLib.Error'
data_stream.put_string (text_view.buffer.get_text(start, end, false), null)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 8 warning(s)
Is the gcc compiler in 4.12 equipped with different settings, so that it refuses to compile with warnings?
Then the code had to be cleaned up like this:
example:
Code: Select all
/* -- old code --
text : string
len : int
FileUtils.get_contents (filename, out text, out len)
this.text_view.buffer.set_text (text, len)
*/
//-- corrected code --
try
text : string
len : int
FileUtils.get_contents (filename, out text, out len)
this.text_view.buffer.set_text (text, len)
except e:Error
stdout.printf ("%s\n", e.message)
I can try to reproduce the issues in Puppy 4.12 this evening.
But I already compiled programs with warnings - so I am curious, what is the issue in this case here.
-------------
And PupMike, thanks again
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
please also try the "--verbose" option of valac, like:
valac -v --pkg gtk+-2.0 --pkg gtksourceview-2.0 texteditor.gs
This tells me in addition:
Mark
valac -v --pkg gtk+-2.0 --pkg gtksourceview-2.0 texteditor.gs
This tells me in addition:
Maybe your result gives us important hints.cc -o '/root/valide/TextEditor/main' '/root/valide/TextEditor/main.vala.c' -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/glitz -I/usr/include/libpng12 -I/usr/include/gtksourceview-2.0 -I/usr/include/libxml2 -I/usr/X11R7/include -L/usr/X11R7/lib -lgtksourceview-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
Compilation succeeded - 8 warning(s)
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
- gposil
- Posts: 1300
- Joined: Mon 06 Apr 2009, 10:00
- Location: Stanthorpe (The Granite Belt), QLD, Australia
- Contact:
The verbose printout did it...my versions of pango and pangocairo are much later than puppy std so I rolled them back to 2.18 and problem solved....now compiles same as your test...
Thanks for all the help Mark... Now I can have a fiddle with this Genie gadget.
Thanks for all the help Mark... Now I can have a fiddle with this Genie gadget.
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]