Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

undefined reference to `XtDisplay' error when compile firefox 2.0.0.11 on ubuntu 7.10

36 views
Skip to first unread message

yin...@gmail.com

unread,
Apr 1, 2008, 11:33:40 PM4/1/08
to
Hi,

I am trying to compile firefox 2.0.0.11 on ubuntu 7.10. And I am
getting the following error while linking.

I have checked that my LD_LIBRARY_PATH has /usr/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib:

And I do have

$ pwd
/usr/lib
$ ls -la libXt*
-rw-r--r-- 1 root root 429164 2007-05-21 07:27 libXt.a
lrwxrwxrwx 1 root root 14 2007-10-18 17:06 libXt.so -> libXt.so.
6.0.0
lrwxrwxrwx 1 root root 14 2007-10-18 17:06 libXt.so.6 -> libXt.so.
6.0.0
-rw-r--r-- 1 root root 326564 2007-05-21 07:27 libXt.so.6.0.0

Can you please tell me how can I resolve my problem?

gtk2xtbin.o: In function `xt_client_focus_listener':
/home/yinglcs/firefox_working/firefox2.0.0.11/mozilla/widget/src/
gtkxtbin/gtk2xtbin.c:826: undefined reference to `XtDisplay'
/home/yinglcs/firefox_working/firefox2.0.0.11/mozilla/widget/src/
gtkxtbin/gtk2xtbin.c:828: undefined reference to `XtWindow'
/home/yinglcs/firefox_working/firefox2.0.0.11/mozilla/widget/src/
gtkxtbin/gtk2xtbin.c:834: undefined reference to `XtWindowToWidget'
/home/yinglcs/firefox_working/firefox2.0.0.11/mozilla/widget/src/
gtkxtbin/gtk2xtbin.c:845: undefined reference to `XtWindowToWidget'
collect2: ld returned 1 exit status
make[3]: *** [libgtkxtbin.so] Error 1
make[3]: Leaving directory `/home/yinglcs/firefox_working/
firefox2.0.0.11/mozilla/firefox-objdir/widget/src/gtkxtbin'
make[2]: *** [tier_9] Error 2
make[2]: Leaving directory `/home/yinglcs/firefox_working/
firefox2.0.0.11/mozilla/firefox-objdir'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/yinglcs/firefox_working/
firefox2.0.0.11/mozilla/firefox-objdir'
make: *** [build] Error 2

Hartmut Figge

unread,
Apr 2, 2008, 12:01:44 AM4/2/08
to
yin...@gmail.com:

>Can you please tell me how can I resolve my problem?

Seems that you have to install the package libxt-dev. Guessing that from
asking http://www.debian.org/distrib/packages ;)

Hartmut

yin...@gmail.com

unread,
Apr 2, 2008, 7:38:42 PM4/2/08
to
On Apr 1, 11:01 pm, Hartmut Figge <h.fi...@gmx.de> wrote:
> ying...@gmail.com:

Thank you Harmut,
I have installed libxt-dev package via synaptic Package. But I still
have the same error.

Can you please tell me what other configuration i need to do to get
firefox to compile? e.g. LD_LIBRARY_PATH?

or anything else?

Hartmut Figge

unread,
Apr 3, 2008, 12:29:48 AM4/3/08
to
yin...@gmail.com:

>On Apr 1, 11:01 pm, Hartmut Figge <h.fi...@gmx.de> wrote:

>> Seems that you have to install the package libxt-dev. Guessing that from
>> askinghttp://www.debian.org/distrib/packages;)
>

>I have installed libxt-dev package via synaptic Package. But I still
>have the same error.

