Re: CLISP on Haiku

Alexandru Popa <[email protected]> Mon, 4 Nov 2024 10:23:20 +0200
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAL2wRjTXcFJDpZKCJHCnkLYTauBH+uOzeg-R4=ugPiRy6BzCaQ@mail.gmail.com>
--===============7723450401761072244==
Content-Type: multipart/alternative; boundary="000000000000ff361e062611ff54"

--000000000000ff361e062611ff54
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

Meanwhile, I have
>   - Tuned the memory management configuration for Haiku.
>     On x86_64 it's possible to use mmap instead of malloc.
>     But on this platform, I turned off generational GC by default,
>     since here it provides a 20% slowdown instead of a speedup.
>   - Added workarounds for Haiku-specific test failures
>     (streams.erg, streamslong.erg).
>   - Added and fixed your Haiku-specific user configuration.
>     Tested by running  (edit-file "~/foo.c")  and  (clhs 'setf):
>     The edit-file function was not returning immediately. And the
>     clhs function complained that the value of *browser* was of
>     the wrong type.
>


Thank you Bruno.


> There are still test failures relating to sockets, but other platforms
> have that too. Not sure if these failures have important effects.
>
>
The Haiku thread about CLISP has some input from Haiku developers (
https://discuss.haiku-os.org/t/make-ansi-common-lisp-available-on-haiku-aga=
in/15780/87):
"the only thing to know is you need to link to libnetwork. Other than that,
it should be identical to other unix systems, and if you have any beos
specific code, you should remove it." (PulkoMandy
<https://discuss.haiku-os.org/u/PulkoMandy>), "It=E2=80=99s already linked =
with
libnetwork (and libbsd), so leaves the old BeOS code to be updated then I
presume." (Begasus <https://discuss.haiku-os.org/u/Begasus>)


> Did you test these binaries? I installed the x86_64 one, and
>
> 1) When I start /bin/clisp, there is an error
>   runtime_loader: Cannot open file libsigsegv.so.2 (needed by
> /boot/system/lib/clisp-2.49.93+/base/lisp.run): No such file or directory
>
> So I install package 'libsigsegv'.
>
> 2) When I start /bin/clisp, there is an error
>   runtime_loader: Cannot open file libunistring.so.5 (needed by
> /boot/system/lib/clisp-2.49.93+/base/lisp.run): No such file or directory
>
> So I uninstall package 'libunistring' and reinstall the packages
> 'libunistring' and 'libunistring2'.
>
> It seems that the binary package is missing at least these two
> dependencies.
> The dependencies to readline and ffcall seem to be working, on the other
> hand.
>
> Now it's worth making new packages, I would say.
>

Sorry, my fail. This is my very first Haiku recipe (and first software port
ever). During building I installed corresponding _devel packages, which
also installed these ones. And then did not check the runtime dependencies.
Of course they should be specified in the recipe. I will update the recipe
ASAP.

I also have some observations:
1. **features** lists *:UNIX* and *:OS-UNIX*, but does not list *:HAIKU* /
*:OS-HAIKU*. The former may be OK in sense Haiku to some extent can be
considered Unix-like. But it is sufficiently different from Unix to specify
*:HAIKU* and / or *:OS-HAIKU*, so 3rd-party packages can make OS-specific
decisions. Maybe this can be done via *cfghaiku.lisp*? I did not find any
reference to **features** in *cfgunix.lisp*.
2. I see CLISP on Haiku does not support threading? I know, I am too
impatient, but I believe once it will be added. Because CLISP is a CLI
application, I do not expect it to be any different from Linux threads.

I managed to compile the following CLISP modules (not tried them except
asdf):
- *asdf*,
- *berkeley-db*,
- *clx/mit-clx* (I doubt this one is actually useful in Haiku),
- *editor*,
- *gdbm*,
- *libsvm*,
- *pcre*,
- *postgresql*,
- *queens*,
- *rawsock*,
- *zlib*.
One more package, *pari* is almost buildable. It depends on *pari.desc*
file containing information about pari functions, but this file is not more
delivered with pari. On the one hand, it can be re-created relatively
simple (and maybe pari source contain some script about it), but on the
other hand, pari CLISP package may be altered to read *src/functions*
folder instead.

Alexandru

