Need help installing library(real)

Dear Nicos,

I try to install real 2.1 on SWI 8.2.2 under Windows10.
R version is : R x64 4.0.3
Installation and test_real are OK

but I rapidely have problems with basic R functions :

The complete for_real file runs quite good until :

I tried to revert to an older SWI version, but unfortunately I can’t restore a state where SWI and R work together. ( pack_rebuild doesn’t work in my environement).

I hope that you may have time to fix this problem (I am rearly blocked with this issue).

Thank you very much in advance

JAB

Dear JAB,

This doesn’t look at all like an issue with Real.

I do not usually look into MSWins issues, but as I had a clean laptop at hand
I made an exception.

Everything runs fine for Real 2.1 + R 4.0.3 + Swipl 8.2.2-1 on some
kind of MSW 10 maintained by a university IT team.

Do try a clean install on an alternative machine, it sounds like you
have installed multiple versions on a single machine.

You can also run R + Swi in a virtual box, or install dual boot with Linux.

Please note Real is offered without support, and Linux is our main OS.

Hope it helps,

Nicos Angelopoulos

Dear Nicos,
Thank you for your message.
I tried complete reinstall from R and Swi but the problem is still there :

Yes I had previous version of SWI and R on this Laptop, but I uninstalled the old versions, checked that path was reset and register also before installing the new versions.
I spent a whole day on testing various versions of R and SWi, and none worked correctly.
I installed R and SWI on my wife’s old PC and it works correctly, but it is not a solution.
I can’t understand why a clean reinstallation doesn’t work…

Do you, or someone else, have a hint on what I can do without having to use “virtual box” or “dual boot” (too complex for me …).

Thank you in advance for your help.
best regards
JAB

Dear All,
Thank you for your messages and interest in my problem.
I am completly lost with all the various solutions prooposed (virtualBox, docker, Wsl , MinGW, etc… ). Frankly I am not a system developper, and al this is far too complex for my present competences.
As last solution I think that I will go for the wsl solution used by mgondan. Perhaps he could give some hints on installing this, and we could share on using R with swi as generator of models evaluated with R.

BUT before I give up with a standard win10 installation just some points :
On a Win10 machine runing SWI-Prolog (threaded, 64 bits, version 8.3.10) and R4.0.3

  1. with real 2.1 : installation and test_real works perfectly : :slight_smile:

  1. the more complete tests with ‘for_real.pl’ : also works well :slight_smile:

until ex(nan) : tests on ‘$Nan’ and ‘’ values in matrix (but that didn’t work in previous versions and can be avoided on testing values before sending).

x) on fresh PC using win10 + Swi 8.2.2 (or8.3) + R4.0.3 all works well :slight_smile:

OOps message was sent too fast…
continued …

Before I give up with a standard win10 installation just some points :
On a Win10 machine runing SWI-Prolog (threaded, 64 bits, version 8.3.10) and R4.0.3

  1. The crucial part which doesn’t work is sending command to R :

  2. It is strange that point 3) works perfectly well on a fresh PC .

  3. on the machine having problems, I had various tools installed such as Cygwin, Msys, minGw, octave, etc… but I don’t use them.
    Is it possible that I have a bad interaction ?
    Could it be a solution to rebuild the machine from scratch ?

All suggestions for building a simple Swi+R on win10 are welcome
Thank you in advance

JAB

I guess real’s handling of non-normal floats predates SWI-Prolog’s support for these. I don’t know whether @nicos keeps this as is for compatibility with YAP or this should be updated.

Suggests it somehow picks up an incompatible dll. I guess best is to search the system for (old) copies of libswipl.dll, the real dll and the R dlls. Note that the search order for dlls is

  1. Dir holding the .exe file
  2. Any dir in %PATH%
  3. Windows system dir.

That is a bit of an approximation. The complete search algorithm in Windows 10 is complex.

Thank you Eric.
But I bet that a new install (without previous real2.0 or older than 8.1 swipl) should be done without problem.
It seems that problem appears when you had previously older version running on the machine.

Thank you in advance for your help.
JAB

Thank you Jan for your hints.
I will investigate and keep you informed.
All the best
JAB

With WSL2 you are in the Ubuntu world. Just tested. This sequence works just fine (Ubuntu 20.04, current git version of SWI-Prolog).

sudo apt install r-base-core
swipl
?- pack_install(real).
?- [pack('real/examples/for_real')].
?- for_real.
1 Like

Yes i know that wsl2 could be a solution.
but I work currently on 2 machines, a desktop and a laptop when underway. Much of my current work is under window and I would prefer to have the same environnement on both machines.
btw : I found no old dll (libswipl , real or R) on my laptop.
I am just about reinstalling win10 from scratch. hope this helps but am not sure…
Thank you
JAB

Do you have two accounts on this site?
It does make it confusing for the rest of us.

Yes
Sorry for using the old account pjadata.

Jacques Abel
pja@a2m2.ch
[ mobile ]

IIRC I first installed WSL, WSL1, so to say. There was something I had to do with the Powershell, very obscure. Then, for reasons I don’t remember, I upgraded to WSL2, which went smooth in my case, but reports in the internet say that this is sometimes complicated. But I guess you will end up with a bash under windows, and the usual unix behavior. No XWindows though, but who needs these childish “icons and windows” :slight_smile: There is an XServer for Windows, but I never got it to work.

In the bash, you can follow the usual ubuntu steps for installing R and swipl. I did not encounter any problems.

Sorry for not being able to provide you more detailed description, but I think once WSL2 is running, the rest follows quite smoothly.