public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Where do I put ncurses for ARM cross-compilation?
@ 2003-05-30 23:18 Ben Giddings
  2003-05-30 23:23 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Giddings @ 2003-05-30 23:18 UTC (permalink / raw)
  To: gdb

Hi there,

I'm trying to cross-compile GDB to be hosted on an arm processor, but
configure complains it can't find a "term library", so I googled around
and found that people recommend I cross-compile ncurses and use that.

I managed to cross-compile ncurses, although there were errors in the
ADA bindings (which I don't plan to use, but couldn't find a way to
avoid building)

So... now what?  Where do I put the ncurses libraries so that the GDB
configure can find them?  Also, will "make" alone build both gdb and
gdbserver?  Although I want to run GDB on the host, I also might want to
run the server later.

Ben
-- 
Ben Giddings <ben@thingmagic.com>
ThingMagic LLC

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

* Re: Where do I put ncurses for ARM cross-compilation?
  2003-05-30 23:18 Where do I put ncurses for ARM cross-compilation? Ben Giddings
@ 2003-05-30 23:23 ` Daniel Jacobowitz
  2003-05-30 23:49   ` Ben Giddings
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-05-30 23:23 UTC (permalink / raw)
  To: Ben Giddings; +Cc: gdb

On Fri, May 30, 2003 at 07:18:14PM -0400, Ben Giddings wrote:
> Hi there,
> 
> I'm trying to cross-compile GDB to be hosted on an arm processor, but
> configure complains it can't find a "term library", so I googled around
> and found that people recommend I cross-compile ncurses and use that.
> 
> I managed to cross-compile ncurses, although there were errors in the
> ADA bindings (which I don't plan to use, but couldn't find a way to
> avoid building)
> 
> So... now what?  Where do I put the ncurses libraries so that the GDB
> configure can find them?  Also, will "make" alone build both gdb and
> gdbserver?  Although I want to run GDB on the host, I also might want to
> run the server later.

That's a problem with your cross compiler, not with GDB.  But probably
it's wherever you put your C library so that GCC could find that.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: Where do I put ncurses for ARM cross-compilation?
  2003-05-30 23:23 ` Daniel Jacobowitz
@ 2003-05-30 23:49   ` Ben Giddings
  2003-05-31  0:10     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Giddings @ 2003-05-30 23:49 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

On Fri, 2003-05-30 at 19:23, Daniel Jacobowitz wrote:
> That's a problem with your cross compiler, not with GDB.  But probably
> it's wherever you put your C library so that GCC could find that.

Ok, any hints?  My cross-compilation environment is in /usr/local/armbe,
I've tried putting it in the obvious places:

ben@magneto% ls /usr/local/armbe/arm-linux/lib/*curse*
/usr/local/armbe/arm-linux/lib/libncurses.a
/usr/local/armbe/arm-linux/lib/libncurses++.a
/usr/local/armbe/arm-linux/lib/libncurses_g.a

ben@magneto% ls /usr/local/armbe/lib/*curse*
/usr/local/armbe/lib/libncurses.a    
/usr/local/armbe/lib/libncurses++.a
/usr/local/armbe/lib/libncurses_g.a

Is there a way to find out where the cross-compilation environment is
looking, or any other way to try to debug the process?

Ben


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

* Re: Where do I put ncurses for ARM cross-compilation?
  2003-05-30 23:49   ` Ben Giddings
@ 2003-05-31  0:10     ` Daniel Jacobowitz
  2003-06-03 23:41       ` Ben Giddings
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-05-31  0:10 UTC (permalink / raw)
  To: Ben Giddings; +Cc: gdb

On Fri, May 30, 2003 at 07:49:10PM -0400, Ben Giddings wrote:
> On Fri, 2003-05-30 at 19:23, Daniel Jacobowitz wrote:
> > That's a problem with your cross compiler, not with GDB.  But probably
> > it's wherever you put your C library so that GCC could find that.
> 
> Ok, any hints?  My cross-compilation environment is in /usr/local/armbe,
> I've tried putting it in the obvious places:
> 
> ben@magneto% ls /usr/local/armbe/arm-linux/lib/*curse*
> /usr/local/armbe/arm-linux/lib/libncurses.a
> /usr/local/armbe/arm-linux/lib/libncurses++.a
> /usr/local/armbe/arm-linux/lib/libncurses_g.a
> 
> ben@magneto% ls /usr/local/armbe/lib/*curse*
> /usr/local/armbe/lib/libncurses.a    
> /usr/local/armbe/lib/libncurses++.a
> /usr/local/armbe/lib/libncurses_g.a
> 
> Is there a way to find out where the cross-compilation environment is
> looking, or any other way to try to debug the process?

If that's where libc.a is, it should work.  Try sticking -v options
on the gcc command line to see what -L paths it is giving ld.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: Where do I put ncurses for ARM cross-compilation?
  2003-05-31  0:10     ` Daniel Jacobowitz
@ 2003-06-03 23:41       ` Ben Giddings
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Giddings @ 2003-06-03 23:41 UTC (permalink / raw)
  To: gdb; +Cc: Daniel Jacobowitz

On Fri, 2003-05-30 at 20:10, Daniel Jacobowitz wrote:
> If that's where libc.a is, it should work.  Try sticking -v options
> on the gcc command line to see what -L paths it is giving ld.

Hi Daniel,

It turns out that it does work if the ncurses lib is in:
/usr/local/armbe/arm-linux/lib/

The problem was that "configure" was caching the results of its probing
somewhere and didn't pick up that that library was now available.

After poking at it all day today I think I finally have a working copy
of gdb.  (YAY!)  But there are some issues.

My eventual command line was this monstrosity:

CC_FOR_BUILD=gcc CFLAGS_FOR_BUILD= CC=/usr/local/armbe/bin/arm-linux-gcc
CFLAGS=-mbig-endian ../configure --host=arm-unknown-linux
--prefix=/usr/local/armbe --build=i386-gnu-linux > configure.out 2>&1

Does that look reasonable?  Trying to set CFLAGS_FOR_BUILD like that
didn't seem to work, and I had to go in and manually edit the Makefile
to set it to nothing, otherwise it picked up CFLAGS, which was meant for
the host only.  In addition, CFLAGS didn't seem to be passed in to the
Makefile for gdbserver, so once again, I went in manually and added
-mbig-endian to its CFLAGS.

I also had to make sure that /usr/local/armbe/bin/ was in my path so
that the process could find all the other arm compilation tools
(arm-linux-ar,etc.)  Is there a way to specify this in the compile
command?  Are there compiler switches that would help out here?

Ben


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

end of thread, other threads:[~2003-06-03 23:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-30 23:18 Where do I put ncurses for ARM cross-compilation? Ben Giddings
2003-05-30 23:23 ` Daniel Jacobowitz
2003-05-30 23:49   ` Ben Giddings
2003-05-31  0:10     ` Daniel Jacobowitz
2003-06-03 23:41       ` Ben Giddings

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