pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: glib2 linking




Em sáb, 2024-03-30 às 10:56 +0100, triaxx%NetBSD.org@localhost escreveu:
> I try to build a binary that is linked to glib2:
> 
>      $ make foo
>      cc `pkg-config --cflags glib-2.0` -o foo foo.c `pkg-config --libs 
> glib-2.0` -lpthread
>      ld: warning: libintl.so.1, needed by /usr/pkg/lib/libglib-2.0.so, 
> may conflict with libintl.so.8
>      ld: warning: libintl.so.1, needed by /usr/pkg/lib/libglib-2.0.so, 
> may conflict with libintl.so.8
> 
> I understand that:
> 
>      $ pkg-config --libs glib-2.0
>      -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lglib-2.0 -lintl
> 
> makes my binary linked to /usr/pkg/lib/libintl.so.8. But:
> 
>      $ ldd /usr/pkg/lib/libglib-2.0.so
>      /usr/pkg/lib/libglib-2.0.so:
>              -lintl.1 => /usr/lib/libintl.so.1
>              -lc.12 => /usr/lib/libc.so.12
>              -lpcre2-8.0 => /usr/pkg/lib/libpcre2-8.so.0
>              -lpthread.1 => /usr/lib/libpthread.so.1
> 
> makes me know that devel/glib2 has been linked to /usr/lib/libintl.so.1.
> 
> devel/glib2 has been built on NetBSD 10.99.10 x86_64 from /usr/pkgsrc.
> 
> Is there a misconfiguration on my system?
> 
my setup using NetBSD 10.0 release....

ldd /usr/pkg/lib/libglib-2.0.so
/usr/pkg/lib/libglib-2.0.so:
	-lintl.8 => /usr/pkg/lib/libintl.so.8
	-lc.12 => /usr/lib/libc.so.12
	-lm.0 => /usr/lib/libm.so.0
	-lpcre2-8.0 => /usr/pkg/lib/libpcre2-8.so.0
	-lpthread.1 => /usr/lib/libpthread.so.1

just rebuild devel/glib2 to link against /usr/pkg/lib
or use mine
export PKG_PATH=http://netbsd.k1.com.br/NetBSD-x86_64-10.0/packages
than....   pkg_add -Uv glib2
beware that it may download all the dependencies from glib2 from that 
site...
If you are not confortable with it, just download only the glib2..

http://dist64.k1.com.br/NetBSD/NetBSD-x86_64-10.0/packages/glib2-2.78.1nb1.tgz

and do a pkg_add glib2-2.78.1nb1.tgz




Home | Main Index | Thread Index | Old Index