Subject: Re: Dependencies on bl3fied libraries
To: Juan RP <>
From: Mike M. Volokhov <>
List: tech-pkg
Date: 04/21/2004 13:33:09
On Wed, 21 Apr 2004 12:17:25 +0200
Juan RP <> wrote:

> On Wed, 21 Apr 2004 13:15:13 +0300
> "Mike M. Volokhov" <> wrote:
> > Seems just all. And seems with -Wl,-R... flags only, but I'm not sure.
> > How to determine exactly?
> I built some random packages, and didn't see your problem, perhaps the problem
> comes from qt3? I have not tried this.
> Do you have some file modified?

No. All pkgsrc from yesterday anon-CVS repository. But I'm working on new
package - DjVuLibre.

[*] /build/pkgsrc/wip/djvulibre/work/.buildlink/bin/g++ -o djvups -I/usr/pkg/inc
lude/djvulibre -I/usr/pkg/include -DHAVE_CONFIG_H -I.. -I../libdjvu -I. -DNO_DEB
UG -Wall -O3 -mcpu=i386 -pthread -DTHREADMODEL=POSIXTHREADS djvups.o -ldjvulibre
 -ljpeg -lm
<.> /build/pkgsrc/wip/djvulibre/work/.gcc/bin/g++ -o djvups -I/build/pkgsrc/wip/
djvulibre/work/.buildlink/include/djvulibre -I/build/pkgsrc/wip/djvulibre/work/.
buildlink/include -DHAVE_CONFIG_H -I.. -I../libdjvu -I. -DNO_DEBUG -Wall -O3 -mc
pu=i386 -pthread -DTHREADMODEL=POSIXTHREADS djvups.o -L/build/pkgsrc/wip/djvulib
re/work/.buildlink/lib -ldjvulibre -ljpeg -lm

In the output above, the djvups has been linked against libjpeg. The g++
command was finished successfuly so as it got a link to .buildlink/lib
where has stored. But ldd(1) shows the following:

         -ldjvulibre-3.5 => not found
         -ljpeg.62 => not found
         -lstdc++.5 => /usr/lib/
         -lm.0 => /usr/lib/
         -lm.0 => /usr/lib/
         -lgcc_s.1 => /usr/lib/
         -lpthread.0 => /usr/lib/
         -lc.12 => /usr/lib/

This happens if I don't pass ${LDFLAGS} (which contains -Wl,-R/usr/pkg/lib
flag, where both libdjvulibre and libdjpeg resides) directly in
distribution Makefile. But I think it should be passed to C compiler by a
wrapper, or I've missing something?

And this is a cause, why /usr/pkg/qt3/lib is not available as run path.