From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id 257FC38618E2 for ; Mon, 28 Sep 2020 13:47:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 257FC38618E2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simon.cook@embecosm.com Received: by mail-qk1-x731.google.com with SMTP id v123so950906qkd.9 for ; Mon, 28 Sep 2020 06:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=8bmCMSLkJiYmcDMxj0wu4ixozFnNoeKpHeJE4GjKxAY=; b=IrLHlXauPAD+OHpiY2hEB49b6Ay93J9GjoLxPO1FjksfWdvdPmZOhEUymuxGe6+xX/ JPzkOOJZEkyB5jYc7+UFN/5H9vy5SFwtEGODyNkyXYEHPAIgT4mFiCFx3XVcxTQtdKZY u8XyOujgIzYeB0X/9kFtOaEfk/rhvfRcBWh8Lx8OoMmAphIkNOUri7K7kYU/Yqm18jCI kmKK/16yJvktJOIzJujZZaicn5bm+sjdb5upfpNnbGuJq+a4YhDWsd//FvvgXbzQ9FPJ 3zKDxsTy4Vpi6/JOGOzpPK7C8PF637vD8CrdIfMZJFSW7CXxmLXe9YfM2vjYQgdNsLc8 CH3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8bmCMSLkJiYmcDMxj0wu4ixozFnNoeKpHeJE4GjKxAY=; b=LR5XuC1lqxkvgNDtv6844/hfuHNRuYTzkEV+iaaA4RePRPX16ircWpmlBVNiJMV2qF E0fDN/h5xP1ClbdkxppzOdv++xEURt3R7qYqgH0yq/I/MgXgA+1y/6FJ4VJjea4A91AS M9R+lJ57/aV7ecH8jiTdab8GAU6ZYFmdoe4DLn7fhL6VOsMpgHeU1+Ov/bHbFw+670nP WPF8jqCVVKefvhbUGMlgKEmEZXjYz6y2jAbI4iPATs8INHb3sNouLn6yzteeCC+6sKas rhi1kT08HLYGPgwDB55/76+PtiH8sS9V321VS73/FtdEbEKAxyEnR4yi6qFtfxTNXllT 4JnA== X-Gm-Message-State: AOAM530xmlpvz5ONED8MGCOScSf/c+vwWPFyDqPlP/9Q3U5h8WQYP0jT jMggJE21SGxwCj3biwAyqT7wGjuCgWOC1IyDZOch8Ymna1w7SA== X-Google-Smtp-Source: ABdhPJy8Ehrnw69m8yZ/meW1Z3Ulufy7eaREIVqFUZpZRr9qmWXtV4CMAfe0Rpj+5gXgGiPVmSn3ZtynkQqEGci1l2c= X-Received: by 2002:a37:9ed3:: with SMTP id h202mr1508384qke.66.1601300858104; Mon, 28 Sep 2020 06:47:38 -0700 (PDT) MIME-Version: 1.0 From: Simon Cook Date: Mon, 28 Sep 2020 14:47:25 +0100 Message-ID: Subject: Unable to build GDB on Windows To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2020 13:47:41 -0000 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