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

> On Wed, 21 Apr 2004 13:15:13 +0300
> "Mike M. Volokhov" <mishka@apk.od.ua> 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 libjpeg.so has stored. But ldd(1) shows the following:

work/djvulibre-3.5.12/tools/djvups:
         -ldjvulibre-3.5 => not found
         -ljpeg.62 => not found
         -lstdc++.5 => /usr/lib/libstdc++.so.5
         -lm.0 => /usr/lib/libm387.so.0
         -lm.0 => /usr/lib/libm.so.0
         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
         -lpthread.0 => /usr/lib/libpthread.so.0
         -lc.12 => /usr/lib/libc.so.12

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.

--
Mishka.