From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70817 invoked by alias); 22 Feb 2020 17:47:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 70805 invoked by uid 89); 22 Feb 2020 17:47:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=no version=3.3.1 spammy=carlo, Carlo, discover, sadly X-HELO: re-prd-fep-040.btinternet.com Received: from mailomta28-re.btinternet.com (HELO re-prd-fep-040.btinternet.com) (213.120.69.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Feb 2020 17:47:42 +0000 Received: from re-prd-rgout-002.btmx-prd.synchronoss.net ([10.2.54.5]) by re-prd-fep-040.btinternet.com with ESMTP id <20200222174740.TWDK28356.re-prd-fep-040.btinternet.com@re-prd-rgout-002.btmx-prd.synchronoss.net>; Sat, 22 Feb 2020 17:47:40 +0000 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-OWM-Source-IP: 31.51.207.12 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean Received: from [192.168.1.106] (31.51.207.12) by re-prd-rgout-002.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5E3A15B602B6EE12; Sat, 22 Feb 2020 17:47:40 +0000 Subject: Re: Mingw pkg-config not working To: The Cygwin Mailing List References: Cc: "Carlo B." From: Jon Turney Message-ID: <9f22993d-13d1-de2e-74ff-e9d08ec504ed@dronecode.org.uk> Date: Sat, 22 Feb 2020 17:47:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00206.txt.bz2 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 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple