Zephyr: arch/x86: build errors with newest build-grub.sh scripts

Created on 23 Jun 2019  Â·  6Comments  Â·  Source: zephyrproject-rtos/zephyr

Describe the bug

Attempts to build grub with the script fail under Ubuntu 18.04.2 LTS. This is a regression introduced with changes starting with #14468.

Screenshots or console output

$ ./build_grub.sh x86_64  ~/zephyr/zephyr/boards/x86/common/scripts/grub ~/zephyr/zephyr/boards/x86/common/scripts
Cloning into 'src'...
remote: Counting objects: 94083, done.
remote: Compressing objects: 100% (21614/21614), done.
remote: Total 94083 (delta 70136), reused 94067 (delta 70128)
Receiving objects: 100% (94083/94083), 70.21 MiB | 2.14 MiB/s, done.
Resolving deltas: 100% (70136/70136), done.
~/zephyr/zephyr/boards/x86/common/scripts/grub/src ~/zephyr/zephyr/boards/x86/common/scripts/grub ~/zephyr/zephyr/boards/x86/common/scripts
Note: checking out 'grub-2.04-rc1-17-g8e8723a6b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 8e8723a6b f2fs: Disable gcc9 -Waddress-of-packed-member
~/zephyr/zephyr/boards/x86/common/scripts/grub ~/zephyr/zephyr/boards/x86/common/scripts
~/zephyr/zephyr/boards/x86/common/scripts/grub/src ~/zephyr/zephyr/boards/x86/common/scripts/grub ~/zephyr/zephyr/boards/x86/common/scripts
./bootstrap: Bootstrapping from checked-out grub sources...
./bootstrap: consider installing git-merge-changelog from gnulib
./bootstrap: getting gnulib files...
Cloning into 'gnulib'...

_system hangs here for quite some time, there's a host lookup issue with the specified gnulib repo in the script, it then continues.._

remote: Counting objects: 204496, done.
remote: Compressing objects: 100% (27335/27335), done.
remote: Total 204496 (delta 177392), reused 204109 (delta 177095)
Receiving objects: 100% (204496/204496), 42.68 MiB | 5.06 MiB/s, done.
Resolving deltas: 100% (177392/177392), done.
Note: checking out 'd271f868a8df9bbec29049d01e056481b7a1a263'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d271f868a lock: Fix link error with --enable-threads=pth.
./bootstrap: autopoint --force
Copying file ABOUT-NLS
Copying file build-aux/config.rpath
Creating directory m4
Copying file m4/codeset.m4
Copying file m4/extern-inline.m4
Copying file m4/fcntl-o.m4
Copying file m4/gettext.m4
Copying file m4/glibc2.m4
Copying file m4/glibc21.m4
Copying file m4/iconv.m4
Copying file m4/intdiv0.m4
Copying file m4/intl.m4
Copying file m4/intldir.m4
Copying file m4/intlmacosx.m4
Copying file m4/intmax.m4
Copying file m4/inttypes-pri.m4
Copying file m4/inttypes_h.m4
Copying file m4/lcmessage.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/lock.m4
Copying file m4/longlong.m4
Copying file m4/nls.m4
Copying file m4/po.m4
Copying file m4/printf-posix.m4
Copying file m4/progtest.m4
Copying file m4/size_max.m4
Copying file m4/stdint_h.m4
Copying file m4/threadlib.m4
Copying file m4/uintmax_t.m4
Copying file m4/visibility.m4
Copying file m4/wchar_t.m4
Copying file m4/wint_t.m4
Copying file m4/xsize.m4
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
./bootstrap: gnulib/gnulib-tool    --no-changelog   --aux-dir=build-aux   --doc-base=doc   --lib=libgnu   --m4-base=m4/   --source-base=grub-core/lib/gnulib/   --tests-base=tests   --local-dir=gl     --no-conditional-dependencies   --no-vc-files    --import ...
Module list with included dependencies (indented):
    absolute-header
    alloca
    alloca-opt
  argp
    assure
    at-internal
    btowc
    builtin-expect
    chdir
    chdir-long
    cloexec
    close
    dirent
    dirfd
    dirname-lgpl
    dosname
    double-slash-root
    dup2
    errno
  error
    exitfail
    extensions
    extern-inline
    fchdir
    fcntl
    fcntl-h
    fd-hook
    fd-safer-flag
    filename
    filenamecat-lgpl
    flexmember
    float
  fnmatch
    fnmatch-h
    fstat
    getcwd-lgpl
  getdelim
    getdtablesize
  getline
    getopt-gnu
    getopt-posix
    getprogname
  gettext-h
  gitlog-to-changelog
    hard-locale
    havelib
    include_next
    intprops
    langinfo
    largefile
    libc-config
    limits-h
    localcharset
    locale
    localeconv
    lock
    malloc-gnu
    malloc-posix
    malloca
    mbrtowc
    mbsinit
    mbsrtowcs
  mbswidth
    mbtowc
    memchr
    mempcpy
    memrchr
    msvc-inval
    msvc-nothrow
    multiarch
    nl_langinfo
    nocrash
    open
    openat
    openat-die
    openat-h
    pathmax
  progname
    rawmemchr
  realloc-gnu
    realloc-posix
  regex
  save-cwd
    size_max
    sleep
    snippet/_Noreturn
    snippet/arg-nonnull
    snippet/c++defs
    snippet/warn-on-use
    ssize_t
    stat
    stat-time
    stdalign
    stdbool
    stddef
    stdint
    stdio
    stdlib
    strcase
    strchrnul
    strdup-posix
    streq
    strerror
    strerror-override
    string
    strings
    strndup
    strnlen
    strnlen1
    sys_stat
    sys_types
    sysexits
    threadlib
    time
    unistd
    unistd-safer
    unitypes
    uniwidth/base
    uniwidth/width
    vasnprintf
    verify
    vsnprintf
    wchar
    wcrtomb
    wctype-h
    wcwidth
    xalloc-oversized
    xsize
