Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Cross Compile GDB 6.6 PPC405
@ 2007-02-14 20:24 Clint Thomas
  2007-02-14 20:27 ` Daniel Jacobowitz
  2007-02-15  7:35 ` Michael Snyder
  0 siblings, 2 replies; 5+ messages in thread
From: Clint Thomas @ 2007-02-14 20:24 UTC (permalink / raw)
  To: gdb

Hey guys,

I am trying to build a native GDB to run on my powerpc-405 target. To do
this, I run the configure script in gdb-6.6 as such ./configure
--build=i386-linux-gnu --target=powerpc-405-linux-gnu
--host=powerpc-405-linux-gnu Now beforehand, I tried building this, and
the make would always fail with the error "No Termcap Library found".
After finding out that the --builduserland option is broken, I tried
cross-compiling ncurses manually. After doing that, I moved the contents
of the ../ncurses/lib directory into the directory containing libc.a in
my cross-compiler directory. Now when I build GDB, I get this output

 

powerpc-405-linux-gnu-gcc -c -g -O2 -I. -I.././gdb -I.././gdb/config
-LOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I.././gdb/../include/opcode -I.././gdb/../readline/..-I../bfd
-I.././gdb/../bfd -I.././gdb/../include -DMI_OUT=1 -DTUI=1 -Wimplicit
-Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses
-Wpointer-arith -Wformat-nonliteral -Wunused-label -Wunused-function
-Wuninitialized .././gdb/tui/tui-command.c 

In file included from .././gdb/tui/tui-command.c:28:

./tui/tui-data.h:40: error: parse error before "WINDOW"

./tui/tui-data.h:40: warning: no semicolon at end of struct or union

./tui/tui-data.h:52: error: parse error before '}' token

./tui/tui-data.h:228: error: field `data_window' has incomplete type

./tui/tui-data.h:282: error: field `generic' has incomplete type In file
included from .././gdb/tui/tui-command.c:29:

./tui/tui-win.h:42: error: parse error before "tui_border_ulcorner"

./tui/tui-win.h:42: warning: type defaults to `int' in declaration of
`tui_border_ulcorner'

./tui/tui-win.h:42: warning: data definition has no type or storage
class

./tui/tui-win.h:43: error: parse error before "tui_border_urcorner"

./tui/tui-win.h:43: warning: type defaults to `int' in declaration of
`tui_border_urcorner'

./tui/tui-win.h:43: warning: data definition has no type or storage
class

./tui/tui-win.h:44: error: parse error before "tui_border_lrcorner"

./tui/tui-win.h:44: warning: type defaults to `int' in declaration of
`tui_border_lrcorner'

./tui/tui-win.h:44: warning: data definition has no type or storage
class

./tui/tui-win.h:45: error: parse error before "tui_border_llcorner"

./tui/tui-win.h:45: warning: type defaults to `int' in declaration of
`tui_border_llcorner'

./tui/tui-win.h:45: warning: data definition has no type or storage
class

./tui/tui-win.h:46: error: parse error before "tui_border_vline"

./tui/tui-win.h:46: warning: type defaults to `int' in declaration of
`tui_border_vline'

./tui/tui-win.h:46: warning: data definition has no type or storage
class

./tui/tui-win.h:47: error: parse error before "tui_border_hline"

./tui/tui-win.h:47: warning: type defaults to `int' in declaration of
`tui_border_hline'

./tui/tui-win.h:47: warning: data definition has no type or storage
class

.././gdb/tui/tui-command.c: In function `tui_dispatch_ctrl_char':

.././gdb/tui/tui-command.c:80: error: `WINDOW' undeclared (first use in
this function)

.././gdb/tui/tui-command.c:80: error: (Each undeclared identifier is
reported only once

.././gdb/tui/tui-command.c:80: error: for each function it appears in.)

.././gdb/tui/tui-command.c:80: error: `w' undeclared (first use in this
function)

.././gdb/tui/tui-command.c:85: warning: implicit declaration of function
`wgetch'

.././gdb/tui/tui-command.c:86: error: `ERR' undeclared (first use in
this function)

.././gdb/tui/tui-command.c:93: error: `KEY_PPAGE' undeclared (first use
in this function)

