Bug#1033731: sbcl: support bootstrap on riscv64

2023-04-05 Thread John Paul Adrian Glaubitz
Hi!

On Wed, 2023-04-05 at 16:29 +0800, Bo YU wrote:
> Oops.
> Could you try the package?
> https://drive.google.com/file/d/1BqVpACiiXHM2pc5h1HzqqxWQugv4PGwN/view?usp=share_link
> Or attachment file.
> 
> It should work on my Unmatched board:
> 
> ```
> rv@unmatched:~$ sbcl
> This is SBCL 2.2.2.debian, an implementation of ANSI Common Lisp.
> More information about SBCL is available at .
> 
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses.  See the CREDITS and COPYING files in the
> distribution for more information.
> * (defun hello ()
>(format t "Hello, World!~%"))
> HELLO
> * (exit)
> rv@unmatched:~$ uname -a
> Linux unmatched 6.1.0-6-riscv64 #1 SMP Debian 6.1.15-1 (2023-03-05)
> riscv64 GNU/Linux
> ```
> It still was 2.2.2. No luckly for 2.2.9.:(

Same result with this package, unfortunately:

root@neutron:/# sbcl
This is SBCL 2.2.2.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at .

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
Segmentation fault (core dumped)
root@neutron:/#

This also explains why sbcl still doesn't build on the buildds.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#1033731: sbcl: support bootstrap on riscv64

2023-04-05 Thread John Paul Adrian Glaubitz
Hi!

On Fri, 2023-03-31 at 20:57 +0800, Bo YU wrote:
> Oh. It seems the 2.2.9 can be built with the sbcl(2.2.2-1) riscv64 package.
> But, very odd:

I just gave it a try. Your 2.2.2 binary doesn't work on my StarFive Beagle-V:

root@neutron:~/sbcl/sbcl-2.2.9# sbcl
This is SBCL 2.2.2.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at .

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
Segmentation fault (core dumped)
root@neutron:~/sbcl/sbcl-2.2.9#

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#1033731: sbcl: support bootstrap on riscv64

2023-03-31 Thread Bo YU
Hi!

On Fri, Mar 31, 2023 at 6:00 PM John Paul Adrian Glaubitz
 wrote:
>
> Hello!
>
> On Fri, 2023-03-31 at 17:16 +0800, Bo YU wrote:
> > Sorry, the folder is wrong. The right folder is here:
> > https://drive.google.com/drive/folders/1c6AFD_EgGwXTbAiC_-1al6Gb_wBpfMpr
> What about 2.2.9? Has the bug not been fixed since 2.2.3?
Oh. It seems the 2.2.9 can be built with the sbcl(2.2.2-1) riscv64 package.
But, very odd:
```
...
SBCL has been installed:
 binary /<>/stage1/bin/sbcl
 core and contribs in /<>/stage1/lib/sbcl/

Documentation:
 man /<>/stage1/share/man/man1/sbcl.1
chmod 100 stage1 # Make stage 1 unreadable (only executable), to avoid
messing with the stage 2
./clean.sh
make[2]: Entering directory '/<>/tools-for-build'
make[2]: Leaving directory '/<>/tools-for-build'
make[2]: Entering directory '/<>/doc/manual'
rm -f *~ *.bak *.orig \#*\# .\#* texput.log *.fasl
rm -rf sbcl asdf "docstrings/"
rm -f  sbcl.html asdf.html
rm -f contrib-docs.texi-temp
rm -f package-locks.texi-temp
rm -f variables.texinfo
rm -f sbcl.ps asdf.ps sbcl.pdf asdf.pdf html-stamp tempfiles-stamp
rm -f asdf.aux asdf.cp asdf.cps asdf.fn asdf.fns asdf.ky asdf.log
asdf.pg asdf.toc asdf.tp asdf.tps asdf.vr asdf.vrs sbcl.aux sbcl.cp
sbcl.cps sbcl.fn sbcl.fns sbcl.ky sbcl.log sbcl.pg sbcl.toc sbcl.tp
sbcl.tps sbcl.vr sbcl.vrs
rm -f sbcl.info sbcl.info-* asdf.info
make[2]: Leaving directory '/<>/doc/manual'
make[2]: Entering directory '/<>/doc/internals'
rm -rf *.include *.info *.pdf *~ *.cp *.fn *.ky *.log *.pg *.toc \
*.tp *.vr *.aux *.eps *.png *.dvi *.ps *.txt *.fns \
html-stamp sbcl-internals/
make[2]: Leaving directory '/<>/doc/internals'
# Create stage 2
./make.sh --xc-host="/<>/stage1/bin/sbcl
--disable-debugger --no-sysinit --no-userinit" --prefix=/usr --fancy
make-config.sh: 237: /<>/stage1/bin/sbcl: not found
No working host Common Lisp implementation.
See ./INSTALL, the "SOURCE DISTRIBUTION" section
make[1]: *** [debian/rules:58: override_dh_auto_build] Error 1
make[1]: Leaving directory '/<>'
make: *** [debian/rules:45: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

Build finished at 2023-03-31T12:36:02Z

Finished



+--+
| Cleanup  |
+--+

Purging /<>
Not cleaning session: cloned chroot in use
E: Build failure (dpkg-buildpackage died)

+--+
| Summary  |
+--+

Build Architecture: riscv64
Build Type: binary
Build-Space: 45904
Build-Time: 2247
Distribution: UNRELEASED
Fail-Stage: build
Host Architecture: riscv64
Install-Time: 559
Job: /home/rv/build/sbcl/2.2.9/sbcl_2.2.9-1.1.dsc
Machine Architecture: riscv64
Package: sbcl
Package-Time: 2908
Source-Version: 2:2.2.9-1.1
Space: 45904
Status: attempted
Version: 2:2.2.9-1.1

```
Nothing change other than B-D and ifeq.

BR,
Bo



Bug#1033731: sbcl: support bootstrap on riscv64

2023-03-31 Thread John Paul Adrian Glaubitz
Hello!

On Fri, 2023-03-31 at 17:16 +0800, Bo YU wrote:
> Sorry, the folder is wrong. The right folder is here:
> https://drive.google.com/drive/folders/1c6AFD_EgGwXTbAiC_-1al6Gb_wBpfMpr

Thanks.

> > 
> > Did you build in a clean environment, i.e. using sbuild?
> Yeah, I used sbuild(with --extra-package options) to build it.
> I will gradually upgrade to 2.2.3(revert the commit) to see if this
> problem still exists.

What about 2.2.9? Has the bug not been fixed since 2.2.3?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#1033731: sbcl: support bootstrap on riscv64

2023-03-31 Thread Bo YU
Hi,

On Fri, Mar 31, 2023 at 5:01 PM John Paul Adrian Glaubitz
 wrote:
>
> Hello Bo!
>
> On Fri, 2023-03-31 at 16:53 +0800, Bo YU wrote:
> > The sbcl can be bootstraped on Debian riscv64 now.
> > A riscv64 sbcl package is available here:
> > https://drive.google.com/drive/folders/1wCCV6Ke0YMCrgGwKF4rjTTlEz8wr4Piq?usp=share_link
>
> The folder is empty.
Sorry, the folder is wrong. The right folder is here:
https://drive.google.com/drive/folders/1c6AFD_EgGwXTbAiC_-1al6Gb_wBpfMpr

>
> > Please note it is 2.2.2 from upstream to be bootstrapped. At first
> > I hope it can reduce bootstrap pain on Debian r iscv64. And
> > I will also keep an eye on upstream changes and update here.
> > BTW, I have to modify the d/rules file to fix the issue that reported
> > cannot find `stage1/bin/sbcl` issue. It seems the file was cleared by
> > `./clean.sh` even with `chmod 100 stage 1`
>
> Did you build in a clean environment, i.e. using sbuild?
Yeah, I used sbuild(with --extra-package options) to build it.
I will gradually upgrade to 2.2.3(revert the commit) to see if this
problem still exists.

BR,
Bo



Bug#1033731: sbcl: support bootstrap on riscv64

2023-03-31 Thread John Paul Adrian Glaubitz
Hello Bo!

On Fri, 2023-03-31 at 16:53 +0800, Bo YU wrote:
> The sbcl can be bootstraped on Debian riscv64 now.
> A riscv64 sbcl package is available here:
> https://drive.google.com/drive/folders/1wCCV6Ke0YMCrgGwKF4rjTTlEz8wr4Piq?usp=share_link

The folder is empty.

> Please note it is 2.2.2 from upstream to be bootstrapped. At first
> used 2.3.2, but due to one commit[0] was introduced after 2.2.3:
> was failed to bootstrap it after many attempts
> There are many issues 0n Debian using ecl to bootstrap it also.
> > So with help of Christoph[1], I first built sbcl in a cross build
> way then patched the binary file into sbcl package which can be
> bootstrapped itself at last.

Well, Debian is using clisp for bootstrapping sbcl but that still doesn't
work for sbcl, see:

> https://buildd.debian.org/status/logs.php?pkg=sbcl=riscv64

> I hope it can reduce bootstrap pain on Debian r iscv64. And
> I will also keep an eye on upstream changes and update here.
> BTW, I have to modify the d/rules file to fix the issue that reported
> cannot find `stage1/bin/sbcl` issue. It seems the file was cleared by
> `./clean.sh` even with `chmod 100 stage 1`

Did you build in a clean environment, i.e. using sbuild?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#1033731: sbcl: support bootstrap on riscv64

2023-03-31 Thread Bo YU
Source: sbcl
Version: 2:2.2.9- 1
Severity: minor
Tags: ftbfs
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-ri...@lists.debian.org

Dear Maintainer ,

The sbcl can be bootstraped on Debian riscv64 now.
A riscv64 sbcl package is available here:
https://drive.google.com/drive/folders/1wCCV6Ke0YMCrgGwKF4rjTTlEz8wr4Piq?usp=share_link

Please note it is 2.2.2 from upstream to be bootstrapped. At first
used 2.3.2, but due to one commit[0] was introduced after 2.2.3:
was failed to bootstrap it after many attempts
There are many issues 0n Debian using ecl to bootstrap it also.
| So with help of Christoph[1], I first built sbcl in a cross build
way then patched the binary file into sbcl package which can be
bootstrapped itself at last.

I hope it can reduce bootstrap pain on Debian r iscv64. And
I will also keep an eye on upstream changes and update here.
BTW, I have to modify the d/rules file to fix the issue that reported
cannot find `stage1/bin/sbcl` issue. It seems the file was cleared by
`./clean.sh` even with `chmod 100 stage 1`

[0]: https://bugs.launchpad.net/sbcl/+bug/2002930
[1]: https://lists.debian.org/debian-common-lisp/2023/03/msg5.html

BR,
Bo