Subject: Re: libvorbis using wrong library
To: None <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 10/04/2001 10:08:43
On Wed, 3 Oct 2001, Johnny Lam wrote:

> I browsed through the configure output and everything looks just fine.
> According to what I see, the build should be using only what it finds in
> /usr/pkgsrc/audio/libvorbis/.buildlink to compile and link.  Was the
> problematic build you experienced earlier caused by unusual,
> LD_RUN_PATH, or LD_LIBRARY_PATH settings?  Also, what platform/version

My /etc/ did have /usr/local/lib above (before) /usr/pkg/lib. I
changed this and (after make clean) the error continued.

> of NetBSD are you running?

Sorry. NetBSD/i386 1.5.1_BETA 

On Thu, 4 Oct 2001, Nick Hudson wrote:

> I think this probably because of...
> $ grep local /usr/pkg/bin/libtool
> sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
> sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
> Could you hack libtool and remove the reference to /usr/local/lib and see if
> this helps

Okay, I modified ../libogg/work/libogg-1.0rc2/libtool to remove the
'/usr/local/lib' from three lines. Then libvorbis built clean.

I just noticed that was a symlink to /usr/pkg/bin/libtool. (Why was I
doing this as root!) Oh well. I guess I wanted to do that anyways.


 $ /usr/pkg/bin/ogg123 -v acdc-who_made_who.ogg 
 Playing from file acdc-who_made_who.ogg.
 /usr/pkg/lib/ Undefined PLT symbol "vorbis_packet_blocksize"
 (reloc type = 7, symnum = 56)

 $ ldd /usr/local/bin/ogg123
          -lvorbisfile => /usr/local/lib/
          -lvorbis => /usr/local/lib/
          -lm.0 => /usr/lib/
          -lm.0 => /usr/lib/
          -logg => /usr/local/lib/
          -lao => /usr/local/lib/
          -lossaudio.0 => /usr/lib/
          -lc.12 => /usr/lib/
 $ ldd /usr/pkg/bin/ogg123
          -lm.0 => /usr/lib/
          -lm.0 => /usr/lib/
          -logg.2 => /usr/pkg/lib/
          -lvorbisfile.1 => /usr/pkg/lib/
          -lvorbis.0 => /usr/local/lib/
          -lao.2 => /usr/pkg/lib/
          -lc.12 => /usr/lib/

I wonder why two different (incompatible) libraries "" have
same number so it used /usr/local/lib/ instead of
/usr/pkg/lib/ (These are symlinks to their 

By moving the /usr/local/lib/ file, I was successfully able
to use the new /usr/pkg/bin/ogg123. And I was successfully able to use
/usr/local/lib/ogg123 which uses /usr/local/lib/ (symlink to instead of /usr/local/lib/

Another workaround (with /usr/local/lib/ in place): So I
change my /etc/ so /usr/pkg/lib is above /usr/local/lib and now
it works. But my old /usr/local/bin/ogg123 doesn't work anymore due to
using newer libraries.

   Jeremy C. Reed