Bug 23516 - gdb build error under msys+mingw: strip can't handle gdb-add-index.exe
Summary: gdb build error under msys+mingw: strip can't handle gdb-add-index.exe
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 8.2.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-12 11:17 IST by asmwarrior
Modified: 2018-09-11 12:49 IST (History)
2 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 asmwarrior 2018-08-12 11:17:25 IST
I have reported this bug here:
https://www.sourceware.org/ml/gdb/2018-07/msg00038.html

gdb-add-index is a bash script file, but it has the .exe extension, so that when when I run

make install INSTALL_PROGRAM='install -s' -C gdb DESTDIR=/d/code/build_gdb/bin2017

command, it will run the strip command on this file, and it report errors.
Here is the log:

make: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb'
CONFIG_HEADERS=config.h:config.in \
          CONFIG_COMMANDS="default depdir" \
          CONFIG_FILES= \
          CONFIG_LINKS= \
          /bin/sh config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
config.status: executing depdir commands
make[1]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb'
make[2]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[3]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[4]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impo
rt'
make  all-recursive
make[5]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impo
rt'
make[6]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impo
rt'
make[6]: Nothing to be done for `all-am'.
make[6]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impor
t'
make[5]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impor
t'
make[4]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impor
t'
make[3]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[2]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[1]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb'
make[1]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb'
make[2]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/doc'
make[2]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver'
make[3]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver'
make[4]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver'
make[5]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver'
make[6]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver/import'
make  all-recursive
make[7]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver/import'
make[8]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver/import'
make[8]: Nothing to be done for `all-am'.
make[8]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver/import'
make[7]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver/import'
make[6]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver/import'
make[5]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver'
make[4]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver'
make[4]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-l
ibiberty-gdbserver'
make[5]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-l
ibiberty-gdbserver/testsuite'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-li
biberty-gdbserver/testsuite'
make[4]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-li
biberty-gdbserver'
make[3]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver'
make[3]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver'
make[4]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver'
make[5]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver'
make[6]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver/import'
make  all-recursive
make[7]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver/import'
make[8]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-g
nulib-gdbserver/import'
make[8]: Nothing to be done for `all-am'.
make[8]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver/import'
make[7]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver/import'
make[6]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver/import'
make[5]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver'
make[4]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-gn
ulib-gdbserver'
make[4]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-l
ibiberty-gdbserver'
make[5]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-l
ibiberty-gdbserver/testsuite'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-li
biberty-gdbserver/testsuite'
make[4]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver/build-li
biberty-gdbserver'
make[3]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver'
make[2]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/gdbserver'
make[2]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/data-directory'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/data-directory'
make[2]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[3]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[4]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impo
rt'
make  all-recursive
make[5]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impo
rt'
make[6]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impo
rt'
make[6]: Nothing to be done for `all-am'.
make[6]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impor
t'
make[5]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impor
t'
make[4]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib/impor
t'
make[3]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[2]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb/build-gnulib'
make[1]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb'
make[1]: Entering directory `/d/code/build_gdb/mybuildcpp2/gdb'
/bin/sh ../../binutils-gdb/gdb/../mkinstalldirs /d/code/build_gdb/bin2017/mingw/
share/gdb/python/gdb
transformed_name=`t='s,y,y,'; \
                          echo gdb | sed -e "$t"` ; \
                if test "x$transformed_name" = x; then \
                  transformed_name=gdb ; \
                else \
                  true ; \
                fi ; \
                /bin/sh ../../binutils-gdb/gdb/../mkinstalldirs /d/code/build_gd
b/bin2017/mingw/bin ; \
                install -s gdb.exe \
                        /d/code/build_gdb/bin2017/mingw/bin/$transformed_name.ex
e ; \
                /bin/sh ../../binutils-gdb/gdb/../mkinstalldirs /d/code/build_gd
b/bin2017/mingw/include/gdb ; \
                /bin/install -c -m 644 jit-reader.h /d/code/build_gdb/bin2017/mi
ngw/include/gdb/jit-reader.h
if test "x" != x; \
        then \
          transformed_name=`t='s,y,y,'; \
                            echo gcore | sed -e "$t"` ; \
                  if test "x$transformed_name" = x; then \
                    transformed_name=gcore ; \
                  else \
                    true ; \
                  fi ; \
                  /bin/sh ../../binutils-gdb/gdb/../mkinstalldirs /d/code/build_
gdb/bin2017/mingw/bin ; \
                  /bin/install -c gcore \
                          /d/code/build_gdb/bin2017/mingw/bin/$transformed_name;
 \
        fi
transformed_name=`t='s,y,y,'; \
                          echo gdb-add-index | sed -e "$t"` ; \
        if test "x$transformed_name" = x; then \
          transformed_name=gdb-add-index ; \
        else \
          true ; \
        fi ; \
        install -s ../../binutils-gdb/gdb/contrib/gdb-add-index.sh \
                /d/code/build_gdb/bin2017/mingw/bin/$transformed_name.exe
D:\code\i686-5.4.0-release-posix-dwarf-rt_v5-rev0\mingw32\bin\strip.exe:d:/code/
build_gdb/bin2017/mingw/bin/gdb-add-index.exe: File format not recognized
install: strip failed
make[1]: *** [install-only] Error 1
make[1]: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb'
make: *** [install] Error 2
make: Leaving directory `/d/code/build_gdb/mybuildcpp2/gdb'
Comment 1 Eli Zaretskii 2018-09-11 07:43:13 IST
Fix by 23c4651c060c123493de004ef61d8ed052d46113.
Comment 2 Tom Tromey 2018-09-11 12:49:55 IST
Cherry-picked to 8.2.1 as well, so setting target milestone.