New/upgraded pack install fails

60 views
Skip to first unread message

Julio Di Egidio

unread,
Aug 25, 2016, 9:13:13 PM8/25/16
to SWI-Prolog
Hello all,

I was having a problem installing a pack to the SWI repository.

After updating the code to version 1.1 and playing some more with
installing it, not only I still cannot get the new version to SWI repository,
now I cannot even install the old version, 1.0, that is there!

Here are the errors:

?- pack_install('http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip').
ERROR
: I/O error in read on stream <stream>(0434C8A8) (Invalid argument)
ERROR
: In:
ERROR
:   [12] setup_call_catcher_cleanup(prolog_pack: ...,prolog_pack: ...,exit,prolog_pack: ...)
ERROR
:   [10] prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program files (x86)/swipl/pack',nan_numerics_prime,[...|...]) at c:/program files (x86)/swipl/library/prolog_pack.pl:796

?- pack_install(nan_numerics_prime).% Contacting server at http://www.swi-prolog.org/pack/query ... ok
Install nan_numerics_prime@1.1 from http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip Y/n?
ERROR
: I/O error in read on stream <stream>(0434CE00) (Invalid argument)
ERROR
: In:
ERROR
:   [12] setup_call_catcher_cleanup(prolog_pack: ...,prolog_pack: ...,exit,prolog_pack: ...)
ERROR
:   [10] prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program files (x86)/swipl/pack',nan_numerics_prime,[...|...]) at c:/program files (x86)/swipl/library/prolog_pack.pl:796

Note that in the second call, despite the pack shown on the SWI site
is at version 1.0, it is trying to install version 1.1 already.

As explained in the other thread, the .zip file is downloaded successfully
(and I have verified that there is no problem with it with library(archive)),
then the pack folder is created, but finally the install errors and the pack
folder remains empty.

Any help appreciated.

Thank you,

Julio

Jan Wielemaker

unread,
Aug 26, 2016, 5:52:17 AM8/26/16
to Julio Di Egidio, SWI-Prolog
On 08/26/2016 03:13 AM, Julio Di Egidio wrote:
> Hello all,
>
> I was having a problem installing a pack to the SWI repository.
>
> After updating the code to version 1.1 and playing some more with
> installing it, not only I still cannot get the new version to SWI
> repository,
> now I cannot even install the old version, 1.0, that is there!
>
> Here are the errors:
>
> |
> ?-pack_install('http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip').
> ERROR:I/O error inread on stream <stream>(0434C8A8)(Invalidargument)
> ERROR:In:
> ERROR:
> [12]setup_call_catcher_cleanup(prolog_pack:...,prolog_pack:...,exit,prolog_pack:...)
> ERROR:
> [10]prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program
> files (x86)/swipl/pack',nan_numerics_prime,[...|...])at c:/program files
> (x86)/swipl/library/prolog_pack.pl:796
>
> ?-pack_install(nan_numerics_prime).%Contactingserver at
> http://www.swi-prolog.org/pack/query
> <http://www.swi-prolog.org/pack/query>... ok
> Installnan_numerics_prime@1.1
> <mailto:nan_numerics_prime@1.1>fromhttp://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip
> <http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip>Y/n?
>
> ERROR:I/O error inread on stream <stream>(0434CE00)(Invalidargument)
> ERROR:In:
> ERROR:
> [12]setup_call_catcher_cleanup(prolog_pack:...,prolog_pack:...,exit,prolog_pack:...)
> ERROR:
> [10]prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program
> files (x86)/swipl/pack',nan_numerics_prime,[...|...])at c:/program files
> (x86)/swipl/library/prolog_pack.pl:796
> |
>
> Note that in the second call, despite the pack shown on the SWI site
> is at version 1.0, it is trying to install version 1.1 already.
>
> As explained in the other thread, the .zip file is downloaded successfully
> (and I have verified that there is no problem with it with
> library(archive)),
> then the pack folder is created, but finally the install errors and the pack
> folder remains empty.

The error location doesn't match my source. Which version are you
using? Installation from a URL just downloads the data from the URL
and then calls the installation predicate that is also used for local
archives. It shouldn't be too hard to step through the process and
find out what is going wrong. It works here, so I can't debug it.

Cheers --- Jan


>
> Any help appreciated.
>
> Thank you,
>
> Julio
>
> --
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swi-prolog+...@googlegroups.com
> <mailto:swi-prolog+...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/swi-prolog.
> For more options, visit https://groups.google.com/d/optout.

Julio Di Egidio

unread,
Aug 26, 2016, 6:18:10 AM8/26/16
to SWI-Prolog
On Friday, August 26, 2016 at 11:52:17 AM UTC+2, Jan Wielemaker wrote:
On 08/26/2016 03:13 AM, Julio Di Egidio wrote:
> Hello all,
>
> I was having a problem installing a pack to the SWI repository.
>
> After updating the code to version 1.1 and playing some more with
> installing it, not only I still cannot get the new version to SWI
> repository,
> now I cannot even install the old version, 1.0, that is there!
>
> Here are the errors:
>
> |
> ?-pack_install('http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip').
> ERROR:I/O error inread on stream <stream>(0434C8A8)(Invalidargument)
> ERROR:In:
> ERROR:
> [12]setup_call_catcher_cleanup(prolog_pack:...,prolog_pack:...,exit,prolog_pack:...)
> ERROR:
> [10]prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program
> files (x86)/swipl/pack',nan_numerics_prime,[...|...])at c:/program files
> (x86)/swipl/library/prolog_pack.pl:796
>
> ?-pack_install(nan_numerics_prime).%Contactingserver at
> http://www.swi-prolog.org/pack/query
> <http://www.swi-prolog.org/pack/query>... ok
> Installnan_numerics_prime@1.1
> <http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip>Y/n?
>
> ERROR:I/O error inread on stream <stream>(0434CE00)(Invalidargument)
> ERROR:In:
> ERROR:
> [12]setup_call_catcher_cleanup(prolog_pack:...,prolog_pack:...,exit,prolog_pack:...)
> ERROR:
> [10]prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program
> files (x86)/swipl/pack',nan_numerics_prime,[...|...])at c:/program files
> (x86)/swipl/library/prolog_pack.pl:796
> |
>
> Note that in the second call, despite the pack shown on the SWI site
> is at version 1.0, it is trying to install version 1.1 already.
>
> As explained in the other thread, the .zip file is downloaded successfully
> (and I have verified that there is no problem with it with
> library(archive)),
> then the pack folder is created, but finally the install errors and the pack
> folder remains empty.

The error location doesn't match my source.  Which version are you
using?

SWI-Prolog (Multi-threaded, 32 bits, Version 7.3.24) on Win 7.

Also, you say it works for you but do you mean from the download URL or from a local .zip?  Meanwhile, please also note that
now the pack list on the SWI web does show the new version, but if you try and open the pack page, it says Failed to process
pack... and if I try to install on my machine with pack_install(nan_numerics_prime) I still get the above exception.

  Installation from a URL just downloads the data from the URL
and then calls the installation predicate that is also used for local
archives.  It shouldn't be too hard to step through the process and
find out what is going wrong.  It works here, so I can't debug it.

It does not get to call pack_install_from_local at all.  I have tried to step through it by putting
a trace/0 call at line 802 of prolog_pack.pl, which is the second clause of pack_install_from_url/5,
like this:

pack_install_from_url(Scheme, URL, PackTopDir, Pack, Options) :-
 
...
 setup_call_cleanup
(
     http_open
(URL, In,
       
[ cert_verify_hook(ssl_verify)
       
]),
     setup_call_cleanup
(
  open
(DownloadFile, write, Out, [type(binary)]),
% originally was: copy_stream_data(In, Out),
(format('## File: ~w~n## Stream (out): ~w~n', [DownloadFile, Out]), trace, copy_stream_data(In, Out)),
  close
(Out)),
     close
(In)),
 
....
 pack_install_from_local
(DownloadFile, PackTopDir, Pack, Options).


But all I get is the call to copy_stream_data/2, which does succeed in populating the .zip file
with contents in pack/Downloads, then it just goes on to close the streams and there it fails:

?- pack_install(nan_numerics_prime).
## File: c:/program files (x86)/swipl/pack/Downloads/nan_numerics_prime-1.1.zip
## Stream (out): <stream>(044D2418)
   
Call: (16) copy_stream_data(<stream>(044D22E8,044D2380), <stream>(044D2418)) ? creep
   
