public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: unable to compile gdb 6.0 as a cross gdb; error: cannot run test program while cross compiling
       [not found] <200310271747.52297.ken.wolcott@med.ge.com>
@ 2003-10-28  6:32 ` Gleb Natapov
  2003-10-28 14:49   ` unable to compile gdb 6.0 as a cross gdb Wolcott, Ken (MED, Compuware)
       [not found] ` <200310281147.46663.ken.wolcott@med.ge.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Gleb Natapov @ 2003-10-28  6:32 UTC (permalink / raw)
  To: Wolcott, Ken (MED, Compuware)
  Cc: crossgcc, gdb mailing list, gcc mailing list

Hello,

 Try to do "export bash_cv_have_mbstate_t=yes" before running configure.

On Mon, Oct 27, 2003 at 05:47:52PM -0600, Wolcott, Ken (MED, Compuware) wrote:
> Hi;
> 
>   I used Dan Kegel's crosstool version 0.24 (http://www.kegel.com/crosstool/) 
> to create an arm9 cross tool chain.  I'm now trying to create an arm9 native 
> gdb.
> 
>   One of the developers I'm trying to support says that he gets the error 
> msg"GDB can't read core files on this machine".  So he wants an arm9 native 
> gdb rather than aarm9 crossgdb.
> 
>   I have downloaded the gdb 6.0 source, expanded it, created a sibling 
> directory for my gdb build, executed configure and make using the attached 
> compile.sh script from the gdb build directory I created.  The captured 
> output is also attached as kaw_make.log.  There is mention of config.log, so 
> I attached it as well.
> 
>   All I need is a gdb that can read an arm9 corefile.  Whether that is a cross 
> gdb (host: i686-pc-linux, target: arm-arm9-linux) or an arm9 native gdb, it 
> doesn't matter.
> 
> Thanks,
> Ken
> 

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

* Re: unable to compile gdb 6.0 as a cross gdb
  2003-10-28  6:32 ` unable to compile gdb 6.0 as a cross gdb; error: cannot run test program while cross compiling Gleb Natapov
@ 2003-10-28 14:49   ` Wolcott, Ken (MED, Compuware)
  0 siblings, 0 replies; 5+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-28 14:49 UTC (permalink / raw)
  To: gleb; +Cc: crossgcc, gdb mailing list, gcc mailing list

[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]

HI Gleb;

  Doing this (export bash_cv_have_mbstate_t=yes) solved the current problem 
regarding the cross gdb build failure, however, I still end up with a gdb 
which appears to be an Intel executeable.

file gdb
gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically 
linked (uses shared libs), not stripped

  I notice in the output (compressed, attached) that the gcc is being called, 
not arm-arm9-linux-gnu-gcc.  To me that implies that --with-gcc=/path/to/gcc 
configure option is not working.

Thanks,
Ken

On Tuesday 28 October 2003 00:32, Gleb Natapov wrote:
> Hello,
>
>  Try to do "export bash_cv_have_mbstate_t=yes" before running configure.
>
> On Mon, Oct 27, 2003 at 05:47:52PM -0600, Wolcott, Ken (MED, Compuware) 
wrote:
> > Hi;
> >
> >   I used Dan Kegel's crosstool version 0.24
> > (http://www.kegel.com/crosstool/) to create an arm9 cross tool chain. 
> > I'm now trying to create an arm9 native gdb.
> >
> >   One of the developers I'm trying to support says that he gets the error
> > msg"GDB can't read core files on this machine".  So he wants an arm9
> > native gdb rather than aarm9 crossgdb.
> >
> >   I have downloaded the gdb 6.0 source, expanded it, created a sibling
> > directory for my gdb build, executed configure and make using the
> > attached compile.sh script from the gdb build directory I created.  The
> > captured output is also attached as kaw_make.log.  There is mention of
> > config.log, so I attached it as well.
> >
> >   All I need is a gdb that can read an arm9 corefile.  Whether that is a
> > cross gdb (host: i686-pc-linux, target: arm-arm9-linux) or an arm9 native
> > gdb, it doesn't matter.
> >
> > Thanks,
> > Ken

-- 
Kenneth A. Wolcott
Consultant, Clinical Systems Engineering
GE Medical Systems Information Technologies
8200 West Tower Avenue, Milwaukee, WI  53223
Phone:  414/362-2720 
Email:  Ken.Wolcott@med.ge.com


[-- Attachment #2: kaw_make.log.gz --]
[-- Type: application/x-gzip, Size: 16311 bytes --]

[-- Attachment #3: compile.sh --]
[-- Type: application/x-shellscript, Size: 1181 bytes --]

[-- Attachment #4: config.status --]
[-- Type: application/x-shellscript, Size: 8798 bytes --]

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

* Re: unable to compile gdb 6.0 as a cross gdb; no termcap library found; and plain gcc is still called
       [not found]   ` <20031028175402.GA30757@timberwolf.dyndns.org>