--000000000000ff361e062611ff54
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,<br></div><br><div class=3D"gmail_quote"><div></di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex">
Meanwhile, I have<br>
=C2=A0 - Tuned the memory management configuration for Haiku.<br>
=C2=A0 =C2=A0 On x86_64 it&#39;s possible to use mmap instead of malloc.<br=
>
=C2=A0 =C2=A0 But on this platform, I turned off generational GC by default=
,<br>
=C2=A0 =C2=A0 since here it provides a 20% slowdown instead of a speedup.<b=
r>
=C2=A0 - Added workarounds for Haiku-specific test failures<br>
=C2=A0 =C2=A0 (streams.erg, streamslong.erg).<br>
=C2=A0 - Added and fixed your Haiku-specific user configuration.<br>
=C2=A0 =C2=A0 Tested by running=C2=A0 (edit-file &quot;~/foo.c&quot;)=C2=A0=
 and=C2=A0 (clhs &#39;setf):<br>
=C2=A0 =C2=A0 The edit-file function was not returning immediately. And the=
<br>
=C2=A0 =C2=A0 clhs function complained that the value of *browser* was of<b=
r>
=C2=A0 =C2=A0 the wrong type.<br>=C2=A0</blockquote><div><br></div><div>Tha=
nk you Bruno.<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad=
ding-left:1ex">
There are still test failures relating to sockets, but other platforms<br>
have that too. Not sure if these failures have important effects.<br>
<br></blockquote><div><br></div><div>The Haiku thread about CLISP has some =
input from Haiku developers (<a href=3D"https://discuss.haiku-os.org/t/make=
-ansi-common-lisp-available-on-haiku-again/15780/87">https://discuss.haiku-=
os.org/t/make-ansi-common-lisp-available-on-haiku-again/15780/87</a>): &quo=
t;the only thing to know is you need to link to libnetwork. Other than=20
that, it should be identical to other unix systems, and if you have any=20
beos specific code, you should remove it.&quot; (<span class=3D"gmail-first=
 gmail-username gmail-staff gmail-admin gmail-moderator"><a href=3D"https:/=
/discuss.haiku-os.org/u/PulkoMandy" class=3D"gmail-">PulkoMandy</a></span>)=
, &quot;It=E2=80=99s already linked with libnetwork (and libbsd), so leaves=
 the old BeOS code to be updated then I presume.&quot; (<span class=3D"gmai=
l-first gmail-username"><a href=3D"https://discuss.haiku-os.org/u/Begasus" =
class=3D"gmail-">Begasus</a></span>)<br></div><div>=C2=A0</div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex">
Did you test these binaries? I installed the x86_64 one, and<br>
<br>
1) When I start /bin/clisp, there is an error<br>
=C2=A0 runtime_loader: Cannot open file libsigsegv.so.2 (needed by /boot/sy=
stem/lib/clisp-2.49.93+/base/lisp.run): No such file or directory<br>
<br>
So I install package &#39;libsigsegv&#39;.<br>
<br>
2) When I start /bin/clisp, there is an error<br>
=C2=A0 runtime_loader: Cannot open file libunistring.so.5 (needed by /boot/=
system/lib/clisp-2.49.93+/base/lisp.run): No such file or directory<br>
<br>
So I uninstall package &#39;libunistring&#39; and reinstall the packages<br=
>
&#39;libunistring&#39; and &#39;libunistring2&#39;.<br>
<br>
It seems that the binary package is missing at least these two dependencies=
.<br>
The dependencies to readline and ffcall seem to be working, on the other ha=
nd.<br>
<br></blockquote><div></div><div></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">
Now it&#39;s worth making new packages, I would say.<br></blockquote><div><=
br></div><div><div>Sorry, my fail. This is my very first Haiku recipe (and =
first=20
software port ever). During building I installed corresponding _devel=20
packages, which also installed these ones. And then did not check the=20
runtime dependencies. Of course they should be specified in the recipe. I
 will update the recipe ASAP.<br></div></div></div><div class=3D"gmail_quot=
e"><br></div><div class=3D"gmail_quote">I also have some observations:</div=
><div class=3D"gmail_quote">1. <b>*features*</b> lists <b>:UNIX</b> and <b>=
:OS-UNIX</b>, but does not list <b>:HAIKU</b> / <b>:OS-HAIKU</b>. The forme=
r may be OK in sense Haiku to some extent can be considered Unix-like. But =
it is sufficiently different from Unix to specify <b>:HAIKU</b> and / or <b=
>:OS-HAIKU</b>, so 3rd-party packages can make OS-specific decisions. Maybe=
 this can be done via <b>cfghaiku.lisp</b>? I did not find any reference to=
 <b>*features*</b> in <b>cfgunix.lisp</b>.<br></div><div class=3D"gmail_quo=
te">2. I see CLISP on Haiku does not support threading? I know, I am too im=
patient, but I believe once it will be added. Because CLISP is a CLI applic=
ation, I do not expect it to be any different from Linux threads.</div><div=
 class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">I managed to co=
mpile the following CLISP modules (not tried them except asdf):</div><div c=
lass=3D"gmail_quote">- <b>asdf</b>,<br></div><div class=3D"gmail_quote">- <=
b>berkeley-db</b>,</div><div class=3D"gmail_quote">- <b>clx/mit-clx</b> (I =
doubt this one is actually useful in Haiku),</div><div class=3D"gmail_quote=
">- <b>editor</b>,</div><div class=3D"gmail_quote">- <b>gdbm</b>,</div><div=
 class=3D"gmail_quote">- <b>libsvm</b>,</div><div class=3D"gmail_quote">- <=
b>pcre</b>,</div><div class=3D"gmail_quote">- <b>postgresql</b>,</div><div =
class=3D"gmail_quote">- <b>queens</b>,</div><div class=3D"gmail_quote">- <b=
>rawsock</b>,<br></div><div class=3D"gmail_quote">- <b>zlib</b>.</div><div =
class=3D"gmail_quote">One more package, <b>pari</b> is almost buildable. It=
 depends on <b>pari.desc</b> file containing information about pari functio=
ns, but this file is not more delivered with pari. On the one hand, it can =
be re-created relatively simple (and maybe pari source contain some script =
about it), but on the other hand, pari CLISP package may be altered to read=
 <b>src/functions</b> folder instead.</div><div class=3D"gmail_quote"><br><=
/div><div class=3D"gmail_quote">Alexandru<br></div></div>

--000000000000ff361e062611ff54--


--===============7723450401761072244==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7723450401761072244==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel

--===============7723450401761072244==--