Exit: (16) copy_stream_data(<stream>(044D22E8,044D2380), <stream>(044D2418)) ? creep
   
Call: (16) close(<stream>(044D2418)) ? creep
   
Exit: (16) close(<stream>(044D2418)) ? creep
   
Call: (14) close(<stream>(044D22E8,044D2380)) ? creep
   
Exception: (14) close(<stream>(044D22E8,044D2380)) ? creep
ERROR
: I/O error in read on stream <stream>(044D22E8) (Invalid argument)
ERROR
: In:
ERROR
:   [12] setup_call_catcher_cleanup('<garbage_collected>',prolog_pack: ...,exit,prolog_pack: ...)
ERROR
:   [10] prolog_pack:pack_install_from_url(http,'http://julio.diegidio.name/Projects/Nan.Numerics.Prime/Prolog/nan_numerics_prime-1.1.zip','c:/program files (x86)/swipl/pack',nan_numerics_prime,[...|...]) at c:/program files (x86)/swipl/library/prolog_pack.pl:796

Julio

Julio Di Egidio

unread,
Aug 27, 2016, 12:43:26 AM8/27/16
to SWI-Prolog
> It works here, so I can't debug it.

What the heck does that even mean??

You just never answer my questions directly, here as elsewhere.

In the meantime, one week to write the whole lib and another
week unsuccessfully trying to upload the pack...

That's simply unsustainable: and it's always the same story,
trying to contribute anything for SWI is just a huge waste of time.

Julio
Message has been deleted

Julio Di Egidio

unread,
Aug 27, 2016, 1:35:58 AM8/27/16
to SWI-Prolog

On Friday, August 26, 2016 at 3:13:13 AM UTC+2, Julio Di Egidio wrote:


Hello all,

I was having a problem installing a pack to the SWI repository.

Unfortunately installation into the SWI pack repository still fails for me,
and no way out of this impasse is in sight.

I will be announcing release of the library anyway at this point, in the
meantime at version 1.2 (1.2-beta):
https://github.com/jp-diegidio/Nan.Numerics.Prime-Prolog/releases/tag/1.2-beta

But I'd be just grateful if anybody could try and run this for me:


Thank you,

Julio

Jan Wielemaker

unread,
Aug 29, 2016, 3:50:51 AM8/29/16
to Julio Di Egidio, SWI-Prolog
On 27/08/16 06:43, Julio Di Egidio wrote:
>> It works here, so I can't debug it.
>
> What the heck does that even mean??

