Subject: Re: libvorbis using wrong library
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/04/2001 12:21:26
On Thu, 4 Oct 2001, Johnny Lam wrote:

> On Thu, Oct 04, 2001 at 10:08:43AM -0700, Jeremy C. Reed wrote:

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

> I believe you're mistaken about how ld.so.conf works on a NetBSD/ELF system.
> You may want to read ld.so.conf(5) and also the "NetBSD ELF FAQ" at:
> 
> 	http://www.netbsd.org/Documentation/elf.html
> 
> In particular, you should probably just remove that file since it's not
> useful in your environment, and causes the problems you note below.

Okay, I moved /etc/ld.so.conf. (And I replaced my conflicting
/usr/local/lib/libvorbis.so.0 file). And now /usr/pkg/bin/ogg123
works.

But now my /usr/local/bin/ogg123 does not work:

  Shared object "libvorbisfile.so" not found

I see from the FAQ that I could rebuild it with -R (point to the correct
libs).

It works fine when I use LD_LIBRARY_PATH=/usr/local/lib.

> > Another workaround (with /usr/local/lib/libvorbis.so.0 in place): So I
> > change my /etc/ld.so.conf 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.
> 
> This is one of the problems associated with misusing ld.so.conf on NetBSD/ELF
> systems, and is covered in the NetBSD ELF FAQ.

I have a variety of a.out and ELF files.

My /etc/ld.so.conf also listed /usr/X11R6/lib. With it removed I received:

 $ rxvt   
 Shared object "libX11.so.6" not found
 $ ldd `which rxvt`
 /usr/local/bin/rxvt:
          -lX11.6 => not found
          -lc.12 => /usr/lib/libc.so.12

I guess this was also built not knowing what library search path to use.

Thanks for the help. Time to recompile a bunch of tools.

   Jeremy C. Reed
   http://www.reedmedia.net/