From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-048.btinternet.com (mailomta11-sa.btinternet.com [213.120.69.17]) by sourceware.org (Postfix) with ESMTPS id A38783851C0C for ; Thu, 11 Jun 2020 21:39:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A38783851C0C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=jon.turney@dronecode.org.uk Received: from sa-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.38.7]) by sa-prd-fep-048.btinternet.com with ESMTP id <20200611213948.TXX4139.sa-prd-fep-048.btinternet.com@sa-prd-rgout-004.btmx-prd.synchronoss.net> for ; Thu, 11 Jun 2020 22:39:48 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-Originating-IP: [86.141.128.212] X-OWM-Source-IP: 86.141.128.212 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduhedrudeitddgtdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecunecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepteejfffhheeuleeufeeiueduveeltdeiveejuddvgfegjeeuheefgeffgeffheefnecuffhomhgrihhnpegthihgfihinhdrtghomhenucfkphepkeeirddugedurdduvdekrddvuddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurdduudejngdpihhnvghtpeekiedrudeguddruddvkedrvdduvddpmhgrihhlfhhrohhmpeeojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhequceuqfffjgepkeeukffvoffkoffgpdhrtghpthhtohepoegthihgfihinhdqrghpphhssegthihgfihinhdrtghomheq X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.117] (86.141.128.212) by sa-prd-rgout-004.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5ED9B6610142D802 for cygwin-apps@cygwin.com; Thu, 11 Jun 2020 22:39:48 +0100 Subject: Re: Help needed with gobject-introspection To: "cygwin-apps@cygwin.com" References: <2c0802e9-e66c-768e-61f2-f2797acc1acb@cornell.edu> <78ad982d-8cab-323d-8bc5-682f3f2bc11f@cornell.edu> <7837c562-f96c-3084-40f8-1a52afcebdf5@dronecode.org.uk> <429779d8-dc38-2f75-bd3e-42f898941483@cornell.edu> <6703fe25-ba53-68c7-c398-843b2a8295dc@dronecode.org.uk> <93b48fc8-61f9-ce33-ac76-0e6cc56aa18c@dronecode.org.uk> <62ba273e-4eed-6578-32e5-8cd24fe25c3f@dronecode.org.uk> <3d2cb151-e243-a539-32f0-ffa40be78745@dronecode.org.uk> <0d6292b3-72df-e6ad-fcc5-f03bbf923087@dronecode.org.uk> <4f5d1485-cf5a-8535-2923-5d31be901741@cornell.edu> <5fb4bf89-58a5-88cb-c2cb-29cfef65ffc1@dronecode.org.uk> <0876122c-1c1e-54e0-1a18-0c3774e71641@cornell.edu> From: Jon Turney Message-ID: <4345fbc7-0c30-9335-46a8-bfe2ae79a8bc@dronecode.org.uk> Date: Thu, 11 Jun 2020 22:39:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no 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-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 21:39:52 -0000 On 06/06/2020 15:15, Ken Brown via Cygwin-apps wrote: > > I think I might have bumped into another meson/introspection/pickling > bug, this time in connection with harfbuzz.  The supported build system > for harfbuzz is still autotools.  But they're planning to move to meson, > so I decided to get a head start and try the meson build, which fails as > follows: > > [230/257] Generating HarfBuzz-0.0.gir with a meson_exe.py custom command > FAILED: src/HarfBuzz-0.0.gir > /usr/bin/meson --internal exe --unpickle > /tmp/harfbuzz-2.6.7/build/meson-private/meson_exe_g-ir-scanner_2a1d762c64dc7a0dcba76211733b53a4f7f14918.dat > > [...] > ERROR: can't resolve libraries to shared libraries: harfbuzz-gobject > g-ir-scanner: link: cc -o > /tmp/harfbuzz-2.6.7/build/tmp-introspectKdIYKJ/HarfBuzz-0.0.exe > /tmp/harfbuzz-2.6.7/build/tmp-introspectKdIYKJ/HarfBuzz-0.0.o -L. > -lharfbuzz -lharfbuzz-gobject -lm -lglib-2.0 -lintl -lgobject-2.0 > -lcairo -lfreetype -lgraphite2 -lfontconfig > -L/tmp/harfbuzz-2.6.7/build/src -Wl,-rpath,/tmp/harfbuzz-2.6.7/build/src > -L/tmp/harfbuzz-2.6.7/build/src -Wl,-rpath,/tmp/harfbuzz-2.6.7/build/src > -L/tmp/harfbuzz-2.6.7/build/src -Wl,-rpath,/tmp/harfbuzz-2.6.7/build/src > -lgio-2.0 -lgobject-2.0 -Wl,--export-all-symbols -lgmodule-2.0 > -lglib-2.0 -lintl [...] Thanks for the reproduction steps. To debug: hack meson to get it to disgorge the pickled command it's executing, then you can run the failing g-ir-scanner command line while poking at things in /usr/lib/gobject-introspection/giscanner/ This actually looks like a bug in 'g-ir-scanner --no-libtool' (which obviously isn't usually exercised by an autotools build), failing in this particular case. It looks to match the following list of regexes: > ([^\s]*cyg*harfbuzz[^A-Za-z0-9_][^\s\(\)]*) > ([^\s]*cyg*harfbuzz\-gobject[^A-Za-z0-9_][^\s\(\)]*) against ldd output like this, to extract the shared library names: > ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ff916d80000) > KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ff916660000) > KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ff914a20000) > cyggmodule-2.0-0.dll => /usr/bin/cyggmodule-2.0-0.dll (0x3e0590000) > cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000) > cygharfbuzz-gobject-0.dll => /work/harfbuzz-2.6.7/_build/src/cygharfbuzz-gobject-0.dll (0x4389e0000) > cyggio-2.0-0.dll => /usr/bin/cyggio-2.0-0.dll (0x3e0f40000) > cygglib-2.0-0.dll => /usr/bin/cygglib-2.0-0.dll (0x3e0870000) > cyggobject-2.0-0.dll => /usr/bin/cyggobject-2.0-0.dll (0x3dff50000) > cygharfbuzz-0.dll => /work/harfbuzz-2.6.7/_build/src/cygharfbuzz-0.dll (0x4408d0000) > cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3cf150000) > cygz.dll => /usr/bin/cygz.dll (0x3bc750000) > cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3dbec0000) > cygpcre-1.dll => /usr/bin/cygpcre-1.dll (0x4629a0000) > cygffi-6.dll => /usr/bin/cygffi-6.dll (0x3e3fd0000) > cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x50caa0000) > cygfreetype-6.dll => /usr/bin/cygfreetype-6.dll (0x451720000) > cyggraphite2-3.dll => /usr/bin/cyggraphite2-3.dll (0x5f6ba0000) > cygbz2-1.dll => /usr/bin/cygbz2-1.dll (0x3e9980000) > cygpng16-16.dll => /usr/bin/cygpng16-16.dll (0x3c58d0000) > cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x57b190000) Unfortunately, the first regex matches the cygharfbuzz-gobject line, leaving the second regex unmatched. We have to allow a '-' to appear after the library name, as that introduces a soversion, so I worked around this by patching /usr/lib/gobject-introspection/giscanner/shlibs.c like this: --- shlibs.py~ 2018-02-11 23:15:03.000000000 +0000 +++ shlibs.py 2020-06-11 22:28:07.901294700 +0100 @@ -62,7 +62,7 @@ if platform.system() == 'Darwin': pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)" elif platform.platform().startswith('CYGWIN'): - pattern = "([^\s]*cyg*%s[^A-Za-z0-9_][^\s\(\)]*)" + pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)" return re.compile(pattern % re.escape(library_name)) But this all seems very fragile though, so I'm not sure if that's the right way to fix this. (This 'if cygwin' case is coming from gobject-introspection package in [1], it's not in upstream) https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/gobject-introspection.git;a=blob;f=1.46.0-cygwin.patch;h=a03271ea17e0d167eba7627ddf5d4303bbde9871;hb=4e3b8bd140db78ee35f29ee3d07ff3715416e259#l93