Like e.g. undefined reference to `XtDisplay'? Mhm, those one should be
fixed by installation of libxt-dev.

>Can you please tell me what other configuration i need to do to get
>firefox to compile? e.g. LD_LIBRARY_PATH?

You really should ask on a special newsgroup or mailinglist for ubuntu.
Especially because i have experience with building SM but i never have
build FF or TB. And i don't use ubuntu. ;)

But you have asked me.

I have used Debian since the release of Slink. Later with Unstable until
i switched to Gentoo about one year ago. Ubuntu should be very similar
to Debian, so there is hope that my standard way of getting missing
packages works for you. For the LIBRARY_PATH, there was never need to
mess with it.

First make sure that build-essentials is installed. Then create a
special directory in home, e.g. ff, get the .orig.tar.gz, the .diff.gz
and the .dsc for a firefox similar to that you want to compile from
ftp.ubuntu.com and put them in ff.

Switch to ff and execute
dpkg-source -x name.dsc
where 'name' corresponds to the downloaded source of firefox. This
creates a new directory with the unpacked source.

Switch do that directory and execute there
dpkg-buildpackage -uc -us -rfakeroot -b

And now missing packages will be shown. :) Install them and repeat the
above step until the building of the .deb succeeds.

Well, you don't need that .deb but now you have installed all packages
needed for your own compilation.

Hartmut

Peter Weilbacher

unread,
Apr 3, 2008, 5:25:29 AM4/3/08
to
On 02.04.2008 05:33, yin...@gmail.com wrote:

> I am trying to compile firefox 2.0.0.11 on ubuntu 7.10. And I am
> getting the following error while linking.
>
> I have checked that my LD_LIBRARY_PATH has /usr/lib
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib:

I don't think you need to add the standard paths to LD_LIBRARY_PATH.

> And I do have
>
> $ pwd
> /usr/lib
> $ ls -la libXt*
> -rw-r--r-- 1 root root 429164 2007-05-21 07:27 libXt.a
> lrwxrwxrwx 1 root root 14 2007-10-18 17:06 libXt.so -> libXt.so.6.0.0
> lrwxrwxrwx 1 root root 14 2007-10-18 17:06 libXt.so.6 -> libXt.so.6.0.0
> -rw-r--r-- 1 root root 326564 2007-05-21 07:27 libXt.so.6.0.0
>
> Can you please tell me how can I resolve my problem?
>
> gtk2xtbin.o: In function `xt_client_focus_listener':
> /home/yinglcs/firefox_working/firefox2.0.0.11/mozilla/widget/src/
> gtkxtbin/gtk2xtbin.c:826: undefined reference to `XtDisplay'

Is your system 64bits? Then you probably need to verify that the
respective library is in /usr/lib64 and that it or the respective .a file
contains the correct symbol, e.g. by doing
nm -o /usr/lib*/libXt.{a,so} | grep XtDisplay$

Peter.

P.S.: Why are you still compiling 2.0.0.11 now that 2.0.0.13 is out?

Mustafa Motiwala

unread,
Apr 5, 2008, 12:34:48 AM4/5/08
to
On Apr 3, 3:25 am, Peter Weilbacher <newss...@weilbacher.org> wrote:

Hey all,
I am getting the same error with 2.0.0.13. Yes I have the xt-dev
package as well as the libs. However in attempting to get the symbol
information using nm, I am getting no symbol information for the
shared object. Since I am using enable-share/disable-static options, I
suspect this could be a cause. Not sure though.
Thanks,
Moose.

Peter Weilbacher

unread,
Apr 7, 2008, 5:54:41 AM4/7/08
to
On 05.04.2008 06:34, Mustafa Motiwala wrote:

> I am getting the same error with 2.0.0.13. Yes I have the xt-dev
> package as well as the libs. However in attempting to get the symbol
> information using nm, I am getting no symbol information for the
> shared object.

Yes, nm doesn't work on stripped .so files, that's why I included the .a
file in the command line. If you don't have the respective static library
that won't work. Actually, I think one is supposed to use objdump -T for
shared objects, e.g.
$ objdump -T /usr/lib/libXt.so | grep XtDisplay$
00022450 g DF .text 0000000e Base XtDisplay

Cheers,
Peter.

Mustafa Motiwala

unread,
Apr 8, 2008, 11:24:05 AM4/8/08
to

Yes I figured that stripped .so files don't have symbol information.
However wasn't aware of objdump.
Thanks, I did get it working though.
--moose.

patmc...@gmail.com

unread,
May 6, 2008, 2:06:30 AM5/6/08
to
On Apr 8, 11:24 am, Mustafa Motiwala <mustafa.motiw...@gmail.com>
wrote:

How did you get it working? I believe I'm having the same problem.
thanks a lot.

0 new messages