public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* compile error on solaris 8 and 2.6
@ 2004-10-20 18:34 Andrew Hall
  2004-10-20 19:17 ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Hall @ 2004-10-20 18:34 UTC (permalink / raw)
  To: gdb

Greetings,

While trying to compile gdb on Solaris 8 and 2.6 I get the following
error: 

rm -f gdb
gcc -g -O2        \
        -o gdb gdb.o libgdb.a \
           ../bfd/libbfd.a ../readline/libreadline.a
../opcodes/libopcodes.a  ../libiberty/libiberty.a     -ldl -ltermcap
-lsocket -lnsl -lm -liconv ../libiberty/libiberty.a  
Undefined                       first referenced
 symbol                             in file
wattr_on                            libgdb.a(tui-wingeneral.o)
wattr_off                           libgdb.a(tui-wingeneral.o)
ld: fatal: Symbol referencing errors. No output written to gdb
collect2: ld returned 1 exit status
make[1]: *** [gdb] Error 1
make[1]: Leaving directory `/netapp/home/halla3/gdb-6.2.1/gdb'
make: *** [all-gdb] Error 2
bash-2.03$ 


Any suggestions? 

Thanks, 

Drew

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 18:34 compile error on solaris 8 and 2.6 Andrew Hall
@ 2004-10-20 19:17 ` Joel Brobecker
  2004-10-20 19:44   ` Michael Chastain
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2004-10-20 19:17 UTC (permalink / raw)
  To: Andrew Hall; +Cc: gdb

> While trying to compile gdb on Solaris 8 and 2.6 I get the following
> error: 
> 
> rm -f gdb
> gcc -g -O2        \
>         -o gdb gdb.o libgdb.a \
>            ../bfd/libbfd.a ../readline/libreadline.a
> ../opcodes/libopcodes.a  ../libiberty/libiberty.a     -ldl -ltermcap
> -lsocket -lnsl -lm -liconv ../libiberty/libiberty.a  
> Undefined                       first referenced
>  symbol                             in file
> wattr_on                            libgdb.a(tui-wingeneral.o)
> wattr_off                           libgdb.a(tui-wingeneral.o)
> ld: fatal: Symbol referencing errors. No output written to gdb
> collect2: ld returned 1 exit status
> make[1]: *** [gdb] Error 1
> make[1]: Leaving directory `/netapp/home/halla3/gdb-6.2.1/gdb'
> make: *** [all-gdb] Error 2
> bash-2.03$ 

I am not sure exactly what the problem is, but I'll give you some
ideas: These symbols are used for TUI, a text-based interface for
GDB. As a temporary measure, you should be able to get rid of this
error by configuring GDB without TUI: --disable-tui.

