From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by sourceware.org (Postfix) with ESMTPS id E8658385E006 for ; Thu, 26 Mar 2020 13:08:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E8658385E006 Received: by mail-io1-xd44.google.com with SMTP id o3so333581ioh.2 for ; Thu, 26 Mar 2020 06:08:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=SgAEushzQ06+jTXxuDn30CLw1pmjfnp1nZz8D1nnh8I=; b=kKANOJZmvhq5TXIv9dHF+INHUfSLvMFXf4+RzrHtNqKZtGDPmVQhFWRYzNeLFH/lv/ NosjlvfMtokE296cFBLnYJsxUXVJnLpqr3EWjlEbsqORuEt5FiJahUluyO+TWUKRNvwh jlVXSTazSGMVDm3FTkSmQ2Milsf2XB5C4oABfLrCyAmhlbqmCoEHumGIh16Tbkz1K9vP gebhfO5Y1e3dwh3n3leROyzkNx6Wm0+dy2zkY542PsbV0CpXthXpplwKcyzuEavSO6Ya HqhBHjz0eMSigGfDHWYD6u9BmxWlHtwb4RQbufA+ru9OdiC44PDCPQWz1i4WSyWjK+bV xrTQ== X-Gm-Message-State: ANhLgQ1W+POogZeV3NgdAl4b+kZsRq5U/PXkwmYrAcxgbxdsD2qkbvpP dLVUcOrABfeMCFIrNde1TBqSqi0t9CuA0/M4R1GTUw== X-Google-Smtp-Source: ADFU+vsFQUigy0J5DR869xJmmqeJr1mjbYz2BGWIYkD4UTTVgUFQW40IpBEC7vFqmowErUsVYbFvBsit5BiWAbPd7cM= X-Received: by 2002:a6b:3b42:: with SMTP id i63mr7613702ioa.178.1585228089999; Thu, 26 Mar 2020 06:08:09 -0700 (PDT) MIME-Version: 1.0 References: <9f22993d-13d1-de2e-74ff-e9d08ec504ed@dronecode.org.uk> In-Reply-To: <9f22993d-13d1-de2e-74ff-e9d08ec504ed@dronecode.org.uk> From: "Carlo B." Date: Thu, 26 Mar 2020 14:07:55 +0100 Message-ID: Subject: Re: Mingw pkg-config not working To: cygwin@cygwin.com Content-Type: multipart/mixed; boundary="00000000000031c34205a1c1adf4" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, 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: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 13:08:12 -0000 --00000000000031c34205a1c1adf4 Content-Type: text/plain; charset="UTF-8" Hello, I implemented the solution to this problem as a patch to pkgconf.cygport as requested. I attached small patch to this email, which resolved the troubles with CMake and Meson. I hope that you will find it useful and some developers will gently apply the correction to fix the issue. Thank you very much for your time and your support. Sincerely, Carlo Bramini. Il giorno sab 22 feb 2020 alle ore 18:47 Jon Turney ha scritto: > > On 20/02/2020 11:06, Carlo B. wrote: > [...] > > x86_64-w64-mingw32-pkg-config are emulated with a shell script, for > > example the one for i686 is: > > > > #!/bin/sh > > exec pkgconf --personality=i686-w64-mingw32 $@ > > > > But while this solution mostly works when you exec it from the command > > line, it makes impossible to detect the presence of the tool from > > meson and cmake build systems. > > If you try to do this on the bash prompt, you get: > > > > $ i686-w64-mingw32-pkg-config --version > > pkgconf: --version specified with other options or module names, > > assuming --modversion. > > Please specify at least one package name on the command line. > > > > and this is exactly what happens with those build systems (and perhaps > > others, I don't know): it tries to call pkg-config with "--version" > > and it executes the above script that calls pkgconf. But sadly, the > > presence of the "--personality" option makes the process to fail, > > because the "--version" is currently allowed only when no other > > options are added. > > And, for this reason, meson and cmake fail the detection of the tool. > > > > I have also filed an issue here for pkgconf: > > https://todo.sr.ht/~kaniini/pkgconf/10 > > because the solution is actually to ignore the presence of the > > "--personality" option when the "--version" is written, but > > unfortunately I have not received any feedback. > > > > So, I'm also writing here, with the hope that you could find a solution. > [...] > > Thanks for reporting this issue. > > I guess the alternative to fixing pkgconf would be to modify those > wrapper scripts to detect when the parameters are just '--version' (or > equivalent) and not use --personality in that case? > > These wrapper scripts are specific to cygwin (generated by the cygport, > see [1]) > > It's possible other distros have more sophisticated wrapper scripts, > which avoid this problem? > > If you do write or discover some improved wrapper scripts, a patch to > [1] to update them would be appreciated. > > [1] > https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/pkgconf.git;a=blob;f=pkgconf.cygport#l84 --00000000000031c34205a1c1adf4 Content-Type: application/octet-stream; name="pkgconf.cygport.patch" Content-Disposition: attachment; filename="pkgconf.cygport.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k88rs3gx0 ZGlmZiAtLWdpdCBhL3BrZ2NvbmYuY3lncG9ydCBiL3BrZ2NvbmYuY3lncG9ydAppbmRleCA5OTRh ZDJhLi4yZDgxZGJjIDEwMDY0NAotLS0gYS9wa2djb25mLmN5Z3BvcnQKKysrIGIvcGtnY29uZi5j eWdwb3J0CkBAIC04Myw3ICs4MywxMSBAQCBTeXN0ZW1MaWJyYXJ5UGF0aHM6IC91c3IvJHttZ3d9 L3N5cy1yb290L21pbmd3L2xpYgogX0VPRgogCQljYXQgPiAke0R9L3Vzci9iaW4vJHttZ3d9LXBr Zy1jb25maWcgPDxfRU9GCiAjIS9iaW4vc2gKK2lmIFsgIiQjIiAtZXEgMSBdICYmIFsgIiQxIiA9 PSAiLS12ZXJzaW9uIiBdOyB0aGVuCitleGVjIHBrZ2NvbmYgLS12ZXJzaW9uCitlbHNlCiBleGVj IHBrZ2NvbmYgLS1wZXJzb25hbGl0eT0ke21nd30gXCRACitmaQogX0VPRgogCWRvbmUKIAo= --00000000000031c34205a1c1adf4--