Subject: libvorbis using wrong library
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 10/03/2001 19:02:35
Please note that I have a working libvorbis-1.0beta4 installed under

Today, I tried to use vorbis-tools- package (1.0rc2) which needs
libvorbis- package (1.0rc2).

Notice below the reference to -lm /usr/local/lib/libogg.a:

Making all in examples
/bin/sh ../libtool --mode=link cc  -O20 -D__NO_MATH_INLINES -fsigned-char -I/usr
/pkg/pkgsrc/audio/libvorbis/work/.buildlink/include -O2 -DUSE_MEMORY_H -static -
o chaining_example  chaining_example.o ../lib/
la -lm -L/lib -logg
cc -O20 -D__NO_MATH_INLINES -fsigned-char
-I/usr/pkg/pkgsrc/audio/libvorbis/work/.buildlink/include -O2
-DUSE_MEMORY_H -o chaining_example chaining_example.o
-L/usr/pkg/pkgsrc/audio/libvorbis/work/.buildlink/lib -L/lib
../lib/.libs/libvorbis.a -lm /usr/local/lib/libogg.a
../lib/.libs/libvorbisfile.a(vorbisfile.o): In function
vorbisfile.o(.text+0x1939): undefined reference to `ogg_stream_packetpeek'
../lib/.libs/libvorbisfile.a(vorbisfile.o): In function `ov_pcm_seek':
vorbisfile.o(.text+0x1aa1): undefined reference to `ogg_stream_packetpeek'
collect2: ld returned 1 exit status

From a quick look I couldn't find local/lib in any makefiles or
configure-related files.

When I moved the old libogg.a, I received:
  cc: /usr/local/lib/libogg.a: No such file or directory

So I looked closer:


and other .la and .lai files referenced my /usr/local/lib/libogg libaries.

I don't know libtool. How can I make it always use the /usr/pkg/lib/
libraries first?

(Please note that my libogg package is installed and libogg libraries are
installed under /usr/pkg/lib/.)

Or maybe its this new buildlink stuff. Where can I learn more about
utilizing buildlink?


   Jeremy C. Reed