MikeK's software notebook

MikeK's software notebook

What you will find

This used to be the place where I wrote stuff I was thinking about while working on the Mozilla project.

Maybe in the near future I'll start to update it again as I'm involved in a couple of new open-source projects - updates pending...

/usr/include/gstreamer-0.10/gst/gstbuffer.h:359: error: comma at end of enumerator list

GStreamerPosted by Mike Kristoffersen 23 Mar, 2009 14:07:39
So the version of the compiler that is used here aparently doesn't support the following:

typedef enum {
GST_BUFFER_COPY_FLAGS = (1 << 0),
GST_BUFFER_COPY_TIMESTAMPS = (1 << 1),
GST_BUFFER_COPY_CAPS = (1 << 2),
} GstBufferCopyFlags;

Which as far as I remember is one of the of the "newer" add-ons to the language, it's easy to solve, as we just have to remove the last comma:

typedef enum {
GST_BUFFER_COPY_FLAGS = (1 << 0),
GST_BUFFER_COPY_TIMESTAMPS = (1 << 1),
GST_BUFFER_COPY_CAPS = (1 << 2)
} GstBufferCopyFlags;


  • Comments(0)//developer.mikek.dk/#post11

error: libxml/parser.h: No such file or directory

GStreamerPosted by Mike Kristoffersen 23 Mar, 2009 13:54:25
Another header file seems to be missing, until now the solution for this problem has either been to add the correct include path to the build system and/or to install the package that is needed in scratchbox.

A package search reveals a plosible hit with the libxml++2.6-dev package, searching for the file gives some hits, lets try:

-I/usr/include/libxml2 \

In the INCLUDES section of the make file.

Yep - that solved it.

  • Comments(0)//developer.mikek.dk/#post10

0.10 vs 0.10.22 or attention to details

GStreamerPosted by Mike Kristoffersen 23 Mar, 2009 12:18:52
Can you remember I was adding:

-I$(srcdir)/../../../../gstreamer/gstreamer-0.10.22 \

To the build file? - mmm.... that is not a complete gstreamer lib and I got errors about missing include files using that one :( the "real" one is in another place, it can be found in /usr/include/gstreamer-0.10 so the correct include modification to the make file should be:

-I/usr/include/gstreamer-0.10 \

I took me a little while to figure out what was going on, since a file search found it (in the 0.10 dir), but the compiler couldn't, because it looked in ...0.10.22 :)

Now, one should start to ask oneself, why is there an "incomplete" gestreamer-0.10.22 on my drive, is it a patch?

  • Comments(0)//developer.mikek.dk/#post9

My mistake: *** commands commence before first target. Stop

GStreamerPosted by Mike Kristoffersen 23 Mar, 2009 11:01:13
It was a bad idea to have the #ifdef MOZ_GSTREAMER in the middle of the include files, it probably has something to do with the line continuation character just before the #ifdef - I'm not familiar with the pass steps for a makefile, but obviously it was messed up :) so away they go, now using just:

-I$(srcdir)/../../../../gstreamer/gstreamer-0.10.22 \
-I/usr/include/glib-2.0 \
-I/usr/include/glib-2.0/include \
-I/usr/lib/glib-2.0/include \


  • Comments(0)//developer.mikek.dk/#post8

glib.h Missing

GStreamerPosted by Mike Kristoffersen 23 Mar, 2009 09:48:34
As I don't want to type all that stuff again, about why, and how I did - let me give you the short form - gstreamer needs glib. It was installed in my scrachbox, but it did not have its include path setup in the build.

The solution was to add the following, the the INCLUDES section of the makefile that also makes the gstreamer decoder:

ifdef MOZ_GSTREAMER
-I$(srcdir)/../../../../gstreamer/gstreamer-0.10.22 \
-I/usr/include/glib-2.0 \
-I/usr/include/glib-2.0/include \
-I/usr/lib/glib-2.0/include \
endif


I'm not sure if it is the correct place to do it, nor if it is done in the right way, but it makes sence that it is working if you do it in this place - I always get a little worried when I see stuff like ../../../ in makefiles, as it can lead to "funny" issues if you at another time want to move anything around in the tree.

(The gstreamer line was added previously to allow inclusion of the gstreamer header files)

The ifdef MOZ_GSTREAMER protection, is also something that should be considered agian, while it's probably fine for the gstreamer directory, putting the "generic" glib includes under the same protection could lead to problems if any other code startet to rely on glib too. - It will work find as long as gstreamer is included in the build, but if it isn't then the header files for glib cant be found. If another entity includes them too, then we might have multiple entries pointing the same include directory - not good either, as a messed up include dir can increase compile times significantly - for a project this size I don't know if it will matter thou...

1 down x to go - Next entry about not found gst/* files :) - I now cross my fingers that this entry will be accepted by the server.... (Ctrl+A Ctrl+C)

  • Comments(0)//developer.mikek.dk/#post7

Couldn't find X11/extensions/XDamage.h which is required for composite plugins

GStreamerPosted by Mike Kristoffersen 20 Mar, 2009 13:29:46
So getting the mozconfig file right, I now faced the next problem:

checking for X11/extensions/XDamage.h... no
configure: error: Couldn't find X11/extensions/XDamage.h which is required for composite plugins.


hmm... could this be from adding the gstreamer lib? - An initial google search didn't give much hint's except there seems to be a libxdamage package.. hmm... wonder what a:

[sbox-CHINOOK-ARMEL-2007: ~/mozilla-central] > apt-cache search xdamage

will do... a number of packages called something with libxdamage, I start to see a pattern here :) - lets try to install it:

[...: ~/mozilla-central] > apt-get install libxdamage-dev

Yep, that was it - wonder if the next error has the same solution, first the error is:

configure: error: Could not find the following X libraries: -lXComposite

Search for the lib:

[...: ~/mozilla-central] > apt-cache search lXComposite

How about:

[...: ~/mozilla-central] > apt-cache search XComposite

Yep, we got a hit ! - I misinterpreted the error message, the -l is probably an option meaning library, hence the "l" is not part of the library name - lets install it, and move along:

[...: ~/mozilla-central] > apt-get install libxcomposite-dev

Problem solved [2-0] to me :) - next problem is an:

mmap: Permission denied

Where did I see this one before....

  • Comments(0)//developer.mikek.dk/#post4

Getting the libs

GStreamerPosted by Mike Kristoffersen 20 Mar, 2009 10:13:46
So I got Ubuntu running in the virtual machine, I got scratchbox running, my initial update of the previous integration of GStreamer copied to the Ubuntu disk, with the best verison of mozconfig that I could find - but I needed to have the gstreamer developer package installed into scratchbox - this is what I did (with thanks to the help I got from the people on #mobile):

Search for the correct package name (run from within scratchbox):

[sbox-CHINOOK-ARMEL-2007: ~] > apt-cache search gstreamer

This gives a list of all the packages that has something to do with gstreamer, I knew I wanted the dev package, since I was going to need the header files in order to be able to compile the integration code.

From the list of packages I found "libgstreamer0.10-dev", so next was to install it:

[sbox-CHINOOK-ARMEL-2007: ~] > apt-get install libgstreamer0.10-dev

BINGO! my build now passed the point where it complained about not being able to find the gstreamer lib :)

Now it was complaining about JAVA :(

Stay tuned for the next update!

  • Comments(0)//developer.mikek.dk/#post1
« Previous