Output of strace:
raphy@raphy:~$ strace -o calls.log /home/raphy/MyPrj/builddir/MyPrj
Current path: "/home/raphy"
[FATAL ERROR: at Thu May 14 12:12:58 2026
Could not open resource database "./swipl-devel/lib/swipl/boot.prc": No such file or directory]
Aborted (core dumped)
In CMakeLists.txt` file:
target_link_directories(${PROJECT_NAME} PUBLIC
./src/swipl-devel/lib/swipl/lib
./src/swipl-devel/lib/swipl/lib/x86_64-linux
./src/swipl-devel/lib/swipl/bin/x86_64-linux
)
target_include_directories(${PROJECT_NAME} PUBLIC
./src/swipl-devel/lib/swipl/include
)
target_link_libraries (${PROJECT_NAME} PUBLIC
swipl
)
raphy@raphy:~/MyPrj/src/swipl-devel/lib/swipl/lib/x86_64-linux$ ls -lah | grep libswipl.so
lrwxrwxrwx 1 raphy raphy 14 May 13 18:45 libswipl.so -> libswipl.so.10
lrwxrwxrwx 1 raphy raphy 18 May 13 18:45 libswipl.so.10 -> libswipl.so.10.1.7
-rw-r--r-- 1 raphy raphy 14M May 13 18:44 libswipl.so.10.1.7
raphy@raphy:~/MyPrj/src/swipl-devel/lib/swipl$ ls
ABI app bin boot boot.prc cmake customize demo doc include lib library LICENSE README.md swipl.home
raphy@raphy:~/MyPrj/src/swipl-devel/lib/swipl$ cat ABI
swipl-abi-2-68-b5762387-a5b83da7
I built and compiled again swipl:
raphy@raphy:~$ git clone --recursive https://github.com/SWI-Prolog/swipl-devel.git
raphy@raphy:~/swipl-devel$ cmake -DCMAKE_INSTALL_PREFIX=/home/raphy/MyPrj/src/swipl-devel/ -DCMAKE_BUILD_TYPE=Release -DSWIPL_PACKAGES_JAVA=OFF -DINSTALL_DOCUMENTATION=OFF -GNinja -B builddir -S .
raphy@raphy:~/swipl-devel$ cmake --build builddir --target install -j10
-- Install configuration: "Release"
-- Set non-toolchain portion of runtime path of "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/bin/x86_64-linux/swipl" to "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/lib/x86_64-linux"
-- Set non-toolchain portion of runtime path of "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/lib/x86_64-linux/libswipl.so.10.1.7" to "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/lib/x86_64-linux"
-- Set non-toolchain portion of runtime path of "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/bin/x86_64-linux/swipl-win" to "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/lib/x86_64-linux"
-- Set non-toolchain portion of runtime path of "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/bin/x86_64-linux/swipl-ld" to "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/lib/x86_64-linux"
But I get the same error :
raphy@raphy:~/MyPrj$ ./builddir/MyPrj
Current path: "/home/raphy/MyPrj"
[FATAL ERROR: at Thu May 14 12:55:25 2026
Could not open resource database "./swipl-devel/lib/swipl/boot.prc": No such file or directory]
Aborted (core dumped)
raphy@raphy:~$ strace -o calls.log /home/raphy/MyPrj/builddir/MyPrj
Current path: "/home/raphy"
[FATAL ERROR: at Thu May 14 13:01:32 2026
Could not open resource database "./swipl-devel/lib/swipl/boot.prc": No such file or directory]
Aborted (core dumped)
Last lines of calls.log :
ioctl(0, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
ioctl(2, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
newfstatat(AT_FDCWD, "/home/raphy", {st_mode=S_IFDIR|0750, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/raphy", {st_mode=S_IFDIR|0750, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "./swipl-devel/bin/swipl", 0x7fff38e53cc0, 0) = -1 ENOENT (No such file or directory)
readlink("./swipl-devel/bin/swipl", 0x7fff38e55d60, 4095) = -1 ENOENT (No such file or directory)
getcwd("/home/raphy", 4096) = 12
newfstatat(AT_FDCWD, "/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/raphy/swipl-devel/bin", 0x7fff38e4cbc0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/raphy/swipl-devel/swipl.home", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/raphy/MyPrj/src/swipl-devel/lib/swipl/ABI", O_RDONLY) = 13
ioctl(13, TCGETS, 0x7fff38e50b70) = -1 ENOTTY (Inappropriate ioctl for device)
fcntl(13, F_SETFD, FD_CLOEXEC) = 0
read(13, "swipl-abi-2-68-b5762387-a5b83da7"..., 4096) = 33
close(13) = 0
openat(AT_FDCWD, "./swipl-devel/bin/swipl", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "./swipl-devel/lib/swipl/boot.prc", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "[FATAL ERROR: at Thu May 14 13:0"..., 43) = 43
write(2, "Could not open resource database"..., 94) = 94
write(2, "]\n", 2) = 2
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid() = 153682
getpid() = 153682
tgkill(153682, 153682, SIGABRT) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=153682, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
@jan What does “Inappropriate ioctl for device” mean ?
And why
newfstatat(AT_FDCWD, "./swipl-devel/bin/swipl", 0x7ffc02a43000, 0) = -1 ENOENT (No such file or directory)
?