Notice from module argp:
  If you are using GNU gettext version 0.16.1 or older, add the following options
  to XGETTEXT_OPTIONS in your po/Makevars:
    --flag=argp_error:2:c-format --flag=argp_failure:4:c-format
Notice from module error:
  If you are using GNU gettext version 0.16.1 or older, add the following options
  to XGETTEXT_OPTIONS in your po/Makevars:
    --flag=error:3:c-format --flag=error_at_line:5:c-format
File list:
  build-aux/config.rpath
  build-aux/gitlog-to-changelog
  lib/_Noreturn.h
  lib/alloca.c
  lib/alloca.in.h
  lib/arg-nonnull.h
  lib/argp-ba.c
  lib/argp-eexst.c
  lib/argp-fmtstream.c
  lib/argp-fmtstream.h
  lib/argp-fs-xinl.c
  lib/argp-help.c
  lib/argp-namefrob.h
  lib/argp-parse.c
  lib/argp-pin.c
  lib/argp-pv.c
  lib/argp-pvh.c
  lib/argp-xinl.c
  lib/argp.h
  lib/asnprintf.c
  lib/assure.h
  lib/basename-lgpl.c
  lib/btowc.c
  lib/c++defs.h
  lib/cdefs.h
  lib/chdir-long.c
  lib/chdir-long.h
  lib/cloexec.c
  lib/cloexec.h
  lib/close.c
  lib/dirent.in.h
  lib/dirfd.c
  lib/dirname-lgpl.c
  lib/dirname.h
  lib/dosname.h
  lib/dup-safer-flag.c
  lib/dup-safer.c
  lib/dup2.c
  lib/errno.in.h
  lib/error.c
  lib/error.h
  lib/exitfail.c
  lib/exitfail.h
  lib/fchdir.c
  lib/fcntl.c
  lib/fcntl.in.h
  lib/fd-hook.c
  lib/fd-hook.h
  lib/fd-safer-flag.c
  lib/fd-safer.c
  lib/filename.h
  lib/filenamecat-lgpl.c
  lib/filenamecat.h
  lib/flexmember.h
  lib/float+.h
  lib/float.c
  lib/float.in.h
  lib/fnmatch.c
  lib/fnmatch.in.h
  lib/fnmatch_loop.c
  lib/fstat.c
  lib/getcwd-lgpl.c
  lib/getdelim.c
  lib/getdtablesize.c
  lib/getline.c
  lib/getopt-cdefs.in.h
  lib/getopt-core.h
  lib/getopt-ext.h
  lib/getopt-pfx-core.h
  lib/getopt-pfx-ext.h
  lib/getopt.c
  lib/getopt.in.h
  lib/getopt1.c
  lib/getopt_int.h
  lib/getprogname.c
  lib/getprogname.h
  lib/gettext.h
  lib/glthread/lock.c
  lib/glthread/lock.h
  lib/glthread/threadlib.c
  lib/hard-locale.c
  lib/hard-locale.h
  lib/intprops.h
  lib/itold.c
  lib/langinfo.in.h
  lib/libc-config.h
  lib/limits.in.h
  lib/localcharset.c
  lib/localcharset.h
  lib/locale.in.h
  lib/localeconv.c
  lib/malloc.c
  lib/malloca.c
  lib/malloca.h
  lib/mbrtowc.c
  lib/mbsinit.c
  lib/mbsrtowcs-impl.h
  lib/mbsrtowcs-state.c
  lib/mbsrtowcs.c
  lib/mbswidth.c
  lib/mbswidth.h
  lib/mbtowc-impl.h
  lib/mbtowc.c
  lib/memchr.c
  lib/memchr.valgrind
  lib/mempcpy.c
  lib/memrchr.c
  lib/msvc-inval.c
  lib/msvc-inval.h
  lib/msvc-nothrow.c
  lib/msvc-nothrow.h
  lib/nl_langinfo.c
  lib/open.c
  lib/openat-die.c
  lib/openat-priv.h
  lib/openat-proc.c
  lib/openat.c
  lib/openat.h
  lib/pathmax.h
  lib/pipe-safer.c
  lib/printf-args.c
  lib/printf-args.h
  lib/printf-parse.c
  lib/printf-parse.h
  lib/progname.c
  lib/progname.h
  lib/rawmemchr.c
  lib/rawmemchr.valgrind
  lib/realloc.c
  lib/regcomp.c
  lib/regex.c
  lib/regex.h
  lib/regex_internal.c
  lib/regex_internal.h
  lib/regexec.c
  lib/save-cwd.c
  lib/save-cwd.h
  lib/size_max.h
  lib/sleep.c
  lib/stat-time.c
  lib/stat-time.h
  lib/stat-w32.c
  lib/stat-w32.h
  lib/stat.c
  lib/stdalign.in.h
  lib/stdbool.in.h
  lib/stddef.in.h
  lib/stdint.in.h
  lib/stdio.in.h
  lib/stdlib.in.h
  lib/strcasecmp.c
  lib/strchrnul.c
  lib/strchrnul.valgrind
  lib/strdup.c
  lib/streq.h
  lib/strerror-override.c
  lib/strerror-override.h
  lib/strerror.c
  lib/string.in.h
  lib/strings.in.h
  lib/stripslash.c
  lib/strncasecmp.c
  lib/strndup.c
  lib/strnlen.c
  lib/strnlen1.c
  lib/strnlen1.h
  lib/sys_stat.in.h
  lib/sys_types.in.h
  lib/sysexits.in.h
  lib/time.in.h
  lib/unistd--.h
  lib/unistd-safer.h
  lib/unistd.c
  lib/unistd.in.h
  lib/unitypes.in.h
  lib/uniwidth.in.h
  lib/uniwidth/cjk.h
  lib/uniwidth/width.c
  lib/vasnprintf.c
  lib/vasnprintf.h
  lib/verify.h
  lib/vsnprintf.c
  lib/warn-on-use.h
  lib/wchar.in.h
  lib/wcrtomb.c
  lib/wctype-h.c
  lib/wctype.in.h
  lib/wcwidth.c
  lib/xalloc-oversized.h
  lib/xsize.c
  lib/xsize.h
  m4/00gnulib.m4
  m4/__inline.m4
  m4/absolute-header.m4
  m4/alloca.m4
  m4/argp.m4
  m4/btowc.m4
  m4/builtin-expect.m4
  m4/chdir-long.m4
  m4/close.m4
  m4/codeset.m4
  m4/dirent_h.m4
  m4/dirfd.m4
  m4/dirname.m4
  m4/double-slash-root.m4
  m4/dup2.m4
  m4/eealloc.m4
  m4/errno_h.m4
  m4/error.m4
  m4/exponentd.m4
  m4/extensions.m4
  m4/extern-inline.m4
  m4/fchdir.m4
  m4/fcntl-o.m4
  m4/fcntl.m4
  m4/fcntl_h.m4
  m4/filenamecat.m4
  m4/flexmember.m4
  m4/float_h.m4
  m4/fnmatch.m4
  m4/fnmatch_h.m4
  m4/fstat.m4
  m4/getcwd.m4
  m4/getdelim.m4
  m4/getdtablesize.m4
  m4/getline.m4
  m4/getopt.m4
  m4/getprogname.m4
  m4/glibc21.m4
  m4/gnulib-common.m4
  m4/host-cpu-c-abi.m4
  m4/include_next.m4
  m4/intmax_t.m4
  m4/inttypes_h.m4
  m4/langinfo_h.m4
  m4/largefile.m4
  m4/lib-ld.m4
  m4/lib-link.m4
  m4/lib-prefix.m4
  m4/libunistring-base.m4
  m4/limits-h.m4
  m4/localcharset.m4
  m4/locale-fr.m4
  m4/locale-ja.m4
  m4/locale-zh.m4
  m4/locale_h.m4
  m4/localeconv.m4
  m4/lock.m4
  m4/longlong.m4
  m4/lstat.m4
  m4/malloc.m4
  m4/malloca.m4
  m4/math_h.m4
  m4/mbrtowc.m4
  m4/mbsinit.m4
  m4/mbsrtowcs.m4
  m4/mbstate_t.m4
  m4/mbswidth.m4
  m4/mbtowc.m4
  m4/memchr.m4
  m4/mempcpy.m4
  m4/memrchr.m4
  m4/mmap-anon.m4
  m4/mode_t.m4
  m4/msvc-inval.m4
  m4/msvc-nothrow.m4
  m4/multiarch.m4
  m4/nl_langinfo.m4
  m4/nocrash.m4
  m4/off_t.m4
  m4/open-cloexec.m4
  m4/open.m4
  m4/openat.m4
  m4/pathmax.m4
  m4/printf.m4
  m4/pthread_rwlock_rdlock.m4
  m4/rawmemchr.m4
  m4/realloc.m4
  m4/regex.m4
  m4/save-cwd.m4
  m4/size_max.m4
  m4/sleep.m4
  m4/ssize_t.m4
  m4/stat-time.m4
  m4/stat.m4
  m4/stdalign.m4
  m4/stdbool.m4
  m4/stddef_h.m4
  m4/stdint.m4
  m4/stdint_h.m4
  m4/stdio_h.m4
  m4/stdlib_h.m4
  m4/strcase.m4
  m4/strchrnul.m4
  m4/strdup.m4
  m4/strerror.m4
  m4/string_h.m4
  m4/strings_h.m4
  m4/strndup.m4
  m4/strnlen.m4
  m4/sys_socket_h.m4
  m4/sys_stat_h.m4
  m4/sys_types_h.m4
  m4/sysexits.m4
  m4/threadlib.m4
  m4/time_h.m4
  m4/unistd-safer.m4
  m4/unistd_h.m4
  m4/vasnprintf.m4
  m4/vsnprintf.m4
  m4/warn-on-use.m4
  m4/wchar_h.m4
  m4/wchar_t.m4
  m4/wcrtomb.m4
  m4/wctype_h.m4
  m4/wcwidth.m4
  m4/wint_t.m4
  m4/xsize.m4
