X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; q=dns; s=default; b=KVtGys5VV+DZ1lc/wNONRrF64ylfV w4OhWfY3HS1HiBMFPiEAMG9lTQ7POuQ4Nw9m6Tvoiel4kq0LruYMAi3oi2Vj59Vl oJSjfDoR2r1ouf7V550RA455WVXO0spFdis43OVqrZtEsgFdn7KIIzaKuOE5Z3O/ DIRbynazRTZMAE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; s=default; bh=U+kf/b5uGJVl7tw34rIPgLSwrgk=; b=qYk +hvV2HNq2WS/A8XwkIEmnfg/QyxNL4K/bb6N+xiM5k7TCrVGFaPj9ElSrm1hk3sL aHLknAB/Ofl7kZxGECaI1hvCONR7BYLFcAODbRjRqk6VPsICYmyqkikDNP9KnNcK 2MhoDy9RN6MtYfDmr+SCBZG9BLCkNHtUBADKQFOg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Sincerely, player, sadly, media X-HELO: mail-il1-f171.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=WAyMv2en5T1LDAYrEs3wOfC/bKQsdjylHeZqKBVGi8I=; b=Uhr4ShrCJeXzYnmBaYiPWbRd+frxsftW87+JqCMuzImS0IXx24zBcHiaAjS6nZwqAR ybm1n4koDVk/QOgN5HYgE23t+TiFqf+wQp4L6QPZlySs9izV1kW6RNYjN5altazFjC1n PoL9I1jhFxTjskknHvE4FsG1BY6B+k6/I6ONov4HCouKDmtyh7LTwiOuclWb5Qy4WiRN MKQKcd9YzuJSpd9L88ipBuNLAYzp3DBywn5IHM+byCTF0R52VhqP4al8YjXb9PNiSnPy 4UNbiki1DR78SdxR7NmYeA1q6kcmEpGA8X3hUXuMM76437AOnoV+G4EpaE8KnORNjA5n NkwQ== MIME-Version: 1.0 From: "Carlo B." Date: Thu, 20 Feb 2020 12:06:10 +0100 Message-ID: Subject: Mingw pkg-config not working To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Hello, I discovered that the mingw cross compilers for i686 and x86-64 have a problem with support of pkg-config. From what I have seen, the mingw included into CYGWIN is not using the usual pkg-config, but it uses pkgconf instead, which is a good thing at first sight, since it does not depend to GLib. Unfortunately, this introduces a problem: the traditional i686-w64-mingw32-pkg-config and 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. This behavior is easy to verify, just write that command at the prompt of the shell, or try to build something that uses the detection of the tool: in my case, I found it when I tried to build the audacious media player from sources. Thank you very much for your time and your support. Sincerely. -- 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