.././gdb/tui/tui-command.c:95: error: `KEY_NPAGE' undeclared (first use
in this function)

.././gdb/tui/tui-command.c:113: error: `KEY_DOWN' undeclared (first use
in this function)

.././gdb/tui/tui-command.c:114: error: `KEY_SF' undeclared (first use in
this function)

.././gdb/tui/tui-command.c:117: error: `KEY_UP' undeclared (first use in
this function)

.././gdb/tui/tui-command.c:118: error: `KEY_SR' undeclared (first use in
this function)

.././gdb/tui/tui-command.c:121: error: `KEY_RIGHT' undeclared (first use
in this function)

.././gdb/tui/tui-command.c:124: error: `KEY_LEFT' undeclared (first use
in this function)

make[2]: *** [tui-command.o] Error 1

make[2]: Leaving directory `/home/cthomas/gdb-6.6/gdb'

make[1]: *** [all-gdb] Error 2

make[1]: Leaving directory `/home/cthomas/gdb-6.6'

make: *** [all] Error 2

I've been looking around the mailing lists, it seems like the problem is
related to ncurses, but I am unsure of what I am doing wrong, as I have
not found a good solution to my problem of building GDB to run native on
my target.

Clinton Thomas


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

* Re: Cross Compile GDB 6.6 PPC405
  2007-02-14 20:24 Cross Compile GDB 6.6 PPC405 Clint Thomas
@ 2007-02-14 20:27 ` Daniel Jacobowitz
  2007-02-14 20:48   ` Khem Raj
  2007-02-15  7:35 ` Michael Snyder
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-02-14 20:27 UTC (permalink / raw)
  To: Clint Thomas; +Cc: gdb

On Wed, Feb 14, 2007 at 03:09:47PM -0500, Clint Thomas wrote:
> I am trying to build a native GDB to run on my powerpc-405 target. To do
> this, I run the configure script in gdb-6.6 as such ./configure
> --build=i386-linux-gnu --target=powerpc-405-linux-gnu
> --host=powerpc-405-linux-gnu Now beforehand, I tried building this, and
> the make would always fail with the error "No Termcap Library found".
> After finding out that the --builduserland option is broken, I tried
> cross-compiling ncurses manually. After doing that, I moved the contents
> of the ../ncurses/lib directory into the directory containing libc.a in
> my cross-compiler directory. Now when I build GDB, I get this output

This is still a basic cross-compiling question: if you need ncurses,
you don't just need the libraries, you need the headers too.  If you
had them...

> In file included from .././gdb/tui/tui-command.c:28:
> 
> ./tui/tui-data.h:40: error: parse error before "WINDOW"

...they'd define this.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Cross Compile GDB 6.6 PPC405
  2007-02-14 20:27 ` Daniel Jacobowitz
@ 2007-02-14 20:48   ` Khem Raj
  2007-02-17  8:51     ` Clint Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2007-02-14 20:48 UTC (permalink / raw)
  To: Clint Thomas, gdb

Daniel Jacobowitz wrote:
> On Wed, Feb 14, 2007 at 03:09:47PM -0500, Clint Thomas wrote:
>   
>> I am trying to build a native GDB to run on my powerpc-405 target. To do
>> this, I run the configure script in gdb-6.6 as such ./configure
>> --build=i386-linux-gnu --target=powerpc-405-linux-gnu
>> --host=powerpc-405-linux-gnu Now beforehand, I tried building this, and
>> the make would always fail with the error "No Termcap Library found".
>> After finding out that the --builduserland option is broken, I tried
>> cross-compiling ncurses manually. After doing that, I moved the contents
>> of the ../ncurses/lib directory into the directory containing libc.a in
>> my cross-compiler directory. Now when I build GDB, I get this output
>>     
>
> This is still a basic cross-compiling question: if you need ncurses,
> you don't just need the libraries, you need the headers too.  If you
> had them...
>
>   
>> In file included from .././gdb/tui/tui-command.c:28:
>>
>> ./tui/tui-data.h:40: error: parse error before "WINDOW"
>>     
>
> ...they'd define this.
>
>   
may be this thread can help you
http://sourceware.org/ml/crossgcc/2007-02/msg00011.html

-Khem


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

* Re: Cross Compile GDB 6.6 PPC405
  2007-02-14 20:24 Cross Compile GDB 6.6 PPC405 Clint Thomas
  2007-02-14 20:27 ` Daniel Jacobowitz
@ 2007-02-15  7:35 ` Michael Snyder
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2007-02-15  7:35 UTC (permalink / raw)
  To: Clint Thomas; +Cc: gdb

On Wed, 2007-02-14 at 15:09 -0500, Clint Thomas wrote:
> Hey guys,
> 
> I am trying to build a native GDB to run on my powerpc-405 target. To do
> this, I run the configure script in gdb-6.6 as such ./configure
> --build=i386-linux-gnu --target=powerpc-405-linux-gnu
> --host=powerpc-405-linux-gnu Now beforehand, I tried building this, and
> the make would always fail with the error "No Termcap Library found".
> After finding out that the --builduserland option is broken, I tried
> cross-compiling ncurses manually. After doing that, I moved the contents
> of the ../ncurses/lib directory into the directory containing libc.a in
> my cross-compiler directory. 

I think you need to "make install" ncurses.  You can use --prefix
when you configure it, to point the install at the target (ppc)
location.


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

* RE: Cross Compile GDB 6.6 PPC405
  2007-02-14 20:48   ` Khem Raj
@ 2007-02-17  8:51     ` Clint Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Clint Thomas @ 2007-02-17  8:51 UTC (permalink / raw)
  To: gdb

So, after trying to make install ncurses several times in several
different locations, I gave up and decided to just cross-compile good
ol' termcap instead. 

Here is the link I followed.
http://sourceware.org/ml/crossgcc/2007-02/msg00016.html

This is just about right, except when I extracted termcap and tried to
pass those options to the configure script, it would not take them. So I
just ran the configure script, and manually edited the Makefile it
generated. I changed the CC=gcc to CC=powerpc-405-linux-gnu-gcc, saved
and hit make. This built the two files I needed, termcap.h and
libtermcap.a

Took those two files, dropped termcap.h into
$(CROSS_COMPILER)/powerpc-405-linux-gnu/include and libtermcap.a into
$(CROSS_COMPILER)/powerpc-405-linux-gnu/lib and went on to build GDB.
This process worked for both my MPC8540 and PPC405 toolsets.

Clint Thomas


-----Original Message-----
From: Khem Raj [mailto:kraj@mvista.com] 
Sent: Wednesday, February 14, 2007 3:24 PM
To: Clint Thomas; gdb@sourceware.org
Subject: Re: Cross Compile GDB 6.6 PPC405

Daniel Jacobowitz wrote:
> On Wed, Feb 14, 2007 at 03:09:47PM -0500, Clint Thomas wrote:
>   
>> I am trying to build a native GDB to run on my powerpc-405 target. To

>> do this, I run the configure script in gdb-6.6 as such ./configure 
>> --build=i386-linux-gnu --target=powerpc-405-linux-gnu 
>> --host=powerpc-405-linux-gnu Now beforehand, I tried building this, 
>> and the make would always fail with the error "No Termcap Library
found".
>> After finding out that the --builduserland option is broken, I tried 
>> cross-compiling ncurses manually. After doing that, I moved the 
>> contents of the ../ncurses/lib directory into the directory 
>> containing libc.a in my cross-compiler directory. Now when I build 
>> GDB, I get this output
>>     
>
> This is still a basic cross-compiling question: if you need ncurses, 
> you don't just need the libraries, you need the headers too.  If you 
> had them...
>
>   
>> In file included from .././gdb/tui/tui-command.c:28:
>>
>> ./tui/tui-data.h:40: error: parse error before "WINDOW"
>>     
>
> ...they'd define this.
>
>   
may be this thread can help you
http://sourceware.org/ml/crossgcc/2007-02/msg00011.html

-Khem


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

end of thread, other threads:[~2007-02-16 20:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 20:24 Cross Compile GDB 6.6 PPC405 Clint Thomas
2007-02-14 20:27 ` Daniel Jacobowitz
2007-02-14 20:48   ` Khem Raj
2007-02-17  8:51     ` Clint Thomas
2007-02-15  7:35 ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox