Subject: Re: gtk2 fails to build
To: None <netbsd-users@netbsd.org>
From: None <sigsegv@rambler.ru>
List: netbsd-users
Date: 08/14/2004 14:40:20
sigsegv@rambler.ru wrote:
> Jeremy C. Reed wrote:
>
>> On Fri, 13 Aug 2004 sigsegv@rambler.ru wrote:
>>
>>
>>
>>> I just did a fresh "cvs checkout" of pkgsrc. Trying to build
>>> firefox-gtk2 in a chrooted environment, the build fails on gtk2 with
>>> the
>>> following message. Anyone had the same problems, or is it just me?
>>>
>>
>>
>>
>>
>>> ld: warning: libexpat.so.5, needed by
>>> /usr/obj.i386_athlon-tbird/pkg/x11/gtk2/work/.bui
>>> ldlink/lib/libfontconfig.so, not found (try using -rpath or
>>> -rpath-link)
>>> /usr/obj.i386_athlon-tbird/pkg/x11/gtk2/work/.buildlink/lib/libfontconfig.so:
>>>
>>> undefined
>>> reference to `XML_SetElementHandler'
>>>
>>
>>
>> Do you have expat package installed? What version?
>>
>> What fontconfig package version do you have installed?
>>
>> I wonder if this is an issue with using a native (builtin) libexpat
>> and/or
>> libfontconfig versus pkgsrc version?
>>
>>
>>
> I think I'm missing something in my chrooted environment
>
> # cat test.c
> int main(void) {
>
> }
>
> gcc -L/usr/X11R6/lib test.c -lXcursor
> compiles OK, i.e.
>
> # ldd a.out
> a.out:
> -lXcursor.1 => not found
> -lc.12 => /usr/lib/libc.so.12
>
>
> but in a chrooted environment it gives me:
>
> # gcc -L/usr/X11R6/lib test.c -lXcursor
> /usr/tools.i386_athlon-tbird/lib/gcc-lib/i386--netbsdelf/3.3.3/../../../../i386--netbsdelf/bin/ld:
> warning: libXrender.so.1, needed by /usr/X11R6/lib/libXcursor.so, not
> found (try using -rpath or -rpath-link)
> /usr/tools.i386_athlon-tbird/lib/gcc-lib/i386--netbsdelf/3.3.3/../../../../i386--netbsdelf/bin/ld:
> warning: libXext.so.6, needed by /usr/X11R6/lib/libXcursor.so, not
> found (try using -rpath or -rpath-link)
> /usr/tools.i386_athlon-tbird/lib/gcc-lib/i386--netbsdelf/3.3.3/../../../../i386--netbsdelf/bin/ld:
> warning: libX11.so.6, needed by /usr/X11R6/lib/libXcursor.so, not
> found (try using -rpath or -rpath-link)
> /usr/X11R6/lib/libXcursor.so: undefined reference to `XFreePixmap'
> /usr/X11R6/lib/libXcursor.so: undefined reference to `XFreeCursor'
> /usr/X11R6/lib/libXcursor.so: undefined reference to
> `XRenderQueryExtension'
> /usr/X11R6/lib/libXcursor.so: undefined reference to `XRenderFreePicture'
> /usr/X11R6/lib/libXcursor.so: undefined reference to
> `XRenderFindStandardFormat'
> /usr/X11R6/lib/libXcursor.so: undefined reference to `XLoadFont'
>
> ... and so on
>
Well I found out what the problem was, I was using a cross-compiler
which was built with the base system and was first in my PATH, and it
seems if a linker is configured to be a cross-linker, it will ignore any
-L<libdir> flags passed to it, hence it could not find the required
libraries