public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: "Willgerodt, Felix" <felix.willgerodt@intel.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Mingw64 build failure
Date: Mon, 7 Feb 2022 10:01:44 +0000	[thread overview]
Message-ID: <MN2PR11MB4566AB3B5DDBF3A39F0DBFD08E2C9@MN2PR11MB4566.namprd11.prod.outlook.com> (raw)

Hi everyone,

I have some problems cross-compiling the latest gdb master branch with mingw64.
I tried a couple of different mingw64 versions on Ubuntu and Fedora 
(and even mingw64 from msys2 on Windows).

On my Fedora 34 with mingw64 in this version:
gcc version 10.3.1 20210422 (Fedora MinGW 10.3.1-2.fc34) (GCC)

I always get this error:

checking for sys/param.h... yes
checking for pid_t... /users/username/sources/gdb/gnulib/import/closedir.c: In function 'closedir':
/users/username/sources/gdb/gnulib/import/closedir.c:58:11: error: 'DIR' has no member named 'current'
   58 |   if (dirp->current != INVALID_HANDLE_VALUE)
      |           ^~
/users/username/sources/gdb/gnulib/import/closedir.c:59:20: error: 'DIR' has no member named 'current'
   59 |     FindClose (dirp->current);
      |                    ^~
make[5]: *** [Makefile:2188: closedir.o] Error 1
make[5]: *** Waiting for unfinished jobs....
yes


I see the same issue with the gdb-11-branch. Gdb-10 still compiles.
I have little knowledge with mingw and even less with gnulib. So before opening a Bugzilla,
I thought I would ask here, as there seem to be others compiling GDB with mingw64.
Has anyone seen this before?

I configure gdb like this:

$src/gdb/configure \
    --host="x86_64-w64-mingw32" \
    --build="x86_64-pc-linux-gnu" \
    --disable-binutils \
    --disable-gas \
    --disable-gprof \
    --disable-inprocess-agent \
    --disable-intl \
    --disable-ld \
    --disable-source-highlight \
    --without-mpfr \
    --with-libgmp-prefix="/users/username/builds/gmp/install"

GMP is also cross compiled as a static library:

$ tree install/
install/
------ include
-- - - ------ gmp.h
-- - - ------ gmpxx.h
------ lib
-- - - ------ libgmp.a
-- - - ------ libgmp.la
-- - - ------ libgmpxx.a
-- - - ------ libgmpxx.la
-- - - ------ pkgconfig
-- - -     ------ gmp.pc
-- - -     ------ gmpxx.pc
------ share
    ------ info
        ------ dir
        ------ gmp.info
        ------ gmp.info-1
        ------ gmp.info-2

But even if I remove “--with-libgmp-prefix”, I get the same error.

Thanks,
Felix
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

             reply	other threads:[~2022-02-07 10:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 10:01 Willgerodt, Felix [this message]
2022-08-12 10:08 Alexander Fedotov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB4566AB3B5DDBF3A39F0DBFD08E2C9@MN2PR11MB4566.namprd11.prod.outlook.com \
    --to=felix.willgerodt@intel.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).