Game Development Community

Hardy Heron compile problem

by Hans Cremers · in Technical Issues · 04/22/2008 (11:21 am) · 9 replies

I hope someone can help me with this one.

I'm getting these errors:
Seems to large to post here so please visit http://pastebin.com/m63d4f73f for the full log.

out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::_decode_clear()':
vorbisStream.cc:(.text+0x191): undefined reference to 'ogg_stream_clear'
vorbisStream.cc:(.text+0x1a0): undefined reference to 'vorbis_dsp_clear'
vorbisStream.cc:(.text+0x1af): undefined reference to 'vorbis_block_clear'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::ov_clear()':
vorbisStream.cc:(.text+0x1ec): undefined reference to 'vorbis_block_clear'
vorbisStream.cc:(.text+0x1fb): undefined reference to 'vorbis_dsp_clear'
vorbisStream.cc:(.text+0x208): undefined reference to 'ogg_stream_clear'
vorbisStream.cc:(.text+0x268): undefined reference to 'ogg_sync_clear'
vorbisStream.cc:(.text+0x2a0): undefined reference to 'vorbis_info_clear'
vorbisStream.cc:(.text+0x2b5): undefined reference to 'vorbis_comment_clear'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::_make_decode_ready()':
vorbisStream.cc:(.text+0x413): undefined reference to 'vorbis_synthesis_init'
vorbisStream.cc:(.text+0x42c): undefined reference to 'vorbis_block_init'
vorbisStream.cc:(.text+0x451): undefined reference to 'vorbis_synthesis_init'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::_get_data()':
vorbisStream.cc:(.text+0x4f9): undefined reference to 'ogg_sync_buffer'
vorbisStream.cc:(.text+0x52c): undefined reference to 'ogg_sync_wrote'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::_get_next_page(ogg_page*, int)':
vorbisStream.cc:(.text+0x599): undefined reference to 'ogg_sync_pageseek'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::_bisect_forward_serialno(long, long, long, long, long)':
vorbisStream.cc:(.text+0xcb8): undefined reference to 'ogg_sync_reset'
vorbisStream.cc:(.text+0xcd1): undefined reference to 'ogg_sync_pageseek'
vorbisStream.cc:(.text+0xd5d): undefined reference to 'ogg_sync_reset'
vorbisStream.cc:(.text+0xd72): undefined reference to 'ogg_sync_pageseek'
vorbisStream.cc:(.text+0xdeb): undefined reference to 'ogg_page_serialno'
vorbisStream.cc:(.text+0xefb): undefined reference to 'ogg_page_serialno'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::_get_prev_page(ogg_page*)':
vorbisStream.cc:(.text+0xfa9): undefined reference to 'ogg_sync_reset'
vorbisStream.cc:(.text+0x1025): undefined reference to 'ogg_sync_pageseek'
vorbisStream.cc:(.text+0x10a7): undefined reference to 'ogg_sync_reset'
vorbisStream.cc:(.text+0x10f9): undefined reference to 'ogg_sync_pageseek'
out.GCC4.1.RELEASE/audio/vorbisStream.obj: In function 'OggVorbisFile::ov_raw_seek(long)':
vorbisStream.cc:(.text+0x130a): undefined reference to 'ogg_stream_clear'
vorbisStream.cc:(.text+0x1319): undefined reference to 'vorbis_dsp_clear'
vorbisStream.cc:(.text+0x1328): undefined reference to 'vorbis_block_clear'
vorbisStream.cc:(.text+0x135e): undefined reference to 'ogg_sync_reset'
vorbisStream.cc:(.text+0x13b7): undefined reference to 'ogg_sync_pageseek'
vorbisStream.cc:(.text+0x1460): undefined reference to 'ogg_stream_clear'
vorbisStream.cc:(.text+0x148d): undefined reference to 'ogg_stream_packetout'
vorbisStream.cc:(.text+0x14b7): undefined reference to 'vorbis_packet_blocksize'
More see: http://pastebin.com/m63d4f73f

System:
Ubuntu: Hardy Heron
gcc-4.1 and g++-4.1
my version of libvorbis-dev is 1.2.0.dfsg-2
TGE 1.5.2

Much thanks in advance

#1
04/25/2008 (7:00 am)
Any pointers, anyone?
#2
04/25/2008 (7:44 am)
To me looks like the Ogg/Vorbis libraries are not linked in. Check the makefiles whether the correct -l and -L options are there.
#3
04/26/2008 (5:38 am)
Thanks for your reply Rene.

What library name should be used for linking?
#4
04/26/2008 (10:48 am)
I suppose it's libogg and libvorbis that you need. Just make sure the command line for linking contains a -logg and -lvorbis.

If GCC can't find the libraries, then they are installed in a non-standard location. Locate the files on your system (they may have some version suffixes and will have an .a or .so file suffix). Dependening on your system configuration, it may work to do a

> locate libogg
> locate libvorbis

and then add a -L option to the link command line.

Kind of odd, though. TGE's makefiles should be properly set up to do this.
#5
04/26/2008 (10:51 am)
Ah, and before you go through all the hassle, check the link command line to see whether it's really that the libraries aren't there. If they are, my guess was wrong.
#6
04/26/2008 (12:24 pm)
Quote:What library name should be used for linking?

Whatever pkg-config tells you. Instead of futzing about finding stuff yourself, most of the time you can just use

'pkg-config vorbis --libs' 'pkg-config ogg --libs'

Just put that in the command. Yes, those are backticks [the thing below the tilde on an enUS keyboard]

Gary (-;
#7
04/30/2008 (12:53 am)
Thank you Garry and Rene.
Sorry for the late reply, the weekend was to busy to work with torque.

Using the *nix's "locate" gives me the locations of the libraries, but in what makefile should these be put in? There are multiple makefiles that are located in different directories throughout the main directory.

Thanks again!
#8
04/30/2008 (10:43 am)
The file is conf.UNIX.mk IIRC

I think it's the LINK.LIBS.GENERAL variable but I haven't looked in a while

Gary (-;
#9
05/01/2008 (9:14 am)
Thanks a lot that worked!