Creating directory ./grub-core/lib/gnulib
Creating directory ./grub-core/lib/gnulib/glthread
Creating directory ./grub-core/lib/gnulib/uniwidth
Replacing file build-aux/config.rpath (non-gnulib code backed up in build-aux/config.rpath~) !!
Copying file build-aux/gitlog-to-changelog
Copying file grub-core/lib/gnulib/_Noreturn.h
Copying file grub-core/lib/gnulib/alloca.c
Copying file grub-core/lib/gnulib/alloca.in.h
Copying file grub-core/lib/gnulib/arg-nonnull.h
Copying file grub-core/lib/gnulib/argp-ba.c
Copying file grub-core/lib/gnulib/argp-eexst.c
Copying file grub-core/lib/gnulib/argp-fmtstream.c
Copying file grub-core/lib/gnulib/argp-fmtstream.h
Copying file grub-core/lib/gnulib/argp-fs-xinl.c
Copying file grub-core/lib/gnulib/argp-help.c
Copying file grub-core/lib/gnulib/argp-namefrob.h
Copying file grub-core/lib/gnulib/argp-parse.c
Copying file grub-core/lib/gnulib/argp-pin.c
Copying file grub-core/lib/gnulib/argp-pv.c
Copying file grub-core/lib/gnulib/argp-pvh.c
Copying file grub-core/lib/gnulib/argp-xinl.c
Copying file grub-core/lib/gnulib/argp.h
Copying file grub-core/lib/gnulib/asnprintf.c
Copying file grub-core/lib/gnulib/assure.h
Copying file grub-core/lib/gnulib/basename-lgpl.c
Copying file grub-core/lib/gnulib/btowc.c
Copying file grub-core/lib/gnulib/c++defs.h
Copying file grub-core/lib/gnulib/cdefs.h
Copying file grub-core/lib/gnulib/chdir-long.c
Copying file grub-core/lib/gnulib/chdir-long.h
Copying file grub-core/lib/gnulib/cloexec.c
Copying file grub-core/lib/gnulib/cloexec.h
Copying file grub-core/lib/gnulib/close.c
Copying file grub-core/lib/gnulib/dirent.in.h
Copying file grub-core/lib/gnulib/dirfd.c
Copying file grub-core/lib/gnulib/dirname-lgpl.c
Copying file grub-core/lib/gnulib/dirname.h
Copying file grub-core/lib/gnulib/dosname.h
Copying file grub-core/lib/gnulib/dup-safer-flag.c
Copying file grub-core/lib/gnulib/dup-safer.c
Copying file grub-core/lib/gnulib/dup2.c
Copying file grub-core/lib/gnulib/errno.in.h
Copying file grub-core/lib/gnulib/error.c
Copying file grub-core/lib/gnulib/error.h
Copying file grub-core/lib/gnulib/exitfail.c
Copying file grub-core/lib/gnulib/exitfail.h
Copying file grub-core/lib/gnulib/fchdir.c
Copying file grub-core/lib/gnulib/fcntl.c
Copying file grub-core/lib/gnulib/fcntl.in.h
Copying file grub-core/lib/gnulib/fd-hook.c
Copying file grub-core/lib/gnulib/fd-hook.h
Copying file grub-core/lib/gnulib/fd-safer-flag.c
Copying file grub-core/lib/gnulib/fd-safer.c
Copying file grub-core/lib/gnulib/filename.h
Copying file grub-core/lib/gnulib/filenamecat-lgpl.c
Copying file grub-core/lib/gnulib/filenamecat.h
Copying file grub-core/lib/gnulib/flexmember.h
Copying file grub-core/lib/gnulib/float+.h
Copying file grub-core/lib/gnulib/float.c
Copying file grub-core/lib/gnulib/float.in.h
Copying file grub-core/lib/gnulib/fnmatch.c
Copying file grub-core/lib/gnulib/fnmatch.in.h
Copying file grub-core/lib/gnulib/fnmatch_loop.c
Copying file grub-core/lib/gnulib/fstat.c
Copying file grub-core/lib/gnulib/getcwd-lgpl.c
Copying file grub-core/lib/gnulib/getdelim.c
Copying file grub-core/lib/gnulib/getdtablesize.c
Copying file grub-core/lib/gnulib/getline.c
Copying file grub-core/lib/gnulib/getopt-cdefs.in.h
Copying file grub-core/lib/gnulib/getopt-core.h
Copying file grub-core/lib/gnulib/getopt-ext.h
Copying file grub-core/lib/gnulib/getopt-pfx-core.h
Copying file grub-core/lib/gnulib/getopt-pfx-ext.h
Copying file grub-core/lib/gnulib/getopt.c
Copying file grub-core/lib/gnulib/getopt.in.h
Copying file grub-core/lib/gnulib/getopt1.c
Copying file grub-core/lib/gnulib/getopt_int.h
Copying file grub-core/lib/gnulib/getprogname.c
Copying file grub-core/lib/gnulib/getprogname.h
Copying file grub-core/lib/gnulib/gettext.h
Copying file grub-core/lib/gnulib/glthread/lock.c
Copying file grub-core/lib/gnulib/glthread/lock.h
Copying file grub-core/lib/gnulib/glthread/threadlib.c
Copying file grub-core/lib/gnulib/hard-locale.c
Copying file grub-core/lib/gnulib/hard-locale.h
Copying file grub-core/lib/gnulib/intprops.h
Copying file grub-core/lib/gnulib/itold.c
Copying file grub-core/lib/gnulib/langinfo.in.h
Copying file grub-core/lib/gnulib/libc-config.h
Copying file grub-core/lib/gnulib/limits.in.h
Copying file grub-core/lib/gnulib/localcharset.c
Copying file grub-core/lib/gnulib/localcharset.h
Copying file grub-core/lib/gnulib/locale.in.h
Copying file grub-core/lib/gnulib/localeconv.c
Copying file grub-core/lib/gnulib/malloc.c
Copying file grub-core/lib/gnulib/malloca.c
Copying file grub-core/lib/gnulib/malloca.h
Copying file grub-core/lib/gnulib/mbrtowc.c
Copying file grub-core/lib/gnulib/mbsinit.c
Copying file grub-core/lib/gnulib/mbsrtowcs-impl.h
Copying file grub-core/lib/gnulib/mbsrtowcs-state.c
Copying file grub-core/lib/gnulib/mbsrtowcs.c
Copying file grub-core/lib/gnulib/mbswidth.c
Copying file grub-core/lib/gnulib/mbswidth.h
Copying file grub-core/lib/gnulib/mbtowc-impl.h
Copying file grub-core/lib/gnulib/mbtowc.c
Copying file grub-core/lib/gnulib/memchr.c
Copying file grub-core/lib/gnulib/memchr.valgrind
Copying file grub-core/lib/gnulib/mempcpy.c
Copying file grub-core/lib/gnulib/memrchr.c
Copying file grub-core/lib/gnulib/msvc-inval.c
Copying file grub-core/lib/gnulib/msvc-inval.h
Copying file grub-core/lib/gnulib/msvc-nothrow.c
Copying file grub-core/lib/gnulib/msvc-nothrow.h
Copying file grub-core/lib/gnulib/nl_langinfo.c
Copying file grub-core/lib/gnulib/open.c
Copying file grub-core/lib/gnulib/openat-die.c
Copying file grub-core/lib/gnulib/openat-priv.h
Copying file grub-core/lib/gnulib/openat-proc.c
Copying file grub-core/lib/gnulib/openat.c
Copying file grub-core/lib/gnulib/openat.h
Copying file grub-core/lib/gnulib/pathmax.h
Copying file grub-core/lib/gnulib/pipe-safer.c
Copying file grub-core/lib/gnulib/printf-args.c
Copying file grub-core/lib/gnulib/printf-args.h
Copying file grub-core/lib/gnulib/printf-parse.c
Copying file grub-core/lib/gnulib/printf-parse.h
Copying file grub-core/lib/gnulib/progname.c
Copying file grub-core/lib/gnulib/progname.h
Copying file grub-core/lib/gnulib/rawmemchr.c
Copying file grub-core/lib/gnulib/rawmemchr.valgrind
Copying file grub-core/lib/gnulib/realloc.c
Copying file grub-core/lib/gnulib/regcomp.c
Copying file grub-core/lib/gnulib/regex.c
Copying file grub-core/lib/gnulib/regex.h
Copying file grub-core/lib/gnulib/regex_internal.c
Copying file grub-core/lib/gnulib/regex_internal.h
Copying file grub-core/lib/gnulib/regexec.c
Copying file grub-core/lib/gnulib/save-cwd.c
Copying file grub-core/lib/gnulib/save-cwd.h
Copying file grub-core/lib/gnulib/size_max.h
Copying file grub-core/lib/gnulib/sleep.c
Copying file grub-core/lib/gnulib/stat-time.c
Copying file grub-core/lib/gnulib/stat-time.h
Copying file grub-core/lib/gnulib/stat-w32.c
Copying file grub-core/lib/gnulib/stat-w32.h
Copying file grub-core/lib/gnulib/stat.c
Copying file grub-core/lib/gnulib/stdalign.in.h
Copying file grub-core/lib/gnulib/stdbool.in.h
Copying file grub-core/lib/gnulib/stddef.in.h
Copying file grub-core/lib/gnulib/stdint.in.h
Copying file grub-core/lib/gnulib/stdio.in.h
Copying file grub-core/lib/gnulib/stdlib.in.h
Copying file grub-core/lib/gnulib/strcasecmp.c
Copying file grub-core/lib/gnulib/strchrnul.c
Copying file grub-core/lib/gnulib/strchrnul.valgrind
Copying file grub-core/lib/gnulib/strdup.c
Copying file grub-core/lib/gnulib/streq.h
Copying file grub-core/lib/gnulib/strerror-override.c
Copying file grub-core/lib/gnulib/strerror-override.h
Copying file grub-core/lib/gnulib/strerror.c
Copying file grub-core/lib/gnulib/string.in.h
Copying file grub-core/lib/gnulib/strings.in.h
Copying file grub-core/lib/gnulib/stripslash.c
Copying file grub-core/lib/gnulib/strncasecmp.c
Copying file grub-core/lib/gnulib/strndup.c
Copying file grub-core/lib/gnulib/strnlen.c
Copying file grub-core/lib/gnulib/strnlen1.c
Copying file grub-core/lib/gnulib/strnlen1.h
Copying file grub-core/lib/gnulib/sys_stat.in.h
Copying file grub-core/lib/gnulib/sys_types.in.h
Copying file grub-core/lib/gnulib/sysexits.in.h
Copying file grub-core/lib/gnulib/time.in.h
Copying file grub-core/lib/gnulib/unistd--.h
Copying file grub-core/lib/gnulib/unistd-safer.h
Copying file grub-core/lib/gnulib/unistd.c
Copying file grub-core/lib/gnulib/unistd.in.h
Copying file grub-core/lib/gnulib/unitypes.in.h
Copying file grub-core/lib/gnulib/uniwidth.in.h
Copying file grub-core/lib/gnulib/uniwidth/cjk.h
Copying file grub-core/lib/gnulib/uniwidth/width.c
Copying file grub-core/lib/gnulib/vasnprintf.c
Copying file grub-core/lib/gnulib/vasnprintf.h
Copying file grub-core/lib/gnulib/verify.h
Copying file grub-core/lib/gnulib/vsnprintf.c
Copying file grub-core/lib/gnulib/warn-on-use.h
Copying file grub-core/lib/gnulib/wchar.in.h
Copying file grub-core/lib/gnulib/wcrtomb.c
Copying file grub-core/lib/gnulib/wctype-h.c
Copying file grub-core/lib/gnulib/wctype.in.h
Copying file grub-core/lib/gnulib/wcwidth.c
Copying file grub-core/lib/gnulib/xalloc-oversized.h
Copying file grub-core/lib/gnulib/xsize.c
Copying file grub-core/lib/gnulib/xsize.h
Copying file m4/00gnulib.m4
Copying file m4/__inline.m4
Copying file m4/absolute-header.m4
Copying file m4/alloca.m4
Copying file m4/argp.m4
Copying file m4/btowc.m4
Copying file m4/builtin-expect.m4
Copying file m4/chdir-long.m4
Copying file m4/close.m4
Replacing file m4/codeset.m4 (non-gnulib code backed up in m4/codeset.m4~) !!
Copying file m4/dirent_h.m4
Copying file m4/dirfd.m4
Copying file m4/dirname.m4
Copying file m4/double-slash-root.m4
Copying file m4/dup2.m4
Copying file m4/eealloc.m4
Copying file m4/errno_h.m4
Copying file m4/error.m4
Copying file m4/exponentd.m4
Copying file m4/extensions.m4
Replacing file m4/extern-inline.m4 (non-gnulib code backed up in m4/extern-inline.m4~) !!
Copying file m4/fchdir.m4
Replacing file m4/fcntl-o.m4 (non-gnulib code backed up in m4/fcntl-o.m4~) !!
Copying file m4/fcntl.m4
Copying file m4/fcntl_h.m4
Copying file m4/filenamecat.m4
Copying file m4/flexmember.m4
Copying file m4/float_h.m4
Copying file m4/fnmatch.m4
Copying file m4/fnmatch_h.m4
Copying file m4/fstat.m4
Copying file m4/getcwd.m4
Copying file m4/getdelim.m4
Copying file m4/getdtablesize.m4
Copying file m4/getline.m4
Copying file m4/getopt.m4
Copying file m4/getprogname.m4
Replacing file m4/glibc21.m4 (non-gnulib code backed up in m4/glibc21.m4~) !!
Copying file m4/gnulib-common.m4
Copying file m4/gnulib-tool.m4
Copying file m4/host-cpu-c-abi.m4
Copying file m4/include_next.m4
Copying file m4/intmax_t.m4
Replacing file m4/inttypes_h.m4 (non-gnulib code backed up in m4/inttypes_h.m4~) !!
Copying file m4/langinfo_h.m4
Copying file m4/largefile.m4
Replacing file m4/lib-ld.m4 (non-gnulib code backed up in m4/lib-ld.m4~) !!
Replacing file m4/lib-link.m4 (non-gnulib code backed up in m4/lib-link.m4~) !!
Replacing file m4/lib-prefix.m4 (non-gnulib code backed up in m4/lib-prefix.m4~) !!
Copying file m4/libunistring-base.m4
Copying file m4/limits-h.m4
Copying file m4/localcharset.m4
Copying file m4/locale-fr.m4
Copying file m4/locale-ja.m4
Copying file m4/locale-zh.m4
Copying file m4/locale_h.m4
Copying file m4/localeconv.m4
Replacing file m4/lock.m4 (non-gnulib code backed up in m4/lock.m4~) !!
Replacing file m4/longlong.m4 (non-gnulib code backed up in m4/longlong.m4~) !!
Copying file m4/lstat.m4
Copying file m4/malloc.m4
Copying file m4/malloca.m4
Copying file m4/math_h.m4
Copying file m4/mbrtowc.m4
Copying file m4/mbsinit.m4
Copying file m4/mbsrtowcs.m4
Copying file m4/mbstate_t.m4
Copying file m4/mbswidth.m4
Copying file m4/mbtowc.m4
Copying file m4/memchr.m4
Copying file m4/mempcpy.m4
Copying file m4/memrchr.m4
Copying file m4/mmap-anon.m4
Copying file m4/mode_t.m4
Copying file m4/msvc-inval.m4
Copying file m4/msvc-nothrow.m4
Copying file m4/multiarch.m4
Copying file m4/nl_langinfo.m4
Copying file m4/nocrash.m4
Copying file m4/off_t.m4
Copying file m4/open-cloexec.m4
Copying file m4/open.m4
Copying file m4/openat.m4
Copying file m4/pathmax.m4
Copying file m4/printf.m4
Copying file m4/pthread_rwlock_rdlock.m4
Copying file m4/rawmemchr.m4
Copying file m4/realloc.m4
Copying file m4/regex.m4
Copying file m4/save-cwd.m4
Replacing file m4/size_max.m4 (non-gnulib code backed up in m4/size_max.m4~) !!
Copying file m4/sleep.m4
Copying file m4/ssize_t.m4
Copying file m4/stat-time.m4
Copying file m4/stat.m4
Copying file m4/stdalign.m4
Copying file m4/stdbool.m4
Copying file m4/stddef_h.m4
Copying file m4/stdint.m4
Replacing file m4/stdint_h.m4 (non-gnulib code backed up in m4/stdint_h.m4~) !!
Copying file m4/stdio_h.m4
Copying file m4/stdlib_h.m4
Copying file m4/strcase.m4
Copying file m4/strchrnul.m4
Copying file m4/strdup.m4
Copying file m4/strerror.m4
Copying file m4/string_h.m4
Copying file m4/strings_h.m4
Copying file m4/strndup.m4
Copying file m4/strnlen.m4
Copying file m4/sys_socket_h.m4
Copying file m4/sys_stat_h.m4
Copying file m4/sys_types_h.m4
Copying file m4/sysexits.m4
Replacing file m4/threadlib.m4 (non-gnulib code backed up in m4/threadlib.m4~) !!
Copying file m4/time_h.m4
Copying file m4/unistd-safer.m4
Copying file m4/unistd_h.m4
Copying file m4/vasnprintf.m4
Copying file m4/vsnprintf.m4
Copying file m4/warn-on-use.m4
Copying file m4/wchar_h.m4
Replacing file m4/wchar_t.m4 (non-gnulib code backed up in m4/wchar_t.m4~) !!
Copying file m4/wcrtomb.m4
Copying file m4/wctype_h.m4
Copying file m4/wcwidth.m4
Replacing file m4/wint_t.m4 (non-gnulib code backed up in m4/wint_t.m4~) !!
Replacing file m4/xsize.m4 (non-gnulib code backed up in m4/xsize.m4~) !!
Creating grub-core/lib/gnulib/Makefile.am
Creating m4/gnulib-cache.m4
Creating m4/gnulib-comp.m4
Finished.

