GStreamer: HelloWorld example tip

Cross compiling the gstreamer HelloWorld example for my ARM J5 board, I ran into this warning and the associated error messages.

/development/toolchains/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libz.so.1, needed by /development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libgstreamer-0.10.so, not found (try using -rpath or -rpath-link)
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `inflateEnd'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `gzdirect'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `gzopen'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `gzclose'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `deflate'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `inflateInit2_'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `inflate'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `gzwrite'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `crc32'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `deflateEnd'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `gzdopen'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `deflateInit2_'
/development/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit/arm-none-linux-gnueabi/usr/lib/libxml2.so: undefined reference to `gzread'

From the gstreamer website it says to compile like this:
gcc -Wall helloworld.c -o helloworld $(pkg-config –cflags –libs gstreamer-1.0)
I needed to do this:
gcc -Wall helloworld.c -o helloworld $(pkg-config –cflags –libs gstreamer-1.0) -lz

The -lz option tell the linker to link the library libz and that fixes the problem.

Also, here’s a site for some ogg files:

http://www.01audio-video.com/telecharger_ogg_pop.htm

Advertisements
This entry was posted in Linux and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s