Porting SBCL Common Lisp to Haiku

I am on the way to port SBCL Common Lisp (http://sbcl.org/) to Haiku.

SBCL is The Common Lisp ™ in almost all respects. It is open source, standard compliant, is ported to many operational systems and hardware architectures and has high performance. All new technologies, infrastructure and packages written in Common Lisp are usually firstly and primarily target SBCL implementation.

My ultimate goal is to upstream all the code to SBCL and to provide Haiku hpkg in Depot. I contacted SBCL team and with their assistance (better said, trying their code) the process seems to progress.

I will post here about important milestones. If somebody is interested in joining, he/she is/are welcome. Additionally, I would like to avoid duplication of the effort. If you know of any previous work done in this direction, I would be happy to use it.

1 Like

There is a recipe for ecl in haikuports https://github.com/haikuports/haikuports/blob/bf5779343db785b3a1e3aeada09eedf65f745e87/dev-lisp/ecl/ecl-16.1.3.recipe
Maybe you could have a look there while you start :slight_smile:

Thank you @Begasus. Of course I get this recipe and am going to contact its author (@KapiX). At very least, ECL can help bootstrapping SBCL. I didn’t look inside, but I doubt its code can help implementing some SBCL internals.

The philosophy of ECL is to implement Common Lisp standard in C and rely on C portability to provide the support for all operational systems and architectures. The philosophy of SBCL is to provide as much as possible native support for each system configuration. This usually makes it perform much better. Do not forget that garbage collection, threads, big integer calculus, unicode characters, signal processing, filesystem support and so on are outside of C standard. And many semi-standard libraries provide uniform support for them without taking in consideration particularities of each combination.

Haiku specific code was committed to SBCL master (https://sourceforge.net/p/sbcl/sbcl/ci/3fbb204b46ded6cab4f7249bf6ebf645301228f7/, https://sourceforge.net/p/sbcl/sbcl/ci/80e574014f25623ca70c96fec386c2a1550c8523/).

All work was done and committed by Douglas Katzman, a member of SBCL hackers team. My involvement was in a neighborhood of 0, as to speak mathematically. The good news is all the code is by default up-streamed, Haiku is treated as all other OSes and eventually will be a first-class citizen when the port becomes stable enough.

In order to run SBCL one needs a small native application sbcl (similar to java) and one binary image file of compiled Common Lisp code with all ANSI Common Lisp standard in it (similar to Java classpath, rt.jar). These artifacts already can be produced and it is possible to write some simple programs in it. However, the port needs to be finished, polished and to pass the tests.


Unfortunately, compilation o SBCL fails and I have no clue of how to debug this. Can somebody help? Here is the dump:

Debug information for team /boot/home/Repository/sbcl/src/runtime/sbcl (14167):
CPU(s): 2x Intel Core 2
Memory: 11.75 GiB total, 976.27 MiB used
Haiku revision: hrev53635 Dec 14 2019 07:19:40 (x86_64)

Active Threads:
thread 14333: team 14167 debug task
thread 14167: sbcl (main)
state: Debugged

	Frame		IP			Function Name
	0x30de80	0x1000c138dd	? 
		Unable to retrieve disassembly for IP 0x1000c138dd: address not contained in any valid image.
		Frame memory:
			[0x30de68]  ... ....c~......   17 00 10 20 00 00 00 00 63 7e c6 05 10 00 00 00
			[0x30de78]  ........           00 00 00 00 00 00 00 00
	0x30df28	0x1000c26b9d	? 
	0x30df78	0x100141587c	? 
	0x30dfe0	0x1001d8c043	? 
	0x30e040	0x1001d8cc63	? 
	0x30e070	0x1001d9f51c	? 
	0x30e098	0x1001d9e63c	? 
	0x30e120	0x1001176dcc	? 
	0x30e148	0x10011780ab	? 
	0x30e1d0	0x100117e564	? 
	0x30e200	0x100142b0c3	? 
	0x30e270	0x100142a725	? 
	0x30e2d8	0x100117bd38	? 
	0x30e350	0x10011d133d	? 
	0x30e380	0x100117c98d	? 
	0x30e3f8	0x10011d108d	? 
	0x30e470	0x10011d1155	? 
	0x30e550	0x10011d5fcc	? 
	0x30e610	0x1001179cce	? 
	0x30e6e0	0x10011d5960	? 
	0x30e7d0	0x10011d3fb1	? 
	0x30e880	0x100117299d	? 
	0x30e9f0	0x10011d4dd0	? 
	0x30eaf8	0x10011d7186	? 
	0x30ec00	0x1002929983	? 
	0x30ece0	0x10011726a4	? 
	0x30ee20	0x100292971d	? 
	0x30eee8	0x1001e3770a	? 
	0x30ef10	0x1001e38344	? 
	0x30f140	0x100208ffba	? 
	0x30f290	0x100208f718	? 
	0x30f350	0x1001179cce	? 
	0x30f510	0x100208f133	? 
	0x30f618	0x100209267c	? 
	0x30f6a0	0x1002090c21	? 
	0x30f7a8	0x1002092855	? 
	0x30f880	0x1002091f5b	? 
	0x30f930	0x100209444e	? 
	0x30f9f8	0x1001e3791c	? 
	0x30fa10	0x1001e380f5	? 
	0x30fbc0	0x1000d9c96a	? 
	0x30fd88	0x1000d9ec19	? 
	0x30fe48	0x1002231e18	? 
	0x30ff08	0x1002231b6f	? 
	0x30ffc8	0x1002231262	? 
	0x7fbdf51eacc0	0x21af40b92b8	call_into_lisp + 0x40 
	0x7fbdf51eade0	0x21af40a859b	sbcl_main(int, char**, char**) + 0x58b (/boot/home/Repository/sbcl/src/runtime/runtime.c:766)
		envp: 0x7fbdf51eb698 {
			*envp: XDG_CONFIG_DIRS=/boot/system/settings
		core: No such file or directory
		sbcl_argv: No such file or directory {
			*sbcl_argv: Unavailable
		embedded_core_offset: 0
		initial_function: No such file or directory
		memsize_options {
			dynamic_space_size: 203001917272
			thread_control_stack_size: 203001919368
			thread_tls_bytes: 203001921176
			present_in_core: 0
		have_hardwired_spaces: No such file or directory

	0x7fbdf51eae00	0x21af4098999	_start + 0x39 
	0x7fbdf51eae40	0x103e75495c3	runtime_loader + 0x103 
	00000000	0x7ff99212c260	commpage_thread_exit + 0 

		  rip:	0x0000001000c138dd
		  rsp:	0x000000000030de68
		  rbp:	0x000000000030de80
		  rax:	0x0000001005c68003
		  rbx:	0x0000000020100017
		  rcx:	0x0000001000ac8993
		  rdx:	0x0000001005c19213
		  rsi:	0x000000100276b023
		  rdi:	0x0000001005a06ff3
		   r8:	0x0000001005c67e63
		   r9:	0x0000001005c19213
		  r10:	0x0000001005c67e63
		  r11:	0x000000002010004f
		  r12:	0x0000000020100017
		  r13:	0x0000000000512000
		  r14:	0x0000000020100017
		  r15:	0x0000001005c19213
		   cs:	0x002b
		   ds:	0x0000
		   es:	0x0000
		   fs:	0x0000
		   gs:	0x0000
		   ss:	0x0023
		  st0:	0
		  st1:	0
		  st2:	0
		  st3:	0
		  st4:	0
		  st5:	0
		  st6:	0
		  st7:	0
		  mm0:	{0, 0, 0, 0}
		  mm1:	{0, 0, 0, 0}
		  mm2:	{0, 0, 0, 0}
		  mm3:	{0, 0, 0, 0}
		  mm4:	{0, 0, 0, 0}
		  mm5:	{0, 0, 0, 0}
		  mm6:	{0, 0, 0, 0}
		  mm7:	{0, 0, 0, 0}
		 xmm0:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm1:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm2:	{0, 0x4160, 0, 0, 0, 0, 0, 0}
		 xmm3:	{0, 0x4160, 0, 0, 0, 0, 0, 0}
		 xmm4:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm5:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm6:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm7:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm8:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm9:	{0, 0, 0, 0, 0, 0, 0, 0}
		xmm10:	{0, 0, 0, 0, 0, 0, 0, 0}
		xmm11:	{0, 0, 0, 0, 0, 0, 0, 0}
		xmm12:	{0, 0, 0, 0, 0, 0, 0, 0}
		xmm13:	{0, 0, 0, 0, 0, 0, 0, 0}
		xmm14:	{0, 0, 0, 0, 0, 0, 0, 0}
		xmm15:	{0, 0, 0, 0, 0, 0, 0, 0}

Loaded Images:
ID Text Base Text End Data Base Data End Type Name
142187 0xbb75c3000 0xbb75ca000 0xbb77c9000 0xbb77ca000 lib /boot/system/lib/libbsd.so
142177 0x627ffa2000 0x6281820000 0x6281a1f000 0x6281a20000 lib /boot/system/lib/libicudata.so.57.1
142174 0x666cef4000 0x666cf35000 0x666d134000 0x666d13d000 lib /boot/system/lib/libnetwork.so
142173 0x7b2fc72000 0x7b2ff86000 0x7b30185000 0x7b301b3000 lib /boot/system/lib/libbe.so
142178 0xb96dcd2000 0xb96df4f000 0xb96e14e000 0xb96e163000 lib /boot/system/lib/libicui18n.so.57.1
142184 0x103e0a36000 0x103e0a52000 0x103e0c51000 0x103e0c52000 lib /boot/system/lib/libz.so.1.2.11
142171 0x103e7535000 0x103e7556000 0x103e7755000 0x103e7757000 lib /boot/system/runtime_loader
142190 0x124bf64d000 0x124bf65e000 0x124bf85e000 0x124bf85f000 lib /boot/system/lib/libroot-addon-icu.so
142181 0x1265d528000 0x1265d533000 0x1265d733000 0x1265d734000 lib /boot/system/lib/libiculx.so.57.1
142185 0x1369c352000 0x1369c41b000 0x1369c61a000 0x1369c61b000 lib /boot/system/lib/libzstd.so.1.4.4
142180 0x15266bd1000 0x15266c26000 0x15266e26000 0x15266e29000 lib /boot/system/lib/libicule.so.57.1
142183 0x15cdee2a000 0x15cdefc2000 0x15cdf1c1000 0x15cdf1d6000 lib /boot/system/lib/libicuuc.so.57.1
142182 0x168a89b4000 0x168a89e3000 0x168a8be3000 0x168a8c17000 lib /boot/system/lib/libicutu.so.57.1
142179 0x1726474a000 0x17264756000 0x17264955000 0x17264957000 lib /boot/system/lib/libicuio.so.57.1
142176 0x174625ae000 0x17462710000 0x17462910000 0x17462924000 lib /boot/system/lib/libstdc++.so.6.0.25
142175 0x18edeb46000 0x18edeca4000 0x18edeea3000 0x18edeef6000 lib /boot/system/lib/libroot.so
142186 0x1981b347000 0x1981b35d000 0x1981b55c000 0x1981b55d000 lib /boot/system/lib/libgcc_s.so.1
142172 0x21af4088000 0x21af40c4000 0x21af42c3000 0x21af42ce000 app /boot/home/Repository/sbcl/src/runtime/sbcl
142170 0x7ff99212c000 0x7ff992134000 0x00000000 0x00000000 system commpage

ID Base End Size (KiB) Protection Locking Name
422512 0x00100000 0x00101000 4 rwx full sbcl mmap area
422511 0x00101000 0x00102000 4 rwx full sbcl mmap area
422513 0x00102000 0x00103000 4 rwx full sbcl mmap area
422514 0x00103000 0x00104000 4 rwx full sbcl mmap area
422510 0x00104000 0x00105000 4 rwx full sbcl mmap area
422516 0x00105000 0x00106000 4 rwx full sbcl mmap area
422517 0x00106000 0x00107000 4 rwx full sbcl mmap area
422515 0x00107000 0x00108000 4 rwx full sbcl mmap area
422533 0x00108000 0x00109000 4 rwx full sbcl mmap area
422532 0x0010e000 0x0010f000 4 rwx full sbcl mmap area
422509 0x00110000 0x005a3000 4684 rwx full sbcl mmap area
422506 0x00699000 0x0069b000 8 rwx full sbcl mmap area
422501 0x00998000 0x009a0000 32 rwx full sbcl mmap area
422492 0x00e01000 0x00e19000 96 rw- full rld heap
422491 0x014cb000 0x014e3000 96 rw- full rld heap
422490 0x04682000 0x04692000 64 rw- full rld heap
422489 0x06708000 0x06718000 64 rw- full rld heap
422502 0x20000000 0x20008000 32 rwx full sbcl mmap area
422498 0x20008000 0x20100000 992 rwx full sbcl mmap area
422503 0x20100000 0x20108000 32 rwx full sbcl mmap area
422499 0x20108000 0x20200000 992 rwx full sbcl mmap area
422500 0x20200000 0x20300000 1024 rwx full sbcl mmap area
422488 0x6d2495000 0x6d249d000 32 rw- full rld heap
422486 0xbb75c3000 0xbb75ca000 28 r-x full libbsd.so_seg0ro
422487 0xbb77c9000 0xbb77ca000 4 rw- full libbsd.so_seg1rw
422505 0x1000000000 0x10023e8000 36768 rwx full sbcl mmap area
422504 0x10023e8000 0x10028d0000 5024 rwx full sbcl mmap area
422519 0x10028d0000 0x1003298000 10016 rwx full sbcl mmap area
422518 0x1003298000 0x10032a0000 32 rwx full sbcl mmap area
422521 0x10032a0000 0x1003340000 640 rwx full sbcl mmap area
422520 0x1003340000 0x1003348000 32 rwx full sbcl mmap area
422523 0x1003348000 0x1003440000 992 rwx full sbcl mmap area
422522 0x1003440000 0x1003448000 32 rwx full sbcl mmap area
422525 0x1003448000 0x10084b0000 82336 rwx full sbcl mmap area
422524 0x10084b0000 0x10084b8000 32 rwx full sbcl mmap area
422527 0x10084b8000 0x10099d8000 21632 rwx full sbcl mmap area
422526 0x10099d8000 0x10099e8000 64 rwx full sbcl mmap area
422529 0x10099e8000 0x1009a48000 384 rwx full sbcl mmap area
422528 0x1009a48000 0x1009a50000 32 rwx full sbcl mmap area
422531 0x1009a50000 0x1009e58000 4128 rwx full sbcl mmap area
422530 0x1009e58000 0x1040000000 886432 rwx full sbcl mmap area
422450 0x14fee55000 0x14fee56000 4 rw-S, u:(0x100) full rld_debug
422449 0x2f43db1000 0x2f43dc1000 64 rw- full rld heap
422465 0x627ffa2000 0x6281820000 25080 r-x full libicudata.so.57.1_seg0ro
422466 0x6281a1f000 0x6281a20000 4 rw- full libicudata.so.57.1_seg1rw
422456 0x666cef4000 0x666cf35000 260 r-x full libnetwork.so_seg0ro
422457 0x666d134000 0x666d137000 12 rw- full libnetwork.so_seg1rw
422458 0x666d137000 0x666d13d000 24 rw- full libnetwork.so_seg2rw
422493 0x673f261000 0x673f331000 832 rw-, u:(0x100) full heap
422454 0x7b2fc72000 0x7b2ff86000 3152 r-x full libbe.so_seg0ro
422455 0x7b30185000 0x7b301b3000 184 rw- full libbe.so_seg1rw
422467 0xb96dcd2000 0xb96df4f000 2548 r-x full libicui18n.so.57.1_seg0ro
422468 0xb96e14e000 0xb96e163000 84 rw- full libicui18n.so.57.1_seg1rw
422480 0x103e0a36000 0x103e0a52000 112 r-x full libz.so.1.2.11_seg0ro
422481 0x103e0c51000 0x103e0c52000 4 rw- full libz.so.1.2.11_seg1rw
422447 0x103e7535000 0x103e7556000 132 r-x full runtime_loader_seg0ro
422448 0x103e7755000 0x103e7757000 8 rw- full runtime_loader_seg1rw
422507 0x124bf64d000 0x124bf65e000 68 r-x full libroot-addon-icu.so_seg0ro
422508 0x124bf85e000 0x124bf85f000 4 rw- full libroot-addon-icu.so_seg1rw
422473 0x1265d528000 0x1265d533000 44 r-x full libiculx.so.57.1_seg0ro
422474 0x1265d733000 0x1265d734000 4 rw- full libiculx.so.57.1_seg1rw
422482 0x1369c352000 0x1369c41b000 804 r-x full libzstd.so.1.4.4_seg0ro
422483 0x1369c61a000 0x1369c61b000 4 rw- full libzstd.so.1.4.4_seg1rw
422471 0x15266bd1000 0x15266c26000 340 r-x full libicule.so.57.1_seg0ro
422472 0x15266e26000 0x15266e29000 12 rw- full libicule.so.57.1_seg1rw
422478 0x15cdee2a000 0x15cdefc2000 1632 r-x full libicuuc.so.57.1_seg0ro
422479 0x15cdf1c1000 0x15cdf1d6000 84 rw- full libicuuc.so.57.1_seg1rw
422475 0x168a89b4000 0x168a89e3000 188 r-x full libicutu.so.57.1_seg0ro
422476 0x168a8be3000 0x168a8be5000 8 rw- full libicutu.so.57.1_seg1rw
422477 0x168a8be5000 0x168a8c17000 200 rw- full libicutu.so.57.1_seg2rw
422469 0x1726474a000 0x17264756000 48 r-x full libicuio.so.57.1_seg0ro
422470 0x17264955000 0x17264957000 8 rw- full libicuio.so.57.1_seg1rw
422462 0x174625ae000 0x17462710000 1416 r-x full libstdc++.so.6.0.25_seg0ro
422463 0x17462910000 0x1746291c000 48 rw- full libstdc++.so.6.0.25_seg1rw
422464 0x1746291c000 0x17462924000 32 rw- full libstdc++.so.6.0.25_seg2rw
422459 0x18edeb46000 0x18edeca4000 1400 r-x full libroot.so_seg0ro
422460 0x18edeea3000 0x18edeeb2000 60 rw- full libroot.so_seg1rw
422461 0x18edeeb2000 0x18edeef6000 272 rw- full libroot.so_seg2rw
422484 0x1981b347000 0x1981b35d000 88 r-x full libgcc_s.so.1_seg0ro
422485 0x1981b55c000 0x1981b55d000 4 rw- full libgcc_s.so.1_seg1rw
422451 0x21af4088000 0x21af40c4000 240 r-x full sbcl_seg0ro
422452 0x21af42c3000 0x21af42c7000 16 rw- full sbcl_seg1rw
422453 0x21af42c7000 0x21af42ce000 28 rw- full sbcl_seg2rw
422445 0x7fbdf41e7000 0x7fbdf51ed000 16408 rw-s full sbcl_14167_stack
422444 0x7fd7bdb87000 0x7fd7bdb8b000 16 rw- full user area
422446 0x7ff99212c000 0x7ff992134000 32 r-xS full commpage

Protection Flags: r - read, w - write, x - execute, s - stack, o - overcommit, c - cloneable, S - shared, k - kernel

ID Count Last Holder Name
422761 0 12684 some BBlockCache lock
422763 0 12684 token space
422810 0 9819 Catalog
422812 0 -2752 some BLocker
422815 0 5859 LocaleRosterData
422821 0 -2752 BLooperList lock
422822 0 2752 some BLocker
422823 0 -2752 AppServerLink_sLock
422824 0 -2752 some BLocker

I’m no SBCL expert but it looks like it is failing once it attempts to acutally run itself… or at least an early bootstrap of itself.

Read here there are alot of options you can try

Try setting the --dynamic-space-size=1Gb … it may be defaulting to 4GB which is probably too big for 32bit Haiku and immediately crashing. Looks like it is suppoesd to default to 512Mb but who knows if it figured it out properly on Haiku. The memsize options in the debug output definitely look wrong to me. I’d be curious what it changes to if you change the build options…

Forget to mention, this error happens on the very beginning of the stage 2 of compilation of SBCL when the bootstrap image is already compiled with ABCL and the SBCL is tried to be compiled with fresh bootstrap. It successfully compiles 1 or 2 files and than crashes with this error.

Thanks for a hint. I didn’t played with all the options. However this is mostly blind hunting.

Recently SBCL on Haiku had a nice progress and reached a new milestone: we have a (sort of) ported SBCL on Haiku! The project state is as following:

  • The executable sbcl and the core image are produced and can be used for almost any training like exercise. This is compliant with Common Lisp, the Language 2nd ed (CLtL2) - all cltl2 test cases are passed;
  • Many of contrib libraries, which are outside of CLtL2 standard, but are common today, are compiled and their tests pass nicely.

However, there are still some important limitations for which a public release is still too early:

  • It seems the executable doesn’t support threading. This is either due to incapability to (properly) link with pthreads library, or is too instabile and manually disabled in *features*. This particularly means there is no possibility to use SBCL with SLIME yet;
  • sb-bsd-sockets does not compile, so no possibility to use quicklisp package repository;
  • Overall instability. I tried to bootstrap SBCL with itself (rather crazy idea at this stage) and had a kernel panic with no meaningful information and the system froze, so no trace could be retrieved and the filesystem became corrupt.

Currently SBCL can be bootstrapped with ABCL 1.5.0 running atop any OpenJDK. The latest ABCL 1.6.0 is not sutable for this, but the issue is already solved in ABCL trunk and will be available in ABCL 1.6.1.

I would like to thank the following people who make this progress possible:

  • Douglas Katzman, a SBCL developer who actually did and committed all the porting and bug fixing;
  • @waddlesplash and @Barrett, who react promptly on questions in mailing lists and bug reports;
  • Mark Evenson from ABCL, who pointed to ABCL fix bootstrapping SBCL;
  • @Sabex, who is sufficiently motivated to reproduce the bugs and reports them to SBCL and Haiku as well as conducts discussions with involved people.

Yes, I replied to your ticket and asked you to run a command at the KDL prompt and take a new screenshot, if you can reproduce it, so we can fix this.

This KDL is different from what is reported in #15781. I cannot reproduce KDL during compilation of SBCL via ABCL and I asked Douglas from SBCL to provide this information (https://sourceforge.net/p/sbcl/mailman/message/36943097/).

My KDL only displayed a generic welcome message with no specific information, with prompt and no possibility to introduce any command in it, meaning no reaction on any key press.

Hey all! This is great news. I’m away on business hence being so quiet. This is a great leap forward.

Try using a PS/2 keyboard (or try to reproduce in a VM which has a virtual one); if you are using a USB keyboard they are kind of hit-and-miss in KDL.

For now I test with real hardware on iMac with no PS/2 port. The SBCL port needs to mature before it can be declared self hosting on Haiku. After that, if I will reproduce this KDL, I will open a ticket for it with relevant information.

Any updates on the progress?

The progress still the last achievement is quite small:

  • ABCL 1.6.1 was released, which again can be used to bootstrap SBCL (previous release 1.6.0 has a regression in this respect)
  • ECL 20.04.24 was released. I still cannot build it under Haiku
  • SBCL 2.0.4 has some regression sensible to Haiku, I reported it and it is already fixed in trunk

Other than that, SBCL has 4 contrib libraries which cannot be compiled or some their tests fail. All them contain OS specific code. They are:

  • sb-bsd-sockets
  • sb-posix
  • sb-simple-streams
  • sb-sproof

I started with sb-posix and eliminated some compilation warnings mostly by commenting out the code that produces them. I cannot be sure this solves the problems, so until whole library is in a working state I cannot say more.

Unfortunately, I have limited free time to dedicate to SBCL. This is even more challenging because I push my effort to prepare the next release of my GeomSpace project whose last release was about 3 years ago.


i know this topic is rather dated but it seemed like the appropriate place to post an update on sbcl for Haiku. i have made progress in getting a port of sbcl that runs on Haiku and seems quite functional so far. screenshot of progress so far running version included:



Hi @hoanga , welcome to Haiku and congratulations for your effort!

The core porting was initially done by Douglas Katzman from SBCL team with very little input from my side. The sbcl executable compiles and sbcl.core is generated successfully, so it can be started. However, it is (actually, was, as I didn’t touch it for some time) unstable at times and the contrib packages need more love.

May I ask which lisp do you use to bootstrap sbcl? Do you have serious plans to work on the port until it matures? Do you upstream your patches? I would love to see sbcl packaged with Haiku.

hi @alpopa! thank you for the encouragement. most of the effort was from all of the previous efforts including yourself (thanks everyone!) that came before that allowed me to add a few patches to move it onward :slight_smile:

for the bootstrap, i used armed bear (which there is a port available in haikuports) to bootstrap the build. it does take some time to bootstrap the build from abcl but with some patches it is quite functional (packages from quick lisp can be loaded in with this port). i have submitted a draft pr link here to haikuports that should include everything needed to build out a haiku package. if time allows, i would like to put some more effort into getting some of the patches that i have into upstream. the patches i have put in are able to get the contrib libraries that were reported earlier to be in a more functional state. the one contrib library that might need more attention is sb-sproof (it is currently disabled in the port submitted). i am open to suggestions if the approaches taken in the patches work well enough for haiku as a starting point. i think getting an initial haiku package for sbcl earlier would be beneficial as that version could then be used to further bootstrap newer versions of itself. from what i can tell so far bootstrapping sbcl from sbcl is a bit quicker than bootstrapping from abcl.

if there’s interest, i can try to make an an interim haiku package available for anyone to kick the tires of the port


Thank you very much, @hoanga .

My intention was to open tickets to Haiku / SBCL when necessary so making the port as native as possible. I see your approach is first to make SBCL self containing in Haiku and then to add the features to it. Of course, it also works.

You already did more work than me. I am currently out of business due to personal situation, so go ahead! I just can confirm that both Haiku and SBCL teams are very welcoming and happily accept contributions.