@ 2003-10-28 19:18     ` Wolcott, Ken (MED, Compuware)
  2003-10-28 19:48       ` Dan Kegel
  0 siblings, 1 reply; 5+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-28 19:18 UTC (permalink / raw)
  To: kleine-budde; +Cc: crossgcc, gdb mailing list

Hi Marc;

  I think I tried everything that you and Dan suggested, but I have some 
problems still.

  First, there are many initial calls to gcc rather than 
arm-arm9-linux-gnu-gcc that are suspicious to me.  How can I end up with an 
arm9 native gdb if it is calling the i686 gcc?

  Secondly, the build dies with:

configure: error: no termcap library found
make: *** [configure-gdb] Error 1

  I have attached the compressed output log and my compile script.

  I guess /etc is missing in the PATH environment variable?  I'll try that 
tack next.

Thanks,
Ken

On Tuesday 28 October 2003 11:54, Marc Kleine-Budde wrote:
> On Tue, Oct 28, 2003 at 11:47:46AM -0600, Wolcott, Ken (MED, Compuware) 
wrote:
> >   Very nice.  I'll try that.  I think I already tried it with the CC
> > variable. So a full path is not requred to that environment variable? 
> > Apparently that will have to be in the path.
>
> Yes - CC with full path and/or set the PATH adquate...Probably you have
> to give all programms from the binutils and gcc via the environment...
>
> > > CC=arm-arm9-linux-gnu-gcc \
> > > AR=arm-arm9-linux-gnu-ar \
> > > <TOOL>=arm-arm9-linux-gnu-<tool> \
> > > ../gdb-6.0/configure \
> > > --verbose \
> > > --host=arm-arm9-linux-gnu \
> > > --build=i686-pc-linux-gnu \
> > > --target=arm-arm9-linux-gnu\
> > > + the rest
>
> Marc

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

* Re: unable to compile gdb 6.0 as a cross gdb; no termcap library found; and plain gcc is still called
  2003-10-28 19:18     ` unable to compile gdb 6.0 as a cross gdb; no termcap library found; and plain gcc is still called Wolcott, Ken (MED, Compuware)
@ 2003-10-28 19:48       ` Dan Kegel
  2003-10-28 21:28         ` Wolcott, Ken (MED, Compuware)
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Kegel @ 2003-10-28 19:48 UTC (permalink / raw)
  To: Wolcott, Ken (MED, Compuware); +Cc: kleine-budde, crossgcc, gdb mailing list

Hi Ken,
hmm.  Methinks you could use a Linux expert to sit down with you
and guide you through this stuff.  Failing that, you need
to become an expert.  The learning curve is steep, so put on
your crampons and grab an ice axe!

/etc should not be in PATH; that's a red herring.

More likely, the "no termcap library found" error means
you haven't build a termcap for your target yet.
crosstool-0.24 will install termcap.h and libncurses.so (which
implements the termcap functions) if you pass the --builduserland
option to all.sh.  Did you?

When you run into a configure failure like this one, the thing
to do is to edit the configure script in question, locate the
section that is failing, look backwards towards the top of
the file a bit until you find the beginning of the test,
and add a
   set -x
statement, then run the configure again, redirecting the output
of configure to a file.  This produces reams of output which
you then compare with the configure script to see what it was
testing for, and what failed.

In other words: you have to actually *read* and *understand*
parts of the configure script, not just run it.
It's much easier to do if you also read the configure.in or configure.ac
script, which is what configure is expanded from.

This will cause your head to explode if you do it without first
learning a bit about autoconf.  I'd suggest working through one
of the autoconf tutorials I link to at
http://www.kegel.com/academy/opensource.html#autotools
and writing a trivial configure.ac to make sure you understand
how they work.  (e.g. write a C program that includes the file
<snorglepuss.h> only if it exists; use autoconf's AC_CHECK_HEADERS
macro to check for the existence of <snorglepuss.h>.  This will take several hours
the first time you do it, but it's well worth the effort.)
Think of it as one more little step on the way to becoming a Linux expert.
- Dan

Wolcott, Ken (MED, Compuware) wrote:
> Hi Marc;
> 
>   I think I tried everything that you and Dan suggested, but I have some 
> problems still.
> 
>   First, there are many initial calls to gcc rather than 
> arm-arm9-linux-gnu-gcc that are suspicious to me.  How can I end up with an 
> arm9 native gdb if it is calling the i686 gcc?
> 
>   Secondly, the build dies with:
> 
> configure: error: no termcap library found
> make: *** [configure-gdb] Error 1
> 
>   I have attached the compressed output log and my compile script.
> 
>   I guess /etc is missing in the PATH environment variable?  I'll try that 
> tack next.
> 
> Thanks,
> Ken
> 
> On Tuesday 28 October 2003 11:54, Marc Kleine-Budde wrote:
> 
>>On Tue, Oct 28, 2003 at 11:47:46AM -0600, Wolcott, Ken (MED, Compuware) 
> 
> wrote:
> 
>>>  Very nice.  I'll try that.  I think I already tried it with the CC
>>>variable. So a full path is not requred to that environment variable? 
>>>Apparently that will have to be in the path.
>>
>>Yes - CC with full path and/or set the PATH adquate...Probably you have
>>to give all programms from the binutils and gcc via the environment...
>>
>>
>>>>CC=arm-arm9-linux-gnu-gcc \
>>>>AR=arm-arm9-linux-gnu-ar \
>>>><TOOL>=arm-arm9-linux-gnu-<tool> \
>>>>../gdb-6.0/configure \
>>>>--verbose \
>>>>--host=arm-arm9-linux-gnu \
>>>>--build=i686-pc-linux-gnu \
>>>>--target=arm-arm9-linux-gnu\
>>>>+ the rest
>>
>>Marc
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
> 
> 


-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045

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

* Re: unable to compile gdb 6.0 as a cross gdb; no termcap library found; and plain gcc is still called
  2003-10-28 19:48       ` Dan Kegel
