beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
<aw-> beneroth: yeah, many things are GPL, i'm not worried about it, thanks!
<abu[7]> Cheers aw-!
rob_w has joined #picolisp
beneroth has quit [Quit: Leaving]
<taleon> tankf33der: I can no longer build PicoLisp under OpenBSD. The problem is readline. The readline version included in OpenBSD is too old and with version 8.2 from the ports I get an error message `lib.c:122:4: error: use of undeclared identifier 'rl_input_available_hook'` The Makefile does not seem to find the newer readline version. I have already added an `-I/usr/local/include/ereadline' under `MAIN' in
<taleon> the Makefile, but the same problem.
<taleon> $ ./configure
<taleon> $ tar xzf readline-8.2.tar.gz
<taleon> $ cd readline-8.2
<taleon> $ make
<taleon> $ doas make install
<taleon> It worked before, but now it overwrites something in the system and OpenBSD is no longer usable.
rob_w has quit [Remote host closed the connection]
<taleon> Therefore I would like to use the version 8.2 from the ports, which is installed under `/usr/local/include/ereadline/readline`.
<abu[7]> Strange! libreadline is downgraded?
rob_w has joined #picolisp
<taleon> OpenBSD uses an ancient readline version in the base system for reasons unknown to me. However, you can install the new version from the ports. But it is not used in the Makefile of PicoLisp. lib.c still uses the old version and then of course the error messages appear.
<taleon> `-I/usr/local/include/ereadline' should show the Makefile the location of the new version.
<taleon> MAIN = -rdynamic -lc -lutil -lm -I/usr/local/include/ereadline -lreadline -lffi -L/usr/local/lib -lncursesw
<taleon> I suspect OpenBSD uses the old version of readline in the base system, since it still uses GPL v2. Higher GPL versions are not compatible with the BSD license. Most of the GPL tools have been replaced by BSD licensed tools.
<abu[7]> Makes sense
<taleon> To avoid any confusion with the base readline/history library make sure
<taleon> you link to ereadline and ehistory. In the headers you can check for
<taleon> RL_READLINE_VERSION, RL_VERSION_MAJOR and RL_VERSION_MINOR to see which
<taleon> header you have picked up.
<taleon> To avoid any confusion with the base readline/history library make sure
<taleon> you link to ereadline and ehistory. In the headers you can check for
<taleon> RL_READLINE_VERSION, RL_VERSION_MAJOR and RL_VERSION_MINOR to see which
<taleon> oops
<tankf33der> here
<tankf33der> which openbsd you have now ?
<taleon> OpenBSD 7.5-current
<tankf33der> check last chapter about openbsd
<tankf33der> i used readline downloaded from iner
<tankf33der> from inet
<taleon> if i download the source code manually from the internet and install it, i can no longer enter and start anything in the system. xterm no longer works and I can no longer start any other tools.
<taleon> A few weeks ago that was still possible.
<tankf33der> it overwrite (or install) to /usr/local, right ?
<taleon> What exactly it changes in the system and where it is installed to, I cannot say. I have now reinstalled OpenBSD 3 times after downloading readline from the internet and installing it from source.
<taleon> That's why I would like to use the version from the ports. Apparently you have to use ereadline instead of readline, otherwise the two versions collide.
<tankf33der> the same readline 8.2
<taleon> Yes, but heavily patched.
<tankf33der> aha, make sense
<taleon> To avoid any confusion with the base readline/history library make sure you link to ereadline and ehistory. In the headers you can check for RL_READLINE_VERSION, RL_VERSION_MAJOR and RL_VERSION_MINOR to see which header you have picked up.
<taleon> I have already tried this with my limited knowledge. Apparently without success.
<tankf33der> trying myself openbsd 7.5
<tankf33der> installed
<taleon> Ok :-)
<taleon> That's how it worked until a few weeks ago.
<taleon> It has not been working for a few days because of readline.
<taleon> copy error, sorry: https://termbin.com/8y3z
<tankf33der> error repeated.
<taleon> Ok thanks ;)
<tankf33der> now testing plan B
<tankf33der> : (call 'uname '-a)
<tankf33der> OpenBSD openbsd.localdomain 7.5 GENERIC#79 amd64
<tankf33der> -> T
<tankf33der> keep have fun.
<tankf33der> one issue left.
<taleon> Wow, very good. I'm looking forward to it. :-)
<taleon> With readline from the ports or compiled and installed by yourself?
<tankf33der> installed.
<taleon> ok
<taleon> My problem was not only that PicoLisp did not build, but also that no programs worked under X11.
<taleon> That's why the idea was to use the version from the ports. Then you could also offer an official port of PicoLisp in the next step and not break your system.
<tankf33der> now compiled from ports.
<taleon> Yes! :-)
<tankf33der> they move everything to ereadline and to libereadline.so
<tankf33der> cooking the patch
<taleon> You have just made me very happy. Thank you very much. :-)
<abu[7]> Cool!
<tankf33der> taleon: use this one
<tankf33der> you must change only one line, check last block.
<tankf33der> try
<taleon> Ah clang 17. I have to reinstall.
<taleon> $ pil +
<taleon> Illegal instructio
<abu[7]> Oh
<abu[7]> strace ?
<taleon> strace is only available under Linux. Under *BSD there is ktrace. However, I have no idea how to use it in this case.
<tankf33der> Maybe -CURRENT issue
<abu[7]> Or ltrace for lib calls (libreadline)?
<taleon> Yes, that could be, although the 7.5 release is only a few days old and probably not much has changed internally. I'll do some more research. In any case, thank you very much for your help.
<taleon> The current release is OpenBSD 7.5, released April 5, 2024. This is the 56th release.
<tankf33der> welcome.
<taleon> I'll keep you up to date as soon as I've made progress.
<abu[7]> 👍
<taleon> abu[7]: ltrace is available
rob_w has quit [Remote host closed the connection]
<abu[7]> OK
<taleon> However, I have no idea how to read and interpret this. :-)
<tankf33der> Show your Makefile
<tankf33der> i have 20mins for this
<tankf33der> Remove .SILENT on top of file and
<tankf33der> make clean
<tankf33der> make
<tankf33der> and show output
<tankf33der> to get full circle of recompilation
<abu[7]> The ltrace contains no obvious error
<taleon> Maybe it has something to do with this, but this change is already active since OpenBSD 7.5 and should also affect your installation: https://marc.info/?l=openbsd-tech&m=170205367232026&w=2
<abu[7]> or
<tankf33der> cd ../bin
<tankf33der> ./picolisp
<taleon> cr@hal:bin$ ./picolisp
<taleon> : (version)
<taleon> 24.4.5
<taleon> -> (24 4 5)
<tankf33der> works :)
<taleon> But not pil +
<taleon> only pil
<tankf33der> try
<tankf33der> which pil
<taleon> cr@hal:~$ pil +
<taleon> Illegal instruction
<taleon> cr@hal:~$ type pil
<taleon> pil is /home/cr/mystuff/src/github.com/pil21/pil
<tankf33der> Correct pil?
Nistur has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
gahr has quit [*.net *.split]
f8l has quit [*.net *.split]
<taleon> yes I think
<tankf33der> show pwd
<taleon> cr@hal:pil21$ pwd
<taleon> cr@hal:pil21$ ls
<taleon> COPYING README doc/ img/ lib.css loc/ misc/ src/ vip*
<taleon> /home/cr/mystuff/src/github.com/pil21
<taleon> INSTALL bin/ ext.l lib/ lib.l man/ pil* test/
<tankf33der> ./pil
<taleon> cr@hal:pil21$ ./pil
<taleon> :
<taleon> cr@hal:pil21$ ./pil +
<taleon> Illegal instruction
<tankf33der> o debug mode
<tankf33der> ok
<taleon> Yes. vip works perfect but not the debug mode
<tankf33der> I don remember if i run today those in debug mode and can check only tomorrow
<taleon> Ok thank you :)
<tankf33der> type:
<tankf33der> head ./pil
<taleon> cr@hal:pil21$ head ./pil
<taleon> #!/bin/sh
<taleon> exec ${0%/*}/bin/picolisp ${0%/*}/lib.l @ext.l "$@"
<tankf33der> ok
<tankf33der> try switch to llvm17 from ports
<tankf33der> o
<tankf33der> stop
<tankf33der> better
<taleon> i use version 17
<tankf33der> Oj
Nistur has joined #picolisp
f8l has joined #picolisp
<taleon> llvm-17.0.6p6
<tankf33der> remove -O3 from opt call in head of Makefile
<tankf33der> And do full recycle
<tankf33der> full circle
<tankf33der> type
<taleon> From the ASM parameter or everything?
<tankf33der> llvm-config —version
bjorkintosh has joined #picolisp
gahr has joined #picolisp
<tankf33der> everything
<taleon> 17.0.6
<tankf33der> eh
<taleon> Illegal instruction
<taleon> same
<tankf33der> No ideas.
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #picolisp
bjorkintosh has quit [Changing host]
bjorkintosh has joined #picolisp
<taleon> Me neither. but thank you for your help. :)
<taleon> I'll ask for help on the OpenBSD mailing list. Possibly an OpenBSD problem that the developers there can help me with.
<tankf33der> One thing
<tankf33der> when i installed llvm17 i saw xx-17 postfix to all files
<tankf33der> do you see the same?
<taleon> Yes, I had also tested that with it. However, I have added this to the $PATH
<taleon> export PATH=/usr/local/llvm17/bin:$PATH
<taleon> export LD_LIBRARY_PATH=/usr/local/llvm17/lib
<tankf33der> Why LD thing?
<taleon> export PATH=/usr/local/llvm17/bin:$PATH
<taleon> However, both versions do not work
<taleon> I picked that up somewhere :)
<tankf33der> Wrong
<tankf33der> away
<taleon> Removed the LD_LIBRARY and added -17 to the Makefile like you posted earlier. Same error.
<taleon> Ok bye and thanks. :-)
<tankf33der> Reboot
<tankf33der> and try full circle
<tankf33der> 2. Install openbsd 7.5 stable and try again
<tankf33der> or downgrade somehow
<tankf33der> or upgrade -CURRENT to latest.
<tankf33der> afk
<tankf33der> or compile hello world c programm by clang17
<taleon> tankf33der: Already tried everything except installing OpenBSD 7.5 stable. I might try that tomorrow on the other computer.
<taleon> I'm also at the end of my rope with ideas. I'll sleep on it tonight. Maybe tomorrow I'll be enlightened ;-)