Bug 9146 - gdb 6.3 - readline's 'configure' fails if cross-compiling
Summary: gdb 6.3 - readline's 'configure' fails if cross-compiling
Status: RESOLVED OBSOLETE
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: 6.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-01 22:48 UTC by naren
Modified: 2022-02-27 03:13 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description naren 2005-12-01 22:48:01 UTC
[Converted from Gnats 2041]

Hi,
  I am trying to build a gdb 6.3 that can run on a mips-linux target; using crosscompile toolchain on x86. 
'configure' fails in readline subdirectory; with this output:
checking for mbsrtowcs... yes
checking for wcwidth... yes
checking for mbstate_t... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
make: *** [configure-readline] Error 1

In readline/configure I found this gem:
echo "$as_me:$LINENO: checking for mbstate_t" >&5
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
if test "${bash_cv_have_mbstate_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h.  */
_ACEOF
....

Does this mean that readline is never meant to be cross-compiled? In other places, cross-compiling lets you off with a warning only.

Release:
6.3

Environment:
host=target=mips-linux, build=i386-linux
Comment 1 drow@false.org 2005-12-02 01:51:29 UTC
From: Daniel Jacobowitz <drow@false.org>
To: naren@ccpu.com
Cc: gdb-gnats@sources.redhat.com
Subject: Re: build/2041: gdb 6.3 - readline's 'configure' fails if cross-compiling
Date: Thu, 1 Dec 2005 20:51:29 -0500

 On Thu, Dec 01, 2005 at 10:47:52PM -0000, naren@ccpu.com wrote:
 >   I am trying to build a gdb 6.3 that can run on a mips-linux target; using crosscompile toolchain on x86. 
 > 'configure' fails in readline subdirectory; with this output:
 > checking for mbsrtowcs... yes
 > checking for wcwidth... yes
 > checking for mbstate_t... configure: error: cannot run test program while cross compiling
 > See `config.log' for more details.
 > make: *** [configure-readline] Error 1
 
 It's a known bug in readline.  export bash_cv_have_mbstate_t=yes before
 running configure, and things will work.
 
 -- 
 Daniel Jacobowitz
 CodeSourcery, LLC
Comment 2 Tom Tromey 2022-02-27 03:13:56 UTC
I haven't heard any other reports about this, so I imagine it's obsolete.
Please reopen if not.  I guess it would have to be fixed upstream first.