I remember having experienced some problems building TUI myself
on sparc-solaris or mips-irix, because I use a local installation
of ncurses. So the configure script sort of picks up ncurses library,
but still uses the .h files in /usr/include. So I get a discrepancy
between what the compiler thinks is available in my ncurses library,
and what is actually there. And I also get undefined symbols. I don't
know if it's possible to make it work or not (I think Michael Chastain
tried on Tru64), but you could try by adding -I/path/to/ncurses/include
to your CFLAGS (make CFLAGS='-g -O2 -I/blablabla).

Maybe it's a bona fide omission in our configure script. It's hard to
tell without knowing more about your environment. But since I don't use
TUI, I never spent the time looking into this. I just build without TUI.

Good luck,
-- 
Joel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 19:17 ` Joel Brobecker
@ 2004-10-20 19:44   ` Michael Chastain
  2004-10-20 20:11     ` Joel Brobecker
  2004-10-20 20:29     ` Andrew Hall
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Chastain @ 2004-10-20 19:44 UTC (permalink / raw)
  To: halla3, brobecker; +Cc: gdb

Joel Brobecker <brobecker@gnat.com> wrote:
> I don't
> know if it's possible to make it work or not (I think Michael Chastain
> tried on Tru64), but you could try by adding -I/path/to/ncurses/include
> to your CFLAGS (make CFLAGS='-g -O2 -I/blablabla).

I tried this on native alphaev68-dec-osf5.1 with gdb 6.2.1:

    CPPFLAGS="-I$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/include"
    export CPPFLAGS
    LDFLAGS="-L$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/lib"
    export LDFLAGS

It didn't work, though.  The CPPFLAGS/LDFLAGS did not propagate
all the way down.  I haven't looked further than that.

Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 19:44   ` Michael Chastain
@ 2004-10-20 20:11     ` Joel Brobecker
  2004-10-20 20:26       ` Michael Chastain
  2004-10-20 20:29     ` Andrew Hall
  1 sibling, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2004-10-20 20:11 UTC (permalink / raw)
  To: Michael Chastain; +Cc: halla3, gdb

> I tried this on native alphaev68-dec-osf5.1 with gdb 6.2.1:
> 
>     CPPFLAGS="-I$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/include"
>     export CPPFLAGS
>     LDFLAGS="-L$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/lib"
>     export LDFLAGS
> 
> It didn't work, though.  The CPPFLAGS/LDFLAGS did not propagate
> all the way down.  I haven't looked further than that.

Aha, that's what I remembered. Why CPPFLAGS, though, and not CFLAGS?
What he could try is

        % make CFLAGS="..." MAKE='make CFLAGS="..."'

or replace CFLAGS by CPPFLAGS if that's the appropriate variable
to set. That should take care of the propagation. (sorry Michael,
I must have missed your message explaining the problem about
propagation).

Maybe that would work?

-- 
Joel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 20:11     ` Joel Brobecker
@ 2004-10-20 20:26       ` Michael Chastain
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Chastain @ 2004-10-20 20:26 UTC (permalink / raw)
  To: brobecker; +Cc: halla3, gdb

Joel Brobecker <brobecker@gnat.com> wrote:
> Why CPPFLAGS, though, and not CFLAGS?

CPPFLAGS is canonical for pre-processor flags, because sometimes
a file must be pre-processed but not compiled, or pre-processed
separately from being compiled.

CFLAGS might work.  I just haven't tried it.

> What he could try is
>
>         % make CFLAGS="..." MAKE='make CFLAGS="..."'

That is different than what I tried, so it might work better.

Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 19:44   ` Michael Chastain
  2004-10-20 20:11     ` Joel Brobecker
@ 2004-10-20 20:29     ` Andrew Hall
  2004-10-20 21:19       ` Andrew Hall
  1 sibling, 1 reply; 11+ messages in thread
From: Andrew Hall @ 2004-10-20 20:29 UTC (permalink / raw)
  To: Michael Chastain; +Cc: brobecker, gdb

Thanks for all the suggestions.  I have tried using --without-tui and I
still get the same error.   Any idea why it would be still trying to
link against tui when I use --without-tui in my configure step?

Drew


On Wed, 2004-10-20 at 14:29, Michael Chastain wrote:
> Joel Brobecker <brobecker@gnat.com> wrote:
> > I don't
> > know if it's possible to make it work or not (I think Michael Chastain
> > tried on Tru64), but you could try by adding -I/path/to/ncurses/include
> > to your CFLAGS (make CFLAGS='-g -O2 -I/blablabla).
> 
> I tried this on native alphaev68-dec-osf5.1 with gdb 6.2.1:
> 
>     CPPFLAGS="-I$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/include"
>     export CPPFLAGS
>     LDFLAGS="-L$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/lib"
>     export LDFLAGS
> 
> It didn't work, though.  The CPPFLAGS/LDFLAGS did not propagate
> all the way down.  I haven't looked further than that.
> 
> Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 20:29     ` Andrew Hall
@ 2004-10-20 21:19       ` Andrew Hall
  2004-10-20 21:22         ` Michael Chastain
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Hall @ 2004-10-20 21:19 UTC (permalink / raw)
  To: Michael Chastain; +Cc: brobecker, gdb

Scratch that...it's --disable-tui not --without-tui.  So now thats its
compiling, what is the impact of disabling tui.  What will I not be able
to use w/in gdb now that I have disabled tui?

Drew

On Wed, 2004-10-20 at 15:43, Andrew Hall wrote:
> Thanks for all the suggestions.  I have tried using --without-tui and I
> still get the same error.   Any idea why it would be still trying to
> link against tui when I use --without-tui in my configure step?
> 
> Drew
> 
> 
> On Wed, 2004-10-20 at 14:29, Michael Chastain wrote:
> > Joel Brobecker <brobecker@gnat.com> wrote:
> > > I don't
> > > know if it's possible to make it work or not (I think Michael Chastain
> > > tried on Tru64), but you could try by adding -I/path/to/ncurses/include
> > > to your CFLAGS (make CFLAGS='-g -O2 -I/blablabla).
> > 
> > I tried this on native alphaev68-dec-osf5.1 with gdb 6.2.1:
> > 
> >     CPPFLAGS="-I$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/include"
> >     export CPPFLAGS
> >     LDFLAGS="-L$MIGCHAIN_DIR_INSTALL/host/ncurses-5.4/lib"
> >     export LDFLAGS
> > 
> > It didn't work, though.  The CPPFLAGS/LDFLAGS did not propagate
> > all the way down.  I haven't looked further than that.
> > 
> > Michael
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 21:19       ` Andrew Hall
@ 2004-10-20 21:22         ` Michael Chastain
  2004-10-20 21:36           ` Andrew Hall
  2004-10-20 21:46           ` Andrew Hall
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Chastain @ 2004-10-20 21:22 UTC (permalink / raw)
  To: halla3; +Cc: gdb, brobecker

Andrew Hall <halla3@corp.earthlink.net> wrote:
> Scratch that...it's --disable-tui not --without-tui.  So now thats its
> compiling, what is the impact of disabling tui.  What will I not be able
> to use w/in gdb now that I have disabled tui?

"tui" stands for "text user interface".

The classic gdb interface is the command-line interface.
It looks like this:

  GNU gdb 6.2.50_2004-10-15-cvs
  Copyright 2004 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB.  Type "show warranty" for details.
  This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

  (gdb)

gdbtui looks like this:

   ┌──hello.c──────────────────────────────────────────────────────────────────
   │4       {                                                                  │
   │5         printf ("hello world\n");                                        │
   │6         return 0;                                                        │
   │7       }                                                                  │
   │8                                                                          │
   │9                                                                          │
   │10                                                                         │
   │11                                                                         │
   │12                                                                         │
   │13                                                                         │
   │14                                                                         │
   │15                                                                         │
   │16                                                                         │
   └───────────────────────────────────────────────────────────────────────────┘
  exec No process In:                                          Line: ??   PC: 0x0
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB.  Type "show warranty" for details.
  This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library
   "/lib/libthread_db.so.1".

That is, it looks more like vi or emacs, and less like a shell session.

Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 21:22         ` Michael Chastain
@ 2004-10-20 21:36           ` Andrew Hall
  2004-10-20 21:46           ` Andrew Hall
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Hall @ 2004-10-20 21:36 UTC (permalink / raw)
  To: Michael Chastain; +Cc: gdb, brobecker

Outstanding!  That should not be an issue to be missing.  

I want to thank everyone for there assistance and willingness to help.  

Thank you again very much,

Drew

On Wed, 2004-10-20 at 16:26, Michael Chastain wrote:
> Andrew Hall <halla3@corp.earthlink.net> wrote:
> > Scratch that...it's --disable-tui not --without-tui.  So now thats its
> > compiling, what is the impact of disabling tui.  What will I not be able
> > to use w/in gdb now that I have disabled tui?
> 
> "tui" stands for "text user interface".
> 
> The classic gdb interface is the command-line interface.
> It looks like this:
> 
>   GNU gdb 6.2.50_2004-10-15-cvs
>   Copyright 2004 Free Software Foundation, Inc.
>   GDB is free software, covered by the GNU General Public License, and you are
>   welcome to change it and/or distribute copies of it under certain conditions.
>   Type "show copying" to see the conditions.
>   There is absolutely no warranty for GDB.  Type "show warranty" for details.
>   This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
> 
>   (gdb)
> 
> gdbtui looks like this:
> 
>    âââhello.cââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
>    â4       {                                                                  â
>    â5         printf ("hello world\n");                                        â
>    â6         return 0;                                                        â
>    â7       }                                                                  â
>    â8                                                                          â
>    â9                                                                          â
>    â10                                                                         â
>    â11                                                                         â
>    â12                                                                         â
>    â13                                                                         â
>    â14                                                                         â
>    â15                                                                         â
>    â16                                                                         â
>    âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
>   exec No process In:                                          Line: ??   PC: 0x0
>   GDB is free software, covered by the GNU General Public License, and you are
>   welcome to change it and/or distribute copies of it under certain conditions.
>   Type "show copying" to see the conditions.
>   There is absolutely no warranty for GDB.  Type "show warranty" for details.
>   This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library
>    "/lib/libthread_db.so.1".
> 
> That is, it looks more like vi or emacs, and less like a shell session.
> 
> Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 21:22         ` Michael Chastain
  2004-10-20 21:36           ` Andrew Hall
@ 2004-10-20 21:46           ` Andrew Hall
  2004-10-20 23:11             ` Michael Chastain
  1 sibling, 1 reply; 11+ messages in thread
From: Andrew Hall @ 2004-10-20 21:46 UTC (permalink / raw)
  To: Michael Chastain; +Cc: gdb, brobecker

One last question.  I noticed that gdb is attempting to install a
version of libiberty.a.  That is also installed by my gcc pkg.  Is there
anyway to get gdb to not build that lib and use the system version?  

Drew

On Wed, 2004-10-20 at 16:26, Michael Chastain wrote:
> Andrew Hall <halla3@corp.earthlink.net> wrote:
> > Scratch that...it's --disable-tui not --without-tui.  So now thats its
> > compiling, what is the impact of disabling tui.  What will I not be able
> > to use w/in gdb now that I have disabled tui?
> 
> "tui" stands for "text user interface".
> 
> The classic gdb interface is the command-line interface.
> It looks like this:
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: compile error on solaris 8 and 2.6
  2004-10-20 21:46           ` Andrew Hall
@ 2004-10-20 23:11             ` Michael Chastain
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Chastain @ 2004-10-20 23:11 UTC (permalink / raw)
  To: halla3; +Cc: gdb, brobecker

Andrew Hall <halla3@corp.earthlink.net> wrote:
> One last question.  I noticed that gdb is attempting to install a
> version of libiberty.a.  That is also installed by my gcc pkg.  Is there
> anyway to get gdb to not build that lib and use the system version?  

I happen to install gcc and gdb in separate trees and add two lines to
my $PATH instead of one.  Then I don't have to care about multiple
versions of libiberty.a getting installed.

Michael

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-10-20 21:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 18:34 compile error on solaris 8 and 2.6 Andrew Hall
2004-10-20 19:17 ` Joel Brobecker
2004-10-20 19:44   ` Michael Chastain
2004-10-20 20:11     ` Joel Brobecker
2004-10-20 20:26       ` Michael Chastain
2004-10-20 20:29     ` Andrew Hall
2004-10-20 21:19       ` Andrew Hall
2004-10-20 21:22         ` Michael Chastain
2004-10-20 21:36           ` Andrew Hall
2004-10-20 21:46           ` Andrew Hall
2004-10-20 23:11             ` Michael Chastain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).