All required libs are available :( I can (import ...) any of them except libsqlite3 while newlisp runs in chroot
gringo: ~ $: ls /var/www/usr/lib/
total 31968
drwxr-xr-x 2 root daemon 512B Jan 20 20:32 ./
drwxr-xr-x 7 root daemon 512B Apr 10 2023 ../
-r--r--r-- 1 root daemon 3.6M Jan 15 10:24 libc.so.100.3
-r--r--r-- 1 root daemon 1.8M Jan 15 10:31 libcurses.so.15.0
-r--r--r-- 1 root daemon 43.1K Jan 15 10:24 libffi.so.2.1
-r--r--r-- 1 root daemon 584K Jan 15 10:22 libm.so.10.1
-r--r--r-- 1 root daemon 597K Jan 15 10:22 libreadline.so.5.0
-r--r--r-- 1 root daemon 7.0M Jan 20 18:51 libsqlite3.so.8.6
gringo: ~ $: newlisp
newLISP v.10.7.6 64-bit on BSD IPv4/6 UTF-8 libffi, options: newlisp -h
> (import "/var/www/usr/lib/libsqlite3.so.8.6")
true
gringo: ~ $: doas chroot -u www -g www /var/www /usr/bin/newlisp
newLISP v.10.7.6 64-bit on BSD IPv4/6 UTF-8 libffi, options: newlisp -h
> (import "/usr/lib/libsqlite3.so.8.6")
ERR: problem loading library in function import : "Cannot load specified object"
> (import "/usr/lib/libc.so.100.3" "printf")
printf@D5CDE4B7A40
>
gringo: ~ $:
$(CC) $(OBJS) -m64 -o newlisp -static -Wl,-Bstatic -lm -lc
strip newlisp
(print (replace ....))
then the string will be printed without extras before double-quotes, but the interactive output coming after will still show the string with that meta-character wrapping.> (println "\"")
"
"\""
>
The first line is what the println function prints (which is the "raw" string content with a newline added at end), and the second line is the interactive output of the value returned by the println function (the same string but with meta-characters to make it be the character sequence the input reader would need).