This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug build/16370] New: building gcc fails when bash is not installed


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]