[Evolution-hackers] Re: Problem of building gtkhtml
- From: Calvin Liu <calvin liu sun com>
- To: Laszlo Peter <Laszlo Peter sun com>
- Cc: glynn foster sun com, evolution-hackers ximian com, sceri-evolution <sceri-evolution sun com>
- Subject: [Evolution-hackers] Re: Problem of building gtkhtml
- Date: Mon, 19 May 2003 17:31:53 +0800
Laca,
Thanks!
You gave me a perfect explanation and pointed a right way. I took a
quick way, just add -lX11 to LDFLAGS in that Makefile, to cover this
issue. Now I know why it happened. Thanks again.
Calvin
Laszlo Peter wrote:
Hi,
If a program uses Xlib directly, it needs to link against it explicitely.
The Solaris linker recognises that this symbol belogns to Xlib (by looking
at libbonoboui, which is linked to libX11) but it won't link to it
automatically (unlike GNU ld).
The solution is to add this to configure.in (if not there already):
AC_PATH_XTRA
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_SUBST(ALL_X_LIBS)
and add $(ALL_X_LIBS) to the LDADD line to the binary that uses Xlib.
HTH,
Laca
On Sun, 18 May 2003, Calvin Liu wrote:
Hi, there,
I met a problem when build gtkhtml on solaris, it reported:
*Undefined first referenced
symbol in file
XSendEvent /usr/dist/share/gnome-2.0/lib/libbonoboui-2.a(bonobo-plug.o)
(symbol belongs to implicit dependency
/usr/lib/libX11.so.4)XSetErrorHandler
/usr/dist/share/gnome-2.0/lib/libbonoboui-2.a(bonobo-ui-main.o) (symbol
belongs to implicit dependency /usr/lib/libX11.so.4)*/*
*/Sounds like a problem with libbonoboui?
Then I tried the followings:
_1. Verify if the files libbonoboui-2.so and libbonoboui-2.a are created
at the same time._
*$ ls -l /usr/dist/share/gnome-2.0/lib/libbonoboui-2.*
-rw-r--r-- 1 work staff 1030292 May 13 20:33
/usr/dist/share/gnome-2.0/lib/libbonoboui-2.a
-rwxr-xr-x 1 work staff 2689 May 13 20:33
/usr/dist/share/gnome-2.0/lib/libbonoboui-2.la
lrwxrwxrwx 1 work staff 22 May 13 20:33
/usr/dist/share/gnome-2.0/lib/libbonoboui-2.so -> libbonoboui-2.so.0.0.0
lrwxrwxrwx 1 work staff 22 May 13 20:33
/usr/dist/share/gnome-2.0/lib/libbonoboui-2.so.0 -> libbonoboui-2.so.0.0.0
-rwxr-xr-x 1 work staff 1017064 May 13 20:33
/usr/dist/share/gnome-2.0/lib/libbonoboui-2.so.0.0.0
*
_2. See if libX11.so* was linked to libbonoboui-2.so. (Then I think that
means it also was linked to libbonoboui-2.a, right?)_
* $ ldd /usr/dist/share/gnome-2.0/lib/libbonoboui-2.so | grep X
libXext.so.0 => /usr/lib/libXext.so.0
libX11.so.4 => /usr/lib/libX11.so.4
*
_3. See if the symbol XSendEvent was referenced in libbonoboui-2.a and
libbonoboui-2.so_
*$ nm /usr/dist/share/gnome-2.0/lib/libbonoboui-2.so|grep XSendEvent
[5918] | 0| 0|NOTY |GLOB |0 |UNDEF |XSendEvent
$ nm /usr/dist/share/gnome-2.0/lib/libbonoboui-2.a|grep XSendEvent
[39] | 0| 0|NOTY |GLOB |0 |UNDEF |XSendEvent
*
Both are UNDEF!
I'm confused what happened here.
1. Why did libbonoboui-2 link to /usr/lib/libX11.so.4 but didn't
reference to symbol XSendEvent?
2. Anyway to do further investigation?
3. Any workaround?
Thanks all!
Calvin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]