default arguments to sbcl, again

20 views
Skip to first unread message

Qian Yun

unread,
Apr 12, 2024, 6:25:30 AM4/12/24
to fricas-devel
We have discussed this before, namely the default dynamic-space-size
is not enough during build.

Recently there is a github issue hitting by this on freebsd.

I get hit by this issue a few times as well, because the default
"./configure" no longer works and sometimes I forget to use
'./configure --with-lisp="sbcl --dynamic-space-size 2048"'.

I believe current situation is not friendly for new users,
(and it's not documented explicitly in INSTALL), and cumbersome
for developers.

We should make "./configure" work by default.

I think the following is a good solution:

1. Check the dynamic-space-size of the given SBCL.
2. If it is not enough, we append a proper argument to it.

This has the advantage that the user can still specify a
larger dynamic-space-size and will not be overwritten by
our default value, which was the old plan in previous discussion.



Also from the freebsd bug report [1], shall we use
"--disable-ldb --disable-debugger" by default as well?


[1] https://github.com/fricas/fricas/issues/161

- Qian

Waldek Hebisch

unread,
Apr 13, 2024, 9:31:58 AM4/13/24
to fricas...@googlegroups.com
On Fri, Apr 12, 2024 at 06:25:26PM +0800, Qian Yun wrote:
> We have discussed this before, namely the default dynamic-space-size
> is not enough during build.
>
> Recently there is a github issue hitting by this on freebsd.
>
> I get hit by this issue a few times as well, because the default
> "./configure" no longer works and sometimes I forget to use
> './configure --with-lisp="sbcl --dynamic-space-size 2048"'.
>
> I believe current situation is not friendly for new users,
> (and it's not documented explicitly in INSTALL), and cumbersome
> for developers.
>
> We should make "./configure" work by default.
>
> I think the following is a good solution:
>
> 1. Check the dynamic-space-size of the given SBCL.
> 2. If it is not enough, we append a proper argument to it.
>
> This has the advantage that the user can still specify a
> larger dynamic-space-size and will not be overwritten by
> our default value, which was the old plan in previous discussion.

Yes, it would be good if you can do this.

> Also from the freebsd bug report [1], shall we use
> "--disable-ldb --disable-debugger" by default as well?

"--disable-ldb" probably yes. "--disable-debugger" is somewhat
debatable. Namely, when debugging build problems in typical cases
most work is to get debugger prompt. Once in debugger, many problems
can be easily diagnosed. Also, if you do "--disable-debugger"
at sbcl command line, can you enable it later in running image?
I hope so, just ask because I never used "--disable-debugger".

--
Waldek Hebisch

Qian Yun

unread,
Apr 13, 2024, 11:03:43 PM4/13/24
to fricas...@googlegroups.com
diff --git a/configure.ac b/configure.ac
index 073f3e96..0c66c8de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,6 +452,8 @@ case $fricas_lisp_flavor in
sbcl)
fricas_quiet_flags='--noinform --noprint --no-sysinit
--no-userinit'
fricas_eval_flags='--eval'
+ sbcl_memory_size=`echo "(princ (sb-ext:dynamic-space-size))" |
$fricas_lisp $fricas_quiet_flags`
+ test $sbcl_memory_size -gt 2147483647 ||
fricas_quiet_flags="--dynamic-space-size 2048 $fricas_quiet_flags"
;;
cmucl)
fricas_quiet_flags='-batch -nositeinit -noinit'


This should work.

BTW, I should update configure with which autoconf, 2.71?

Regarding "--disable-ldb --disable-debugger", they should not be
used when dumping lisp image, instead they can be used when batch
compiling lisp files.

- Qian

Waldek Hebisch

unread,
Apr 14, 2024, 12:31:14 PM4/14/24
to fricas...@googlegroups.com
On Sun, Apr 14, 2024 at 11:03:36AM +0800, Qian Yun wrote:
> diff --git a/configure.ac b/configure.ac
> index 073f3e96..0c66c8de 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -452,6 +452,8 @@ case $fricas_lisp_flavor in
> sbcl)
> fricas_quiet_flags='--noinform --noprint --no-sysinit --no-userinit'
> fricas_eval_flags='--eval'
> + sbcl_memory_size=`echo "(princ (sb-ext:dynamic-space-size))" |
> $fricas_lisp $fricas_quiet_flags`
> + test $sbcl_memory_size -gt 2147483647 ||
> fricas_quiet_flags="--dynamic-space-size 2048 $fricas_quiet_flags"
> ;;
> cmucl)
> fricas_quiet_flags='-batch -nositeinit -noinit'
>
>
> This should work.

AFAICS it does not work. Fails with defualt 2.4.3. RSIMP is
compiled by 'interpsys' and 'sb-ext:dynamic-space-size' is not
propagated to inteprsys.

> BTW, I should update configure with which autoconf, 2.71?

Next update to configure should be with autoconf 2.71.

> Regarding "--disable-ldb --disable-debugger", they should not be
> used when dumping lisp image, instead they can be used when batch
> compiling lisp files.

OK, that is reasonable.

--
Waldek Hebisch

Waldek Hebisch

unread,
Apr 14, 2024, 1:50:05 PM4/14/24
to fricas...@googlegroups.com
On Sun, Apr 14, 2024 at 06:31:11PM +0200, Waldek Hebisch wrote:
> On Sun, Apr 14, 2024 at 11:03:36AM +0800, Qian Yun wrote:
> > diff --git a/configure.ac b/configure.ac
> > index 073f3e96..0c66c8de 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -452,6 +452,8 @@ case $fricas_lisp_flavor in
> > sbcl)
> > fricas_quiet_flags='--noinform --noprint --no-sysinit --no-userinit'
> > fricas_eval_flags='--eval'
> > + sbcl_memory_size=`echo "(princ (sb-ext:dynamic-space-size))" |
> > $fricas_lisp $fricas_quiet_flags`
> > + test $sbcl_memory_size -gt 2147483647 ||
> > fricas_quiet_flags="--dynamic-space-size 2048 $fricas_quiet_flags"
> > ;;
> > cmucl)
> > fricas_quiet_flags='-batch -nositeinit -noinit'
> >
> >
> > This should work.
>
> AFAICS it does not work. Fails with defualt 2.4.3. RSIMP is
> compiled by 'interpsys' and 'sb-ext:dynamic-space-size' is not
> propagated to inteprsys.

Oops, it seems that dynamic space size size is propagated, but
that 2Gb is not enough for sbcl-2.4.3 with current trunk.

--
Waldek Hebisch

Waldek Hebisch

unread,
Apr 14, 2024, 2:36:42 PM4/14/24
to fricas...@googlegroups.com
Using 3G (that is increasing number in your patch) works.

>
> --
> Waldek Hebisch
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZhwXSsLnufSUbO7U%40fricas.org.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages