ciao-lang / ciao

Ciao is a modern Prolog implementation that builds up from a logic-based simple kernel designed to be portable, extensible, and modular.
https://ciao-lang.org
GNU Lesser General Public License v3.0
268 stars 20 forks source link

`./ciao-boot.sh global-install` fails when copying files #85

Closed jpellegrini closed 1 year ago

jpellegrini commented 1 year ago

Hello,

I have tried to compile and install Ciao globally (on a Debian system), but it fails to copy some files.

What I did was this:

./ciao-boot.sh configure --instype=global --prefix=/usr/local/  --bindir=/usr/local/bin

which succeeded, followed by

sudo ./ciao-boot.sh global-install

which failed, apparently complaining that some function (open (2) maybe?) was used on a directory, not a file.

=> core: installing [bin]
   installing engine/
   installing lib/
   installing library/
{ERROR: system:c_copy_file/3, arg 1 - system error: Is a directory}

The error persisted even if I did rm -rf /usr/local/ciao and tried again.

After the failed attempt, I have this directory:

/usr/local/ciao/1.22.0/core/

(with no siblings) and within it,

/usr/local/ciao/1.22.0/core/engine
/usr/local/ciao/1.22.0/core/lib
/usr/local/ciao/1.22.0/core/library

I suppose the last one is incomplete:

$ ls -l /usr/local/ciao/1.22.0/core/library/
-rwxr-xr-x 1 root root    0 Jul 18 14:40 bf
-rw-r--r-- 1 root root 5592 Jul 18 09:45 logged_process.pl
drwxr-xr-x 1 root root  156 Jul 18 14:35 sr

I have tried to find why it fails, but I'm not yet familiar with Ciao sources and build system...

jfmc commented 1 year ago

It seems that installation is having troubles with a symlink. Removing core/library/bf (which points to sr should fix it (the symlink is there for backwards compatibilty). We are working on a patch to fix it.

jpellegrini commented 1 year ago

Thanks @jfmc -- indeed, removing the symlink allowed installation to proceed, and I could call the ciao exacutable from the shell.

jpellegrini commented 1 year ago

I have updated my git repo to 18eeb4b77ade15a73508323bc768f5d2c68abc6a and tried again -- after removing everything (rm .gitignore, then git status, then remove all files not supposed to be in a fresh copy of the repository; also removed ~/.ciao, just in case) I tried again. Ciao now compiles and installs cleanly! :)

jfmc commented 1 year ago

Great!