Hi Jonas,

Сб 03 сен 2022 @ 21:19 Jonas Smedegaard <jo...@jones.dk>:

>> The autopkgtest caught that the package is not functional on !amd64:
>> 
>> (buster_arm64-dchroot)bunk@amdahl:/tmp$ eye.pvm 
>> /usr/bin/eye.pvm: 3: exec: /usr/lib/swi-prolog/bin/x86_64-linux/swipl: not 
>> found
>> (buster_arm64-dchroot)bunk@amdahl:/tmp$ 
>> 
>> Changing Architecture: from "all" to "any" might be a reasonable option.
>
> In my understanding, this is a bug in SWI Prolog, in that when
> generating a so-called "intermediate code file" it embeds an
> arch-specific path to the interpreter instead of the arch-independent
> symlink in PATH: /usr/bin/swipl
>
> @Lev: What do you think?  Is it possible to patch SWI Prolog to embed an
> architecture-agnostic path for executing intermediary files?

SWI-Prolog supports three different pre-compiled formats: qlf, boot.prc,
and user created states. The first two do not include paths to the
interpreter. Looks like eye relies on the third one. I've asked upstream
about the possibility to embed an arch-independent path to such user
created states and got the answer that sometimes it is not a good idea,
because these states may differ due to conditional compilation. I've
looked into eye and looks like it does not (at least curretly, or I was
not able to spot it) use conditional compilation on various
architectures. So, I think it is probably save to embed arch-independent
path to the interpreter. SWI-Prolog upstream pushed a commit to support
this feature, but one should enable it explicitely with a command-line
option when running swipl to generate pre-compiled file of this kind
(like, swipl -o myexe --emulator=/usr/bin/swipl -c mycode.pl). I will
add this patch to the swi-prolog in Debian in the near future (probably,
I will have some time for it on the coming weekend, also I plan to
finish packaging a new upstream stable release, 8.4.3, where Debian is
at 8.4.2 at this point). I'll let you know when you can experiment with
eye concerning this change.

Cheers!
Lev

Reply via email to