You may need to add #include directives for the following .h files.
  #include <fnmatch.h>
  #include <regex.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include "argp.h"
  #include "error.h"
  #include "gettext.h"
  #include "mbswidth.h"
  #include "progname.h"
  #include "save-cwd.h"

You may need to use the following Makefile variables when linking.
Use them in <program>_LDADD when linking a program, or
in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.
  $(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
  $(LTLIBTHREAD) when linking with libtool, $(LIBTHREAD) otherwise

Don't forget to
  - add "grub-core/lib/gnulib/Makefile" to AC_CONFIG_FILES in ./configure.ac,
  - mention "gnulib" in SUBDIRS in grub-core/lib/Makefile.am,
  - mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am,
  - mention "m4/gnulib-cache.m4" in EXTRA_DIST in Makefile.am,
  - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC,
  - invoke gl_INIT in ./configure.ac.
patching file argp-parse.c
patching file argp-fmtstream.c
patching file argp-help.c
patching file mbswidth.c
patching file mbswidth.h
patching file regcomp.c
find: warning: Unix filenames usually don't contain slashes (though pathnames do).  That means that '-iname ‘./grub-core/lib/gnulib/*’' will probably evaluate to false all the time on this system.  You might find the '-wholename' test more useful, or perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ ‘./grub-core/lib/gnulib/*’'.
Importing unicode...
Importing libgcrypt...
Generating Automake input...
Saving timestamps...
running: AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install --force -I m4  --no-recursive
autoreconf: Entering directory `.'
autoreconf: running: true --force
autoreconf: running: aclocal -I m4 --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --include=m4 --force
configure.ac:414: error: possibly undefined macro: AC_CHECK_HEADERS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:505: error: possibly undefined macro: AC_LINK_IFELSE
configure.ac:1550: error: possibly undefined macro: AC_LANG_CALL
autoreconf: /usr/bin/autoconf failed with exit status: 1
./bootstrap: autoreconf failed
find: warning: Unix filenames usually don't contain slashes (though pathnames do).  That means that '-iname ‘./grub-core/lib/gnulib/*’' will probably evaluate to false all the time on this system.  You might find the '-wholename' test more useful, or perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ ‘./grub-core/lib/gnulib/*’'.
Importing unicode...
Importing libgcrypt...
WARNING: grub-core/lib/libgcrypt-grub already exists
WARNING: grub-core/lib/libgcrypt-grub/cipher already exists
WARNING: grub-core/lib/libgcrypt-grub/mpi already exists
WARNING: grub-core/lib/libgcrypt-grub/src already exists
Generating Automake input...
Saving timestamps...
Running autoreconf...
autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
Copying file build-aux/config.rpath
Copying file m4/extern-inline.m4
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:414: error: possibly undefined macro: AC_CHECK_HEADERS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:505: error: possibly undefined macro: AC_LINK_IFELSE
configure.ac:1550: error: possibly undefined macro: AC_LANG_CALL
autoreconf: /usr/bin/autoconf failed with exit status: 1
configure: error: cannot find install-sh, install.sh, or shtool in build-aux "."/build-aux
make: *** No targets specified and no makefile found.  Stop.
./build_grub.sh: line 39: ./grub-mkimage: No such file or directory
~/zephyr/zephyr/boards/x86/common/scripts/grub ~/zephyr/zephyr/boards/x86/common/scripts
cp: cannot stat 'src/grub_x86_64.efi': No such file or directory

Environment (please complete the following information):

Ubuntu 18.04.2 LTS
SDK 0.10.1

Waiting for response X86 bug low

Most helpful comment

FWIW I just had this exact problem and installing pkg-config was the solution.

All 6 comments

I cannot reproduce this on my side (using a container). I believe this error can be caused by a missing dependency, specifically: pkg-config. Can you confirm all these packages are installed on your host: bison autoconf libopts25-dev flex automake pkg-config gettext autopoint?

Regarding the lookup issue (for gnulib), you are not the first one to report it but I have never seen it myself... I wonder if it's one of those weird global DNS lookup issues that are different based on where you are located.

low impact, lowering priority.

FWIW I just had this exact problem and installing pkg-config was the solution.

Thanks for the feedback @rossburton

@gnuless let me close this issue since we cannot reproduce it and have had no further feedback from your side on it. Feel free to re-open it if it is still an issue.

FWIW I just had this exact problem and installing pkg-config was the solution.
excuse me, where can I download the pkg-config ? I has this problem too!

@caomufei your distribution will have a package for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  4Comments

pdunaj picture pdunaj  Â·  3Comments

karstenkoenig picture karstenkoenig  Â·  4Comments

KwonTae-young picture KwonTae-young  Â·  5Comments

rosterloh picture rosterloh  Â·  4Comments