From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by sourceware.org (Postfix) with ESMTPS id 9EEE93858C50 for ; Mon, 2 May 2022 18:40:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9EEE93858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f52.google.com with SMTP id e2so20603758wrh.7 for ; Mon, 02 May 2022 11:40:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=81rg9iGmfMRfTxbKa0pmlKNiIMOjouULonXVcBs/5Pk=; b=ju11AO/O9141XnbmchAFHbz4DYgPXIqgYrQwY6KVt/mYG182CWAFG8FqGZ7sk3Ujnq xhlPcWdaYnsSFrrk85R3/aiESV2QlmxHyxe9ZGpfOPAw/B7NS9ZVSjrnRI+LbgxYh6TB 9rhPjKSMIbJpKMqjX865/yA4C2ZWbMCxAe9JR52IHp/7d77UwM7Li3VRumlSDa82blwZ TEZGsdeMuKQbzAofdaKEFKTKqehxB0m4lTunEIr1Ex94F8hqzlkXbettFfqs6ogfvFxx nPjr3SURkPiMrdqjHiaJI7rjQJEPqD63EcAsmD4+Pv8WzKSpJZYxh2NoqQ/JY0/FzCec N6Qg== X-Gm-Message-State: AOAM5319TeX31/79h3bxZ76PpzwszkCNzc3KC1TZvnq2VWD98i/QTRFd SWGyPVtFgxqQrDEh9FW6tYIR/7K7Y1eCEA== X-Google-Smtp-Source: ABdhPJyJjCrdGdCMNDkayzssK9/AmG0icm00MNcXL+jEHLaZe9szqZG9vPJZEhqDcDNkSC4qlWwhvQ== X-Received: by 2002:adf:f2cc:0:b0:20a:cfbb:ac29 with SMTP id d12-20020adff2cc000000b0020acfbbac29mr10252453wrp.263.1651516799588; Mon, 02 May 2022 11:39:59 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id m6-20020adfc586000000b0020c5253d908sm8200042wrg.84.2022.05.02.11.39.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 May 2022 11:39:58 -0700 (PDT) Message-ID: Date: Mon, 2 May 2022 19:39:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: Statically link libwinpthread-1.dll in gdbserver Content-Language: en-US To: Claude Robitaille , "gdb@sourceware.org" References: <3ed22fb6-43f0-dc8c-a10e-6efa9baa8a1c@palves.net> <12aa0d4e-4225-4e7e-4443-8dee1e53092f@palves.net> <2646fa67-e64a-fad3-4bec-525dd05da767@palves.net> From: Pedro Alves In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 02 May 2022 18:40:02 -0000 On 2022-05-02 18:54, Claude Robitaille wrote: > This is what I get with make all-gdbserver > >   CXX    alloc.o > In file included from ../../binutils-gdb/gdbserver/../gdbsupport/common-defs.h:197, >                  from ../../binutils-gdb/gdbserver/../gdb/alloc.c:37: > ../../binutils-gdb/gdbserver/../gdbsupport/gdb_locale.h:27:11: fatal error: libintl.h: No such file or directory >    27 | # include >       |           ^~~~~~~~~~~ > compilation terminated. > > This is the complete configuration command line I was using > > export CFLAGS=-static; export CXXFLAGS=-static; ../binutils-gdb/configure --enable-static --with-static-standard-libraries --disable-gdb --host=x86_64-w64-mingw32 Thanks. I'm not setup to build gdb/gdbserver on mingw fully currently (Ubuntu 20.04's mingw gcc doesn't support std::future), but I'm able to run that configure, and build alloc.o only, and I see the same: $ make -C gdbserver alloc.o make: Entering directory '/home/pedro/gdb/binutils-gdb/build-mingw-test/gdbserver' CXX alloc.o In file included from ../../src/gdbserver/../gdbsupport/common-defs.h:197, from ../../src/gdbserver/../gdb/alloc.c:37: ../../src/gdbserver/../gdbsupport/gdb_locale.h:27:11: fatal error: libintl.h: No such file or directory 27 | # include | ^~~~~~~~~~~ compilation terminated. make: *** [Makefile:553: alloc.o] Error 1 make: Leaving directory '/home/pedro/gdb/binutils-gdb/build-mingw-test/gdbserver' gdb_locale.h has: #ifdef ENABLE_NLS # include # define _(String) gettext (String) # ifdef gettext_noop so we should only include libint.h if ENABLE_NLS is defined. I noticed that: In build/intl/ I a fully built intl, including a intl/config.intl with the expected values when using the in-tree intl: ... USE_NLS='yes' LIBINTL='-L${top_builddir}/../intl -lintl' LIBINTL_DEP='${top_builddir}/../intl/libintl.a' INCINTL='-I${top_builddir}/../intl' ... however, gdbserver's Makefile ended up with the default/empty: # Where is the INTL library? Typically in ../intl. INTL = INTL_DEPS = INTL_CFLAGS = Looking a bit deeper, I see I ended up with a mismatch between gdbsupport and gdbserver, one thinks we're using intl, the other one doesn't: $ grep ENABLE_NLS gdbserver/config.h /* #undef ENABLE_NLS */ $ grep ENABLE_NLS gdbsupport/config.h #define ENABLE_NLS 1 Sounds like that may be the problem.