@ 2003-10-28 21:28         ` Wolcott, Ken (MED, Compuware)
  0 siblings, 0 replies; 5+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-28 21:28 UTC (permalink / raw)
  To: Dan Kegel; +Cc: kleine-budde, crossgcc, gdb mailing list

Hi Dan;

  I think your assessment is correct, I really need to immerse myself in 
crosstool and even in Linux itself.  I thought I knew so much :-)

  I did not build the arm9 cross with --builduserland
but I am now :-)

  I will also follow your other suggestions.

Thanks,
Ken

On Tuesday 28 October 2003 13:53, Dan Kegel wrote:
> Hi Ken,
> hmm.  Methinks you could use a Linux expert to sit down with you
> and guide you through this stuff.  Failing that, you need
> to become an expert.  The learning curve is steep, so put on
> your crampons and grab an ice axe!
>
> /etc should not be in PATH; that's a red herring.
>
> More likely, the "no termcap library found" error means
> you haven't build a termcap for your target yet.
> crosstool-0.24 will install termcap.h and libncurses.so (which
> implements the termcap functions) if you pass the --builduserland
> option to all.sh.  Did you?
>
> When you run into a configure failure like this one, the thing
> to do is to edit the configure script in question, locate the
> section that is failing, look backwards towards the top of
> the file a bit until you find the beginning of the test,
> and add a
>    set -x
> statement, then run the configure again, redirecting the output
> of configure to a file.  This produces reams of output which
> you then compare with the configure script to see what it was
> testing for, and what failed.
>
> In other words: you have to actually *read* and *understand*
> parts of the configure script, not just run it.
> It's much easier to do if you also read the configure.in or configure.ac
> script, which is what configure is expanded from.
>
> This will cause your head to explode if you do it without first
> learning a bit about autoconf.  I'd suggest working through one
> of the autoconf tutorials I link to at
> http://www.kegel.com/academy/opensource.html#autotools
> and writing a trivial configure.ac to make sure you understand
> how they work.  (e.g. write a C program that includes the file
> <snorglepuss.h> only if it exists; use autoconf's AC_CHECK_HEADERS
> macro to check for the existence of <snorglepuss.h>.  This will take
> several hours the first time you do it, but it's well worth the effort.)
> Think of it as one more little step on the way to becoming a Linux expert.
> - Dan
>

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

end of thread, other threads:[~2003-10-28 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200310271747.52297.ken.wolcott@med.ge.com>
2003-10-28  6:32 ` unable to compile gdb 6.0 as a cross gdb; error: cannot run test program while cross compiling Gleb Natapov
2003-10-28 14:49   ` unable to compile gdb 6.0 as a cross gdb Wolcott, Ken (MED, Compuware)
     [not found] ` <200310281147.46663.ken.wolcott@med.ge.com>
     [not found]   ` <20031028175402.GA30757@timberwolf.dyndns.org>
2003-10-28 19:18     ` unable to compile gdb 6.0 as a cross gdb; no termcap library found; and plain gcc is still called Wolcott, Ken (MED, Compuware)
2003-10-28 19:48       ` Dan Kegel
2003-10-28 21:28         ` Wolcott, Ken (MED, Compuware)

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).