GStreamer install for cross compilation

This is a very beginner question, but in searching the web, I’ve found more confusion than solutions…

I would like to build the Hello world" GStreamer app from http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html#section-helloworld. My development environment is Ubuntu, and my target is a Beagleboard XM with Angstrom on it. My make file is the following:

SHELL = /bin/sh
SRCDIR = .
CC = arm-linux-gnueabi-gcc
YACC = bison -y
CDEBUG = -g
COMPLIANCE_FLAGS =
CFLAGS = $(COMPLIANCE_FLAGS) $(CDEBUG)
INCLUDES = -I. -I$(SRCDIR) -I/usr/arm-linux-gnueabi/include/ -I/usr/arm-linux-gnueabi/include/gstreamer-0.10/ -I/usr/arm-linux-gnueabi/include/glib-2.0/ -I/usr/arm-linux-gnueabi/lib/glib-2.0/include/ -I/usr/arm-linux-gnueabi/include/libxml2/
LDFLAGS = -g
LIBRARIES = -L. -L/usr/arm-linux-gnueabi/lib -lgtk-x11-2.0 -lgstbase-0.10 -lm

This is a very beginner question, but in searching the web, I've found
more confusion than solutions...

Cross compiling takes a little practice. Don't be discouraged.

I would like to build the Hello world" GStreamer app from
Your first application. My development environment is Ubuntu, and my target is a Beagleboard
XM with Angstrom on it. My make file is the following:

It sounds like you're building this outside of the build environment for
Angstrom. That's fine, but be sure you have two things:
1. The cross toolchain installation location
2. The root file system for your target board (re: the beagleboard)
unpacked on your host

These two items include both the tools necessary for cross compiling
your program as well as the header and library files your program may
need to be properly linked into an executable program that can run on
your target hardware.

I see nothing in your original post about setting your PATH before doing
this, so I'm assuming you set PATH as

   PATH=<PATH to toolchain/bin>:$PATH

or something similar before attempting to perform the compile.

SHELL = /bin/sh
SRCDIR = .
CC = arm-linux-gnueabi-gcc
YACC = bison -y
CDEBUG = -g
COMPLIANCE_FLAGS =
CFLAGS = $(COMPLIANCE_FLAGS) $(CDEBUG)
INCLUDES = -I. -I$(SRCDIR) -I/usr/arm-linux-gnueabi/include/
-I/usr/arm-linux-gnueabi/include/gstreamer-0.10/
-I/usr/arm-linux-gnueabi/include/glib-2.0/
-I/usr/arm-linux-gnueabi/lib/glib-2.0/include/
-I/usr/arm-linux-gnueabi/include/libxml2/

Notice here (above, INCLUDES=) that you specify include directories
under /usr/arm-linux-gnueabi. I'm guessing, but that directory is
probably your toolchain. The gstreamer, glib and libxml2 are probably
in your root file system include directories. Be sure to double check
that the include directories above actually exist.

In short, you need -I<rootfs>/usr/include, one each of
-I<rootfs>/usr/include/<package include dir> for each dependency (glib2,
gstreamer, etc) and possibly -I<toolchain>/<target includes>.

LDFLAGS = -g
LIBRARIES = -L. -L/usr/arm-linux-gnueabi/lib -lgtk-x11-2.0
-lgstbase-0.10 -lm

Here (above, LIBRARIES=) you specify /usr/arm-linux-gnueabi/lib for the
location to search for related libraries.
Assuming /usr/arm-linux-gnueabi is your root file system (a different
assumption than what I made for INCLUDES=), you'd also want to add
-L/usr/arm-linux-gnueabi/usr/lib to this. You may also want to add a
reference to your toolchain target libraries directory, ie where you
find libc for your target hardware. However, with an angstrom root file
system that may not be necessary.

In other words, you need -L<rootfs>/lib -L<rootfs>/usr/lib and possibly
-L<toolchain>/<target libs>.

You also specify -lgtk-x11-2.0 -lgstbase-0.10 -lm. This is fine, but
you'll probably also need -l entries for glib and libxml2.

When I run the program, I receive the following errors:
wws@wws-HP-Compaq-nc8430-EY685AW-ABA:~/Dropbox/Administrative/summer_projects/SE3910/Labs/lab5b$ pkg-config
Must specify package names on the command line
wws@wws-HP-Compaq-nc8430-EY685AW-ABA:~/Dropbox/Administrative/summer_projects/SE3910/Labs/lab5b$ man pkg-config

These two commands didn't do anything for your compile. It appears you
were trying to update your pkg-config settings, but when cross compiling
you really don't want to mix your host-system pkg-config settings with
your cross compilation pkg-config settings.

Even so, your previous setup (INCLUDE=, LIBRARIES=) make it unnecessary
to worry about pkg-config settings for this particular compilation.

wws@wws-HP-Compaq-nc8430-EY685AW-ABA:~/Dropbox/Administrative/summer_projects/SE3910/Labs/lab5b$ make all
arm-linux-gnueabi-gcc -o camera testcode.o -L.
-L/usr/arm-linux-gnueabi/lib -lgtk-x11-2.0 -lgstbase-0.10 -lm
testcode.o: In function `bus_call':
/home/wws/Dropbox/Administrative/summer_projects/SE3910/Labs/lab5b/testcode.c:15: undefined reference to `g_print'
/home/wws/Dropbox/Administrative/summer_projects/SE3910/Labs/lab5b/testcode.c:16: undefined reference to `g_main_loop_quit'
/home/wws/Dropbox/Administrative/summer_projects/SE3910/Labs/lab5b/testcode.c:23: undefined reference to `gst_message_parse_error'

All of these undefined g_xxx and gst_xxx references mean that make (or
rather ld) couldn't find the libraries that hold these functions. That
points to your LIBRARIES= configuration being incorrect. Start with
that and see how it changes things.

#1 Is there something wrong with my installation of the gstreamer
libraries on my Ubuntu system preventing cross compilation from
working?

Your gstreamer libraries on your host system are incompatible with the
application your trying to build (unless your trying to build on the
target board, which based on the subject line I assume you're not). You
need to reference the gstreamer libraries in the Angstrom root file
system, which you must unpack into a directory somewhere on your host
(re:Ubuntu) system.

#2 Is there something wrong with my gtk installation preventing cross
compilation from working?

Same issue.

My gut feel is it is something very obvious, and my gut is usually
right. But I'm not seeing an obvious solution from the many pages
I've looked at.

Well, it's obvious if you've done this a bunch. Maybe not so obvious if
you're just starting.

Good luck.

It appears you’r missing your glib libraries. In fact you don’t specify them in your makefile so that why there are symbols unresolved.
You may call make with “V=1” that will show the file compilation with its parameters
In fact when you install gstreamer it installs some files (.pc extension) for pkg-config that you may reuse for your compilation (pkg-config ‘libname’ -c/-l for Compilation/Linker). That’s a way to resolve dependencies.
Oh and don’t forget to set the PKG_CONFIG_PATH to your target rootfs pkg-config files.