delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/02/27/11:21:45

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:references:in-reply-to:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=apvPPIX
2v+UrCHusywxTij4VBR5InOZnDIxCClrKZ8vsmlbdHyH0HvMRdR7zOUqpxWFVx+3
ntiHdmLy//P/fkpeVGQX4x3z84OzpGoudwSUK+2ZadIYGIl+TnvbbLI0vhTtwpIc
F6Xqsil4ma92G0R0YY2Uc6Jdl+0d/un/WE6Y=
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:references:in-reply-to:from:date
:message-id:subject:to:content-type; s=default; bh=6aLKPF//IPQlS
ytoKKS6yxpDV4s=; b=XOAs3ZzSLOJFBQxqdR7PtH5o2PqAmlfWhF9miD/H3Dmpp
h9+00fMywUGzA2JZFfNHIx89ydO8F3KATBnxJhggiADV/ZejlLwcCPpkVOs2pPlH
sGgs7GqHZcGEL59SC69eMJ1+KEjVVwg5bZQk20h6fQIhYrTTjpsxvUv0htx00M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=alle, filed, giorno, HX-Received:a5e
X-HELO: mail-io1-f50.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=tHs7BdmFQ44jJFd1+BawTqgXqqKjeyvMHLX1tjTBRVw=; b=A5/SwjNuiOB3SAylrXXut7NLyhXk54KKouP8Io/aE0x2nawk92tSQpJR6+2E27jtXZ G1jViJoT7LFkDOZJCJWx6BzI5AsdKFtW8QBdELcmep35xROqKA3FKUvMyE+XSzun6Job 3MXTX3rS8GUEPWEtQpbl68wrKe0jqEnPOHueRKBGdzlkiRCnvCP5EKwGSivKP+Jj6pCa 3dm0pbLL/pg0pzCjNqkyYQa70JdNUtSbcPYb9jGpKXtAeoGu0CqO/Hr332PVDtQaHUtl 5JH9MvqEpbo/m4sdk+e0IaYqMNBD0fTLxr4viQfwK6kgSiY/eUId7kH/PsFsrY3Is6t7 Ablw==
MIME-Version: 1.0
References: <CADt9575vSTf9aS2opTotUhnsYRkuure145TYkTkBFzw6pTtzhA AT mail DOT gmail DOT com> <9f22993d-13d1-de2e-74ff-e9d08ec504ed AT dronecode DOT org DOT uk>
In-Reply-To: <9f22993d-13d1-de2e-74ff-e9d08ec504ed@dronecode.org.uk>
From: "Carlo B." <carlo DOT bramini AT gmail DOT com>
Date: Thu, 27 Feb 2020 17:20:38 +0100
Message-ID: <CADt9574XqPiMOpDTaATUPwktfrfVmkUODPd8N8V67Y-GfABOhQ@mail.gmail.com>
Subject: Re: Mingw pkg-config not working
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hello,
I wanted to say that I modified the script in this way and it seems
that it has resolved all issues:

#!/bin/sh
if [ "$#" -eq 1 ] && [ "$1" == "--version" ]; then
exec pkgconf --version
else
exec pkgconf --personality=i686-w64-mingw32 $@
fi

Fixing x64_64 is easy, I have just replaced i686-w64-mingw32 with
x86_64-w64-mingw32 in the personality.
I hope you will find this fix useful and, if you think it is good, the
maintainer of the package could rewrite those scripts in the same way.

Sincerely.

Il giorno sab 22 feb 2020 alle ore 18:47 Jon Turney
<jon DOT turney AT dronecode DOT org DOT uk> 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

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019