Just what it says. I can step through the code, but as it all works I
won't see anything wrong. You can do the same and you'll get an error
at some place. If we know exactly where the error comes from it might
be possible to find the cause. I think you should know that. I also
think you should know it is pointless to send in bug reports that can
be summarized as `it doesn't work'.

From the somewhat more detailed trace it looks like the download
failed. You claim the file is there. If it is there and complete, it
might be that the final handshake to close the SSL connection and
socket failed somewhere. You've got all the source, you even claimed
to know OpenSSL at some point, so do your thing.

> You just never answer my questions directly, here as elsewhere.
>
> In the meantime, one week to write the whole lib and another
> week unsuccessfully trying to upload the pack...

Which you probably could have fixed in a couple of hours. That
would not only have saved you a lot of frustration, but also would
have helped others with the same setup.

> That's simply unsustainable: and it's always the same story,
> trying to contribute anything for SWI is just a huge waste of time.

You don't have to

Cheers --- Jan

Julio Di Egidio

unread,
Aug 29, 2016, 10:00:36 AM8/29/16
to swi-p...@googlegroups.com
On Monday, August 29, 2016 at 9:50:51 AM UTC+2, Jan Wielemaker wrote:
 
From the somewhat more detailed trace it looks like the download
failed.  You claim the file is there.  If it is there and complete, it
might be that the final handshake to close the SSL connection and
socket failed somewhere.  You've got all the source, you even claimed
to know OpenSSL at some point, so do your thing.

No, as said the file was there and fine, i.e. I could install from the file just fine
afterward (in fact, after copying it outside of the SWI pack folder, otherwise
SWI would complain: "Warning: No registered pack matches...").

Anyway, the problem must indeed have been with SSL, as there is no SSL
on my site but I was able to install from the GitHub location via HTTPS!

I must conclude only HTTPS is supported, just the docs do not mention it, right?
(Not that I can be sure 100%, only you or someone else familiar enough with
the implementation can tell for sure: in fact, there might be some special treatment
for GitHub that I am just not aware of.)

BTW, this must have been a bug/feature introduced at some point, because installing
packs via HTTP (not HTTPS) did work for me then in 2012.

Anyway, at least my tribulations for now seem over: I mean, just the time to ship yet
another version, this time with with the download URL pointing to [the file] on GutHub...

I hope the above feedback is useful.

Cheers,

Julio

Julio Di Egidio

unread,
Aug 29, 2016, 10:42:56 AM8/29/16
to swi-p...@googlegroups.com
another version, this time with with the download URL pointing to releases on GutHub...

Of course I have given up on automatic pack upgrading: as far as I get it, that would only
work for GitHub projects where the whole project is the pack.

[ I have also given up on the pack list online on the SWI's site, everything keeps happening
there: at the moment, the pack in the list is at version 1.2.3 and the pack in the details page
is at version 1.1, and it keep changing and unpredictably... maybe just crunching the new
version? In the meantime I have already distributed and installed version 1.2.5:

Julio

Julio Di Egidio

unread,
Aug 29, 2016, 11:40:56 AM8/29/16
to SWI-Prolog
Indeed it won't happen again: not only that attitude is really unacceptable as
it shows no respect for people who do are trying to give some time to the project,
it also so happens that I have already, rather it was totally wasted, as you couldn't
even be bothered to eventually approve the job when done.  (Remember the non-
backtracking dictionaries? That was a job done when you just decided you were
not anymore interested.  But similar story with the extension of the SSL interface,
though at that point I knew better, so I stopped working on it as soon as you showed
not even any interest in reviewing the spec.) So yes, for those reasons mainly, I won't
do any more work for and on SWI.

Julio

Martin

unread,
Aug 30, 2016, 2:32:01 AM8/30/16
to swi-p...@googlegroups.com
During the last year, whenever rudeness occurred on this mailing list,
the single common denominator was you. Therefore, before accusing others
of an unacceptable attitude, you should work on your own.

A small hint: contributing to a project still doesn't give you the right
to offend people. Offending those whom you depend upon is even more
counterproductive.

Martin



On 08/29/2016 05:40 PM, Julio Di Egidio wrote:
> On Monday, August 29, 2016 at 9:50:51 AM UTC+2, Jan Wielemaker wrote:
>
> On 27/08/16 06:43, Julio Di Egidio wrote:
>
>
>
> > That's simply unsustainable: and it's always the same story,
> > trying to contribute anything for SWI is just a huge waste of time.
>
> You don't have to
>
>
> Indeed it won't happen again: not only that attitude is really
> unacceptable as
> it shows no respect for people who do are trying to give some time to
> the project,
> it also so happens that *I have already*, rather it was totally wasted,
> as you couldn't
> even be bothered to eventually approve the job when done. (Remember the
> non-
> backtracking dictionaries? That was a job done when you just decided you
> were
> not anymore interested. But similar story with the extension of the SSL
> interface,
> though at that point I knew better, so I stopped working on it as soon
> as you showed
> not even any interest in reviewing the spec.) So yes, for those reasons
> mainly, I won't
> do any more work for and on SWI.
>
> Julio
>

Julio Di Egidio

unread,
Aug 30, 2016, 1:02:48 PM8/30/16
to swi-p...@googlegroups.com
On Tuesday, August 30, 2016 at 8:32:01 AM UTC+2, martin.riener wrote:
During the last year, whenever rudeness occurred on this mailing list,
the single common denominator was you.

Martin Riener, if that is your name, discussions happen and: 1) I was not rude, 2) you better learn what collaboration even means.

Rather, I formally point out and complain against *your reiterated ad hominem*, while you certainly get into my kill file, troll.


Julio

Martin

unread,
Aug 31, 2016, 7:36:25 AM8/31/16
to swi-p...@googlegroups.com
Every comment on your behaviour is by definition ad hominem.
Interestingly enough, you "argue" ad hominem regularly: [1][2][3] (on
the swi list) [4][5][6][7] (on the sci.logic list). Offensive behaviour
might be accepted in sci.logic, but at least I will not accept this
here. Whenever you are out of line, I will remind you of it.

Martin


[1] https://groups.google.com/d/msg/swi-prolog/t5zD-e2oyGo/hEr4h7zHBwAJ
[2] https://groups.google.com/d/msg/swi-prolog/t5zD-e2oyGo/72T7TbrRBwAJ
[3] https://groups.google.com/d/msg/swi-prolog/V_GVNXHrcNs/-X_83neqBgAJ
[4] https://groups.google.com/d/msg/sci.logic/JpaOgoI3TFU/tHudIJAZ-jMJ
[5] https://groups.google.com/d/msg/sci.logic/JpaOgoI3TFU/iHUv1N_xeeUJ
[6] https://groups.google.com/d/msg/sci.logic/NZujoA-BoYE/vj1PswsCRG0J
[7] https://groups.google.com/d/msg/sci.logic/ujBpaRKt6VM/UlNBtlLjBAAJ

On 08/30/2016 07:02 PM, Julio Di Egidio wrote:
> On Tuesday, August 30, 2016 at 8:32:01 AM UTC+2, martin.riener wrote:
>
> During the last year, whenever rudeness occurred on this mailing list,
> the single common denominator was you.
>
>
> Martin Reiner, if that is your name, discussions happen and: 1) I was

Julio Di Egidio

unread,
Aug 31, 2016, 9:01:33 AM8/31/16
to SWI-Prolog
On Wednesday, August 31, 2016 at 1:36:25 PM UTC+2, martin.riener wrote:
 
Every comment on your behaviour is by definition ad hominem.
Interestingly enough, you "argue" ad hominem regularly: [1][2][3] (on
the swi list) [4][5][6][7] (on the sci.logic list). Offensive behaviour
might be accepted in sci.logic, but at least I will not accept this
here. Whenever you are out of line, I will remind you of it.

And whenever you do, I will point out what a nasty moron and reason hater
with no actual etiquette or respect you still are...

Julio

[1] https://groups.google.com/d/msg/swi-prolog/t5zD-e2oyGo/hEr4h7zHBwAJ
[2] https://groups.google.com/d/msg/swi-prolog/t5zD-e2oyGo/72T7TbrRBwAJ
[3] https://groups.google.com/d/msg/swi-prolog/V_GVNXHrcNs/-X_83neqBgAJ
[4] https://groups.google.com/d/msg/sci.logic/JpaOgoI3TFU/tHudIJAZ-jMJ
[5] https://groups.google.com/d/msg/sci.logic/JpaOgoI3TFU/iHUv1N_xeeUJ
[6] https://groups.google.com/d/msg/sci.logic/NZujoA-BoYE/vj1PswsCRG0J
[7] https://groups.google.com/d/msg/sci.logic/ujBpaRKt6VM/UlNBtlLjBAAJ

On 08/30/2016 07:02 PM, Julio Di Egidio wrote:
> On Tuesday, August 30, 2016 at 8:32:01 AM UTC+2, martin.riener wrote:
>
>     During the last year, whenever rudeness occurred on this mailing list,
>     the single common denominator was you.
>
> Martin Reiner, if that is your name, discussions happen and: 1) I was
> not rude, 2) you better learn what collaboration even means.
>
> Rather, I formally point out and complain against *your reiterated ad
> hominem*, while you certainly get into my kill file, troll.
>
>     Therefore, before accusing others
>     of an unacceptable attitude, you should work on your own.
>
>     A small hint: contributing to a project still doesn't give you the
>     right
>     to offend people. Offending those whom you depend upon is even more
>     counterproductive.
>

Jan Wielemaker

unread,
Aug 31, 2016, 9:36:16 AM8/31/16
to Julio Di Egidio, SWI-Prolog
On 08/31/2016 03:01 PM, Julio Di Egidio wrote:
>
> And whenever you do, I will point out what a nasty moron and reason hater
> with no actual etiquette or respect you still are...

I don't like using my powers as list admin. It would be the first time
(disregarding some spammers). It is getting really tempting though.

Read this as a first (and last) warning.

--- Jan

Julio Di Egidio

unread,
Aug 31, 2016, 9:40:10 AM8/31/16
to SWI-Prolog

No worries, if you think I am the one out of line here, I am really done with you to begin with...

Just please do not reply further or I'll be compelled to defend my position.

Julio

Reply all
Reply to author
Forward
0 new messages