| www.delorie.com/archives/browse.cgi | search |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 634C84AR3884942 |
| Authentication-Results: | delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com |
| Authentication-Results: | delorie.com; spf=pass smtp.mailfrom=cygwin.com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 delorie.com 634C84AR3884942 |
| Authentication-Results: | delorie.com; |
| dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=a2AuG5RS | |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org C74CA4BA23E3 |
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
| s=default; t=1775304481; | |
| bh=RK92P5BXpiltDczwoanBQUUJPM4VzW0J9O8lrRb0D1w=; | |
| h=Date:Subject:To:References:Cc:In-Reply-To:List-Id: | |
| List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: | |
| From:Reply-To:From; | |
| b=a2AuG5RSuLhGEh/uJJx0FdfMHuhE2Pb1TBy584IYyRcPEfjUbX9lppmf+ZEZoe4iL | |
| 82fjU0EkDDV7wJ7eOdR0YHZS/aAglvXAOFN7PBHhx3AWiwZV49h17Ue3GD4cjkyK5j | |
| b/zLGmJwv34GzsKjfuD4LIHheVJSHT8Gu2sPlnIk= | |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 419564BA2E2A |
| ARC-Filter: | OpenARC Filter v1.0.0 sourceware.org 419564BA2E2A |
| ARC-Seal: | i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775304430; cv=none; |
| b=nPce5G6DY/qmrdljQy+RUOFyMG1pl3g7ZfepwdncTHabyyj0ROaKH2ATaJ5yp2ARlZ2eYi4nBe7FaFXaMLipEJr+gXG6JKLuCSIlJLKq2BbfRJ/YpYwyQ/SFbQdbe/QFe/IxFcLyPv+miuhJw8NUYeRPrDi/x5uP6ha6pxXDPSQ= | |
| ARC-Message-Signature: | i=1; a=rsa-sha256; d=sourceware.org; s=key; |
| t=1775304430; c=relaxed/simple; | |
| bh=87kynLNy/Z1m82OuoIgR3dvJnzNsN9/cvtXJgqFK63U=; | |
| h=Message-ID:Date:MIME-Version:Subject:To:From; | |
| b=i1dJppTtYcsi4EDEbRuX+dSDRQauYOvm8fgc5ga9CIfXgsv7CB5bKfmrhGP1E2Hdrxd324hLs1wzF0UUJp0zAz7QtzHpv6kzITyLY407CdsOmUtWiDqgRS5npiQuNKcXiYTQ/Qd1I/BPqgN4HTi4jHWvs44PTiAOV1vNoecsSjM= | |
| ARC-Authentication-Results: | i=1; server2.sourceware.org |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 419564BA2E2A |
| X-SNCR-Rigid: | 69AF652F02654F59 |
| X-Originating-IP: | [62.49.245.144] |
| X-OWM-Source-IP: | 62.49.245.144 |
| X-OWM-Env-Sender: | jon DOT turney AT dronecode DOT org DOT uk |
| X-RazorGate-Vade: | dmFkZTE0jHzbaF0bZ11AYrdA35U/RwtgNeI1F4/3Fhy+fPxajQO4BEC8ifVLkF3cXWim2QKOHOhxS9JOONmGhrslX0BH284TLNbXRPDhE9Whtpik+zzbEMJAYOOCUi69DK8lS753JZxpIN7wDkaVs23Y8KPd9ee4HT//A6u9qYXlJhUXKUpE2Kussa34i23oTy0I1hmO9N+VYa3W2oZrkG6mfa6mtewHWAMGaVQYI+V3GEYLkyz8t6NIXiSxRSy+K3FyJUy0IuhXQa2o6RxQIQIIxbTRGVMQSQotuch6NHUKAixjaTFeKWuIbSlsTz29Z7fWXHdPr795BVwxPubCuKNxGc5gtl+ehdCUK1l2iXo5EyAVbol5z0DCdmEpe2/BLRt1QluOk7IIDvvY38MS/J9KZm4AFwNprAZV1Mv0IbFISfymaYdXMoYeTy6esraPUgWEqYamBFcmynW+JxtPpMwjE5Cvaw7oF7a5puUm6OchS94gMmjUEz8KyFscI4HtsWyjuO0S81kc6jEljiaRI3uMj9zIhq6dgjTfm9OdTvIZWq1FVwPqcyVMkjTPiLQRlEM/O3HEbotteNqViFTuN1E3OAJ8xxw4UjMJHnWCSTb/aTP8WNuUh2CH7nYzgJDmTUmjXPEq/hd15BFrC3Mr413o7ikc/x84RYV2IkmA5+M1utHD6Q |
| X-RazorGate-Vade-Verdict: | clean 0 |
| X-RazorGate-Vade-Classification: | clean |
| X-VadeSecure-score: | verdict=clean score=0/300, class=clean |
| Message-ID: | <66c07319-52f0-415a-9ced-223030777eae@dronecode.org.uk> |
| Date: | Sat, 4 Apr 2026 13:06:55 +0100 |
| MIME-Version: | 1.0 |
| User-Agent: | Mozilla Thunderbird |
| Subject: | Re: gobject-introspection 1.86.0-1 |
| To: | Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> |
| References: | <20250913215145 DOT 14665-1-takashi DOT yano AT nifty DOT ne DOT jp> |
| <ee25b3e0-e459-4f05-84d4-79c54224d639 AT dronecode DOT org DOT uk> | |
| <20260317220447 DOT 0adcb7bd33d9b2863c212ba8 AT nifty DOT ne DOT jp> | |
| <38fd29ac-233f-4050-b644-5ee14e74bb1c AT dronecode DOT org DOT uk> | |
| <20260320143814 DOT 0d2dbafd73d53c4cb76e68c3 AT nifty DOT ne DOT jp> | |
| Cc: | cygwin AT cygwin DOT com |
| In-Reply-To: | <20260320143814.0d2dbafd73d53c4cb76e68c3@nifty.ne.jp> |
| X-BeenThere: | cygwin AT cygwin DOT com |
| X-Mailman-Version: | 2.1.30 |
| List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
| List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
| List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
| List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
| From: | Jon Turney via Cygwin <cygwin AT cygwin DOT com> |
| Reply-To: | Jon Turney <jon DOT turney AT dronecode DOT org DOT uk> |
| Errors-To: | cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com> |
On 20/03/2026 05:38, Takashi Yano via Cygwin wrote:
>>>> Hi Takashi,
>>>>
>>>> I just tripped over a small problem with gobject-introspection:
>>>>
>>>>> $ /usr/sbin/alternatives --set python3 /usr/bin/python3.12
>>>>>
>>>>> $ g-ir-scanner
>>>>> Traceback (most recent call last):
>>>>> File "/usr/bin/g-ir-scanner", line 133, in <module>
>>>>> from giscanner.scannermain import scanner_main
>>>>> File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 35, in <module>
>>>>> from giscanner.ast import Include, Namespace
>>>>> File "/usr/lib/gobject-introspection/giscanner/ast.py", line 27, in <module>
>>>>> from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF
>>>>> File "/usr/lib/gobject-introspection/giscanner/sourcescanner.py", line 31, in <module>
>>>>> from giscanner._giscanner import SourceScanner as CSourceScanner
>>>>> ModuleNotFoundError: No module named 'giscanner._giscanner'
>>>>
>>>> This fails because the _giscanner module is built for (and linked
>>>> against) python3.9.
>>>
>>> Thanks for pointing this out.
>>> Currently, _giscanner is compiled as
>>> /usr/lib/gobject-introspection/giscanner/_giscanner.cpython-39-x86_64-cygwin.dll
>>> which perhaps requires libpython3.9.dll.
>>>
>>>> I don't quite understand why this is happening since we configure with
>>>> "-Dpython=${PYTHON3}", so I'd expect end up with the full path to
>>>> specific python version in the shebang line in g-ir-scanner.
>>>>
>>>> (I think that's what was happening before upstream switched from
>>>> autotools to meson)
>>>>
>>>> In any case, this can be fixed in the cygport by using
>>>> python3_fix_shebang on this script.
>>>
>>> Could you please let me know bit more detail how to use
>>> 'python3_fix_shebang'?
>>
>> Sure.
>>
>> In this case, I'd suggest adding a custom src_install which contains the
>> default for the meson cygclass [1], then uses python3_fix_shebang[2].
>>
>>> src_install() {
>>> cd ${S}
>>> meson_install
>>>
>>> python3_fix_shebang /usr/bin/g-ir-scanner
>>> }
>>
>> The idea is that this adjusts the shebang line in the installed
>> g-ir-scanner so it references python3.9, so that the import can be found
>> (and thus it can be invoked successfully), irrespective of what version
>> /usr/bin/python3 points to.
>>
>> Unfortunately, when I actually try it, it seems that it can't handle
>> '#!/usr/bin/env python3' and just rewrites the env part. How
>> disappointing! That seems like a cygport bug :(
Yeah, now I look at it, it seems that a shebang starting with env is not
handled by __fix_shebang.
I guess I should fix that!
>> I guess you could just use something like this instead:
>>
>>> sed -i -e "s#python3#${PYTHON3}#" ${D}/usr/bin/g-ir-scanner
>
> Thanks! I released 1.86.0-2 using:
> sed -i -e "s AT python3@${PYTHON3##*/}@" ${D}/usr/bin/g-ir-annotation-tool
> sed -i -e "s AT python3@${PYTHON3##*/}@" ${D}/usr/bin/g-ir-doc-tool
> sed -i -e "s AT python3@${PYTHON3##*/}@" ${D}/usr/bin/g-ir-scanner
Thanks! That works fine now!
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |