Re: [Vala] Vapigen errors?

2009-05-10 Thread Robert Palmqvist
Whahoo, it worked! I already tried the libexif.metadata file but I must have
gotten it wrong the first time (I only had one of them in there but got the
same error for all 3 of them so I assumed it was not the way to go, maybe I
got the syntax wrong and used Exif.Content.priv hidden="1" or something like
that). Anyway I stated a "libexif.metadata" as below and I now got an
libexif.vapi file! Time to write some code to check if it "really works". If
it would turns out to be this easy to wrap existing C-libs then this is
truly a revolution (and an alternative to Python and ctypes). I'm existed
now!

libexif.metadata:

ExifContent.priv hidden="1"
ExifData.priv hidden="1"
ExifEntry.priv hidden="1"


> In your exif.metadata file (or whatever the name is) put this:
>
> ExifContent.priv hidden="1"
>
> Do the same for the other ones and you should be fine.
>
>
> --
> Travis Watkins
> http://www.realistanew.com
>
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-10 Thread Travis Watkins
On Sun, May 10, 2009 at 3:33 AM, Robert Palmqvist
 wrote:
>
>
> On Sun, May 10, 2009 at 9:32 AM, Robert Palmqvist 
> wrote:
>>
>> There is a typedef for "_ExifContentPrivate" but I can't find it defined
>> anywhere. It's the same for "_ExifDataPrivate" in "exif-data.h" and
>> "_ExifEntryPrivate" in "exif-entry.h"...
>>
>> Anyone got a solution?
>
> I have found the definitions, "_ExifDataPrivate" is found in
> "exif-content.c":
>
> ...
>
> struct _ExifContentPrivate
> {
>   unsigned int ref_count;
>
>   ExifMem *mem;
>   ExifLog *log;
> };
>
> ...
>
> The same for "_ExifDataPrivate" in "exif-data.c" and "_ExifEntryPrivate" in
> "exif-entry.c"...
>
> ...
>
> struct _ExifDataPrivate
> {
>   ExifByteOrder order;
>
>   ExifMnoteData *md;
>
>   ExifLog *log;
>   ExifMem *mem;
>
>   unsigned int ref_count;
>
>   /* Temporarily used while loading data */
>
>   unsigned int offset_mnote;
>
>   ExifDataOption options;
>   ExifDataType data_type;
> };
>
> ...
> ...
>
> struct _ExifEntryPrivate
> {
>   unsigned int ref_count;
>
>   ExifMem *mem;
> };
>
> ...
>
> Any good solutions to this problem?
> ___
> Vala-list mailing list
> Vala-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/vala-list
>
>

In your exif.metadata file (or whatever the name is) put this:

ExifContent.priv hidden="1"

Do the same for the other ones and you should be fine.


-- 
Travis Watkins
http://www.realistanew.com
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-10 Thread Robert Palmqvist
On Sun, May 10, 2009 at 9:32 AM, Robert Palmqvist
wrote:

>
> There is a typedef for "_ExifContentPrivate" but I can't find it defined
> anywhere. It's the same for "_ExifDataPrivate" in "exif-data.h" and
> "_ExifEntryPrivate" in "exif-entry.h"...
>
> Anyone got a solution?


I have found the definitions, "_ExifDataPrivate" is found in
"exif-content.c":

...

struct _ExifContentPrivate
{
unsigned int ref_count;

ExifMem *mem;
ExifLog *log;
};

...

The same for "_ExifDataPrivate" in "exif-data.c" and "_ExifEntryPrivate" in
"exif-entry.c"...

...

struct _ExifDataPrivate
{
ExifByteOrder order;

ExifMnoteData *md;

ExifLog *log;
ExifMem *mem;

unsigned int ref_count;

/* Temporarily used while loading data */
unsigned int offset_mnote;

ExifDataOption options;
ExifDataType data_type;
};

...
...

struct _ExifEntryPrivate
{
unsigned int ref_count;

ExifMem *mem;
};

...

Any good solutions to this problem?
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-10 Thread Robert Palmqvist
I am trying to figure this last one out so I went trough the libexif header
files in search for the "ContentPrivate", "DataPrivate" and "EntryPrivate"
generating the errors...

someu...@somehost:~$ grep -i 'ContentPrivate' /usr/include/libexif/*.h
/usr/include/libexif/exif-content.h:typedef struct _ExifContentPrivate
ExifContentPrivate;
/usr/include/libexif/exif-content.h:ExifContentPrivate *priv;

And this is a snippet from "exif-content.h":

...
typedef struct _ExifContentExifContent;
typedef struct _ExifContentPrivate ExifContentPrivate;

#include 
#include 
#include 
#include 
#include 

struct _ExifContent
{
ExifEntry **entries;
unsigned int count;

/* Data containing this content */
ExifData *parent;

ExifContentPrivate *priv;
};
...

There is a typedef for "_ExifContentPrivate" but I can't find it defined
anywhere. It's the same for "_ExifDataPrivate" in "exif-data.h" and
"_ExifEntryPrivate" in "exif-entry.h"...

Anyone got a solution?
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Robert Palmqvist
On Sun, May 10, 2009 at 12:05 AM, Robert Palmqvist  wrote:

> On Sat, May 9, 2009 at 3:45 PM, Jürg Billeter  wrote:
>
>> Hi,
>>
>> On Sat, 2009-05-09 at 15:06 +0200, Robert Palmqvist wrote:
>> > someu...@somehost:~$ vapigen --library libexif libexif/libexif.gi
>> >
>> > (vapigen:23894): GLib-GObject-WARNING **: cannot register existing
>> > type `GeeCollectionObject'
>>
>> This looks as if you're mixing vapigen and libvala of different
>> versions. Make sure you have only one version installed,
>> fix /etc/ld.so.conf, and/or set LD_LIBRARY_PATH.
>>
>> Jürg
>>
>>
>
FYI, I removed the PPA provided packages and downloaded the latest source
(vala-0.7.2). I don't get the same errors from vapigen any more but I get
the following instead:

someu...@somehost:~$ vapigen --library libexif libexif/libexif.gi
error: The type name `Exif.ContentPrivate' could not be found
error: The type name `Exif.DataPrivate' could not be found
error: The type name `Exif.EntryPrivate' could not be found
Generation failed: 3 error(s), 0 warning(s)

I am not sure I got the namespace right. Where can I get more information
about the namespaces file used by vapigen (or does anyone understand what
went wrong this time)?

Ps. I guess the first errors originate from "" in the snippet of gi-definition below:

























































































___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Jürg Billeter
On Sun, 2009-05-10 at 00:05 +0200, Robert Palmqvist wrote:
> On Sat, May 9, 2009 at 3:45 PM, Jürg Billeter  wrote:
> This looks as if you're mixing vapigen and libvala of
> different
> versions. Make sure you have only one version installed,
> fix /etc/ld.so.conf, and/or set LD_LIBRARY_PATH.
> 
> 
> Thanks Jũrg, that was my initial thought based on the following posts;
> [1] & [2]. It looks like I'm running into a similar situation but I
> can't figure out why. I could "buy" the warning about
> GeeCollectionObject if I only could verify that I got different
> versions indeed (but I can't, see dump below). Any other thoughts? 

Can you run `ldd $(which vapigen)' to check whether it actually uses the
libvala.so from the package?

Jürg

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Robert Palmqvist
On Sat, May 9, 2009 at 3:45 PM, Jürg Billeter  wrote:

> Hi,
>
> On Sat, 2009-05-09 at 15:06 +0200, Robert Palmqvist wrote:
> > someu...@somehost:~$ vapigen --library libexif libexif/libexif.gi
> >
> > (vapigen:23894): GLib-GObject-WARNING **: cannot register existing
> > type `GeeCollectionObject'
>
> This looks as if you're mixing vapigen and libvala of different
> versions. Make sure you have only one version installed,
> fix /etc/ld.so.conf, and/or set LD_LIBRARY_PATH.
>
> Jürg
>
>
Thanks Jũrg, that was my initial thought based on the following posts;
[1]&
[2] . It looks
like I'm running into a similar situation but I can't figure out why. I
could "buy" the warning about GeeCollectionObject if I only could verify
that I got different versions indeed (but I can't, see dump below). Any
other thoughts?

someu...@somehost:~$ vapigen --version
Vala API Generator 0.7.1

someu...@somehost:~$ aptitude show libvala0
Package: libvala0
State: installed
Automatically installed: yes
Version: 0.7.1-1~vala1.9.04
Priority: optional
Section: libs
Maintainer: Maintainers of Vala packages <
pkg-vala-maintain...@lists.alioth.debian.org>
Uncompressed Size: 2015k
Depends: libc6 (>= 2.3.4), libglib2.0-0 (>= 2.16.0)
...

someu...@somehost:~$ aptitude show libvala-dev
Package: libvala-dev
State: installed
Automatically installed: no
Version: 0.7.1-1~vala1.9.04
Priority: optional
Section: libdevel
Maintainer: Maintainers of Vala packages <
pkg-vala-maintain...@lists.alioth.debian.org>
Uncompressed Size: 508k
Depends: libvala0 (= 0.7.1-1~vala1.9.04), libglib2.0-dev (>= 2.10.0)
...
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Michael 'Mickey' Lauer
On Saturday 09 May 2009 15:38:15 Robert Palmqvist wrote:
> > Now you made me curious... which ones?
>
> I really don't want to point fingers or start a "my language is better than
> yours" type of flame war but you asked for it so... My main concerns are
> Java and C#. It's not as much the languages (even though I personally find
> Java too verbose) but the imposed overhead by the VM and the cumbersome
> frameworks and tool-chains. I have for long waited for some new compiled
> languages in the spirit of Python (witch I happen to love even though it
> has a VM and lack the performance of C/C++) making me a more productive
> developer without having to sacrify simplicity and performace. That's why I
> find Vala and Genie so very existing to me!

Full ACK.

Thanks,

:M:

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Jürg Billeter
Hi,

On Sat, 2009-05-09 at 15:06 +0200, Robert Palmqvist wrote:
> someu...@somehost:~$ vapigen --library libexif libexif/libexif.gi
> 
> (vapigen:23894): GLib-GObject-WARNING **: cannot register existing
> type `GeeCollectionObject'

This looks as if you're mixing vapigen and libvala of different
versions. Make sure you have only one version installed,
fix /etc/ld.so.conf, and/or set LD_LIBRARY_PATH.

Jürg

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Robert Palmqvist
On Sat, May 9, 2009 at 3:17 PM, Michael 'Mickey' Lauer <
mic...@vanille-media.de> wrote:

> On Saturday 09 May 2009 15:06:59 Robert Palmqvist wrote:
> > Hi everyone, this is my first post to this mailing list so let me take
> the
> > opportunity to thank you all for a new and existing language
>
> Guess you meant "exciting" here ;)


Exactly, thanks for spotting it :)


> > (compared to
> > some other bloated hogs that never managed to catch my attention even
> > though the rest of the world seems to find it best things since sliced
> > bread)!
>
> Now you made me curious... which ones?
>

I really don't want to point fingers or start a "my language is better than
yours" type of flame war but you asked for it so... My main concerns are
Java and C#. It's not as much the languages (even though I personally find
Java too verbose) but the imposed overhead by the VM and the cumbersome
frameworks and tool-chains. I have for long waited for some new compiled
languages in the spirit of Python (witch I happen to love even though it has
a VM and lack the performance of C/C++) making me a more productive
developer without having to sacrify simplicity and performace. That's why I
find Vala and Genie so very existing to me!
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vapigen errors?

2009-05-09 Thread Michael 'Mickey' Lauer
On Saturday 09 May 2009 15:06:59 Robert Palmqvist wrote:
> Hi everyone, this is my first post to this mailing list so let me take the
> opportunity to thank you all for a new and existing language

Guess you meant "exciting" here ;)

> (compared to
> some other bloated hogs that never managed to catch my attention even
> though the rest of the world seems to find it best things since sliced
> bread)!

Now you made me curious... which ones?

> A modern, OOP-oriented and simple language like Vala compiling
> straight to C leveraging something like GObjects, thats what I call exiting
> and well worth exploring!

Word!

:M:

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Vapigen errors?

2009-05-09 Thread Robert Palmqvist
Hi everyone, this is my first post to this mailing list so let me take the
opportunity to thank you all for a new and existing language (compared to
some other bloated hogs that never managed to catch my attention even though
the rest of the world seems to find it best things since sliced bread)! A
modern, OOP-oriented and simple language like Vala compiling straight to C
leveraging something like GObjects, thats what I call exiting and well worth
exploring!

Please forgive me for not trying hard enough before I post to this list but
I almost immediately ran into troubles that I haven't had time to fully
understand. My setup is a fresh install of Ubuntu 9.04 with the
addition of Vala
Team PPA . I had no
problems to compile, build and run some Vala
examplesso I got over confident and tried
to make my first Vala bindings following
the bindings tutorial . This is where I
ran into troubles...

I selected libexif  as my target and
everything was running smooth until I was trying to convert my gi-file into
a vapi-file using vapigen. The error messages I get is the following (anyone
know what went wrong?):

someu...@somehost:~$ vapigen --library libexif libexif/libexif.gi

 (vapigen:23894): GLib-GObject-WARNING **: cannot register existing type
`GeeCollectionObject'

 (vapigen:23894): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

 (vapigen:23894): GLib-GObject-WARNING **: cannot register existing type
`GeeMap'

 (vapigen:23894): GLib-GObject-WARNING **: cannot register existing type
`GeeCollectionObject'

 (vapigen:23894): GLib-GObject-CRITICAL **:
g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE
(interface_type)' failed

 (vapigen:23894): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

 (vapigen:23894): GLib-GObject-WARNING **: cannot create new instance of
invalid (non-instantiatable) type `'

Segmentation fault


libexif.files:

include/libexif/

lib/libexif.so


 libexif.namespace:

Exif


 libexif.gi:

[I removed this content and cancelled my first post since it got too big;
"Message body is too big: 192558 bytes with a limit of 40 KB", let me know
it you want me to post the entire content of the gi-file]
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list