public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Unable to build GDB on Windows
@ 2020-09-28 13:47 Simon Cook
  2020-09-28 14:25 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Simon Cook @ 2020-09-28 13:47 UTC (permalink / raw)
  To: gdb

Hello,

I've been trying to build top of tree GDB on Windows (natively under
the MSYS2 environment), and haven't been able to link successfully due
to undefined symbols after linking against gnulib:

    CXXLD  gdb.exe
  ../gnulib/import/libgnu.a(getrandom.o): In function `getrandom':
  C:\msys64s\home\simon\work\b\gnulib\import/../../../binutils-gdb/gnulib/import/getrandom.c:129:
undefined reference to `BCryptGenRandom'
  collect2.exe: error: ld returned 1 exit status

Reading through the source file and gnulib/import/m4/getrandom.m4, it
suggests that in my case if bcrypt can be guaranteed to be present
then I should add -lbcrypt to my linker flags to resolve these
references, and indeed if I execute the failing gdb link command and
add -lbcrypt at the end then my link succeeds.

Is this an issue that anyone has seen before? It's not clear on my
side whether there's an issue with my environment causing that
dependency to be needed, and something missing from the GDB makefiles.

Many thanks,
Simon

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

end of thread, other threads:[~2020-09-28 15:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 13:47 Unable to build GDB on Windows Simon Cook
2020-09-28 14:25 ` Eli Zaretskii
2020-09-28 14:43   ` Eli Zaretskii
2020-09-28 15:15     ` Joel Brobecker
2020-09-28 15:21       ` Eli Zaretskii
2020-09-28 15:17     ` Christian Biesinger
2020-09-28 15:23       ` Eli Zaretskii
2020-09-28 15:29         ` Eli Zaretskii
2020-09-28 15:02   ` Simon Cook
2020-09-28 15:14     ` Eli Zaretskii

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