public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/16370] New: building gcc fails when bash is not installed
@ 2013-12-26 22:20 maillist-gdb at barfooze dot de
  2013-12-26 22:21 ` [Bug build/16370] building gdb " maillist-gdb at barfooze dot de
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: maillist-gdb at barfooze dot de @ 2013-12-26 22:20 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16370

            Bug ID: 16370
           Summary: building gcc fails when bash is not installed
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: critical
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: maillist-gdb at barfooze dot de

when bash is installed, configure will always prefer and use bash, so in order
to reproduce one has to temporarily uninstall, remove or rename his bash
binary.

when /bin/sh is busybox' ash, the following error breaks the build:

gdb-7.6.2/opcodes/configure: .: line 12678: can't open
'../../opcodes/configure.host'

inserting debug code into bfd/configure shows that it's actually bfd/configure
that is running, instead of opcodes/configure (as displayed):

bfd/configure
+ echo XXX ${srcdir}/configure.host XXX > /dev/tty
 # Permit host specific settings.
 . ${srcdir}/configure.host

displays:
XXX ../../opcodes/configure.host XXX
gdb-7.6.2/opcodes/configure: .: line 12680: can't open
'../../opcodes/configure.host'

with debian's dash as /bin/sh, one gets the following error:

gdb-7.6.2/opcodes/configure: 3235: ./configure.lineno: Syntax error: "fi"
unexpected

both dash and busybox ash are strictly posix conformant sh implementations,
and work fine for all other packages including binutils 2.24.

to me it looks like there happened some typo somewhere, and the syntax error is
not detected/properly handled by bash (so it works by chance), or some bashism
crept into the build at some point, without being noticed as bash is even in
debians baseinstall.

this error did not happen with gdb 7.4. the commit that introduced the bug can
probably quickly be found using a git bisect on a box that has /bin/bash
symlinked to /bin/dash


the configure line used to build gdb was:
LDFLAGS="-static" \
CFLAGS="-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -O0" \
../configure -C \
--prefix=  --disable-werror --disable-tls --with-system-zlib=yes \
--enable-64-bit-bfd
--enable-targets=x86_64-linux,i386-linux,powerpc-linux,arm-linux,mips-linux,mipsel-linux,microblaze-linux
\
--disable-sim --disable-tui

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2022-11-24  5:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-26 22:20 [Bug build/16370] New: building gcc fails when bash is not installed maillist-gdb at barfooze dot de
2013-12-26 22:21 ` [Bug build/16370] building gdb " maillist-gdb at barfooze dot de
2013-12-27  0:46 ` maillist-gdb at barfooze dot de
2013-12-27 20:26 ` sergiodj at redhat dot com
2014-01-08  4:12 ` sergiodj at redhat dot com
2014-03-21  1:58 ` maillist-gdb at barfooze dot de
2014-03-21  3:44 ` sergiodj at redhat dot com
2014-05-05 11:19 ` ncopa at alpinelinux dot org
2014-05-06  6:20 ` ncopa at alpinelinux dot org
2014-05-06  7:07 ` ncopa at alpinelinux dot org
2014-05-06 15:03 ` ncopa at alpinelinux dot org
2014-05-12 13:57 ` maillist-gdb at barfooze dot de
2014-05-15 11:22 ` ncopa at alpinelinux dot org
2014-05-15 15:51 ` maillist-gdb at barfooze dot de
2014-06-30 18:44 ` maillist-gdb at barfooze dot de
2022-11-24  5:04 ` amodra at gmail dot com

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