Re: Weird errors when playing with 0compile
"Bastian Eicher" <[email protected]> Mon, 6 Jun 2022 13:48:50 +0200
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Mateusz,
I just gave it a try and can reproduce the same error on my machine.
On Windows tools like 0compile and 0template internally call "0install fetch" and pass via stdin a partial feed containing implementations to be downloaded.
The relevant code is here: https://github.com/0install/0install/blob/b2.3/zeroinstall/injector/fetch.py#L697-L715
In this case the feed XML being passed looks like this:
<interface xmlns="http://zero-install.sourceforge.net/2004/injector/interface">
<implementation arch="*-src" id="sha1=1d53a96ee896dfae8d84a2e02fceae2dfac54aaa" version="1.0">
<file dest="pikchr.c" href="https://pikchr.org/home/raw/ec6f88c37683e48a0564e2dd710310253be88d6d9510dd0064ab6030e7fdb973?at=pikchr.c" size="278267"/>
<command name="compile" path="pikchr.c">
<runner interface="https://akavel.github.io/0catalog/feeds/zig.xml">
<arg>cc</arg>
<arg>-DPIKCHR_SHELL</arg>
<arg>-opikchr.exe</arg>
</runner>
<ns0:implementation arch="Windows-x86_64">
<command name="run" path="pikchr.exe"/>
</ns0:implementation>
</command>
</implementation>
<implementation arch="Windows-x86_64" id="sha1new=b13e3d3e14424253ed6e1bf41440516c32e02475" version="0.9.0">
<command name="run" path="zig.exe"/>
<manifest-digest sha256new="I37LXVBF7U5NCCRKF6EAKYEUGI5BVU3DRK3WXDQ3ZIVEG6EWSMYQ"/>
<archive extract="zig-windows-x86_64-0.9.0" href="https://ziglang.org/download/0.9.0/zig-windows-x86_64-0.9.0.zip" size="65045849" type="application/zip"/>
</implementation>
</interface>
<ns0:implementation> seems to be the problem here. This is the implementation that 0compile wants to build, so there is nothing to download. Also, the "ns0" XML prefix is undeclared, causing "0install fetch" to reject the feed.
@Thomas Can we prevent 0compile from including the implementation being built in the list of fetched implementations? I don't quite understand where the "ns0" XML prefix is coming from.
Regards
Bastian
--- Original message --
From: Mateusz Czaplinski <[email protected]>
Sent: Dienstag, 31. Mai 2022 00:14
To: The Zero Install system <[email protected]>
Subject: [Zero-install-devel] Weird errors when playing with 0compile
Hi!
I just tried to experiment a bit with creating a build using 0compile. I drafted an xml file which I pasted in the following link:
https://gist.github.com/akavel/86650d6c22718ad0ffed9334d3ad2e5c
I tried to build it using 0compile (on Windows), but I'm getting weird errors:
----8<----8<----8<---8<----
c:> 0compile autocompile pikchr.xml
===================== C:\prog\pikchr\test2\pikchr.xml ======================
Selecting versions for Pikchr...
Selection done.
Plan:
- Pikchr: Compile 1.0 (sha1=1d53a96ee896dfae8d84a2e02fceae2dfac54aaa)
No dependencies need compiling... compile Pikchr itself...
There is an error in XML document (1, 524).
'ns0' is an undeclared prefix. Line 1, position 524.
Download with external fetcher failed
c:> 0compile autocompile pikchr.xml sdaf
usage: 0compile autocompile [--gui] URI
C:\prog\pikchr\test2>0compile setup pikchr.xml sdaf
WARNING:0install:Feed download from https://akavel.github.io/0catalog/feeds/zig.xml failed: Error downloading https://akavel.github.io/0catalog/feeds/zig.xml: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
There is an error in XML document (1, 524).
'ns0' is an undeclared prefix. Line 1, position 524.
Download with external fetcher failed
'C:\\Users\\Mateusz\\AppData\\Local\\http://0install.net\\injector\\executables\\ZI_COMPILE_0INSTALL\\ZI_COMPILE_0INSTALL.exe' 'download' '--source' '--xml' 'C:\\prog\\pikchr\\test2\\pikchr.xml' failed (exit code 1)
----8<----8<----8<---8<----
Would you have any hints as to what's wrong and what I could do to try resolving those?
TIA,
/Mateusz.