problems with installing FriCAS 1.3.10 on MacOS with ECL

86 views
Skip to first unread message

Martin R

unread,
Feb 12, 2024, 10:02:39 AM2/12/24
to FriCAS - computer algebra system

Apparently, this is using ecl (using the standard SageMath setup).
Unfortunately, I cannot help except for reporting, because I do not have access to a  mac.

It would be wonderful if you could help!  Best wishes,

Martin

----message by Dima ----

at the moment, with a recent bunch of macOS tools on M1, fricas in Sage just doesn't build:

;;; Style warning:
;;;   in file define.clisp, position 165810
;;;   at (DEFUN DomainSubstitutionFunction,Subst ...)
;;;   ! Variable $extraParms was undefined. Compiler assumes it is a global.thread_suspend failed

;;; Internal error:
;;;   ** Error code 6 when executing
;;; (EXT:RUN-PROGRAM "clang" ("-I." "-I/opt/homebrew/Cellar/ecl/23.9.9/include/" "-I/opt/homebrew/opt/gmp/include" "-I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/include" "-I/opt/homebrew/opt/bdw-gc/include" "-g" "-O2" "-fPIC" "-fno-common" "-D_THREAD_SAFE" "-Ddarwin" "-O2" "-c" "define.c" "-o" "define.o")):
;;; make[5]: *** [define.o] Error 1
make[4]: *** [all-interpsys] Error 2
make[3]: *** [all-src] Error 2
********************************************************************************
Error building fricas-1.3.10

Waldek Hebisch

unread,
Feb 12, 2024, 1:40:54 PM2/12/24
to 'Martin R' via FriCAS - computer algebra system
On Mon, Feb 12, 2024 at 07:02:39AM -0800, 'Martin R' via FriCAS - computer algebra system wrote:
> Dima reports the following on
> https://github.com/sagemath/sage/pull/37041#issuecomment-1938698041
>
> Apparently, this is using ecl (using the standard SageMath setup).
> Unfortunately, I cannot help except for reporting, because I do not have
> access to a mac.
>
> It would be wonderful if you could help! Best wishes,
>
> Martin
>
> ----message by Dima ----
>
> at the moment, with a recent bunch of macOS tools on M1, fricas in Sage
> just doesn't build:
> ;;; Style warning:
> ;;; in file define.clisp, position 165810
> ;;; at (DEFUN DomainSubstitutionFunction,Subst ...)
> ;;; ! Variable $extraParms was undefined. Compiler assumes it is a
> global.thread_suspend failed
^^^^^^^^^^^^^^^^^^^^^

This message is printed by function 'GC_stop_world' in
'src/bdwgc/darwin_stop_world.c' in ECL sources. That is clearly
internal thing to ECL and ECL folks (or maybe whoever is maintaining
Boehm-Demers-Weiser garbage collector) are right people to ask.

>
> ;;; Internal error:
> ;;; ** Error code 6 when executing
> ;;; (EXT:RUN-PROGRAM "clang" ("-I."
> "-I/opt/homebrew/Cellar/ecl/23.9.9/include/"
> "-I/opt/homebrew/opt/gmp/include"
> "-I/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/include"
> "-I/opt/homebrew/opt/bdw-gc/include" "-g" "-O2" "-fPIC" "-fno-common"
> "-D_THREAD_SAFE" "-Ddarwin" "-O2" "-c" "define.c" "-o" "define.o")):

Again, this looks like error message from ECL.

> ;;; make[5]: *** [define.o] Error 1
> make[4]: *** [all-interpsys] Error 2
> make[3]: *** [all-src] Error 2
> ********************************************************************************
> Error building fricas-1.3.10

This looks like ECL problem. Of course, it is possible that
something is not kosher in FriCAS code and this causes failure.
But ATM the only lead is to ECL internals. I affraid that the
best I could in principle do is to find smaller testcase than whole
FriCAS sources. But event that is not possible without a way
to reproduce the problem.

Anyway, smaller testcase should be possible using script for
build from Lisp files (posted by Qian) and .lisp/.clisp files
from build say on x86_64. If this is problem with garbage
collector (as it looks), then it is likely that to reproduce
it one must load exactly the same things into running Lisp image.
But basically, one has to try, either result would give extra
info. It is possible that merely recompiling 'define.clisp'
in appropriate environment is already enough to trigger the
problem. But without access to failing build environment
it is pure speculation...

--
Waldek Hebisch

Dima Pasechnik

unread,
Feb 12, 2024, 1:51:17 PM2/12/24
to fricas...@googlegroups.com
We can arrange ssh access to an M1 box.
Ping me (and/or William Stein) if you like one.

--
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/ZcpmNKJb5IUy2Xrx%40fricas.org.

Qian Yun

unread,
Mar 2, 2024, 11:25:46 PM3/2/24
to fricas...@googlegroups.com
Any updates on this?

If not, I can continue the work with arm64 macOS runner on github CI.

It seems that indeed the build with ECL does not work out of box yet.
I'll dig deeper later.

I'm using ECL from homebrew. Are you using this version or ECL built
by Sage?

- Best,
- Qian

Martin R

unread,
Mar 3, 2024, 4:37:18 AM3/3/24
to FriCAS - computer algebra system
Thank you so much!

In the end, I think we need the version built by sage.  However, if that version is broken and another one works, I think that this can be arranged for.

I don't have a mac, my only interest is keeping the fricas-sage interface alive.


Best wishes,

Martin

Qian Yun

unread,
Mar 3, 2024, 4:59:36 AM3/3/24
to fricas...@googlegroups.com
Hi Dima,

For the build on ARM Macs, I uses ECL-23.9.9 from homebrew.

First time it fails at compiling EVALAB-.fas (same Error code 6).

Second time it builds successfully.

So can you try again to see if the failure is random?
(revert commit 5b7d3163 if you compile master branch.)

- Best,
- Qian

Waldek Hebisch

unread,
Mar 3, 2024, 6:20:00 AM3/3/24
to fricas...@googlegroups.com
On Sun, Mar 03, 2024 at 12:25:40PM +0800, Qian Yun wrote:
> Any updates on this?
>
> If not, I can continue the work with arm64 macOS runner on github CI.

I was busy with other things, so did not try offer of access to
M1 box.

--
Waldek Hebisch

Dima Pasechnik

unread,
Mar 3, 2024, 3:30:27 PM3/3/24
to fricas...@googlegroups.com
In case, I never tried building ECL on M1, I always used the Homebrew's version.

Qian Yun

unread,
Mar 3, 2024, 7:33:53 PM3/3/24
to fricas...@googlegroups.com
Hi,

Can you confirm that restarting the build fails at different
places?

In the mean time, I think this is the same upstream issue:

https://gitlab.com/embeddable-common-lisp/ecl/-/issues/718

It is a long thread, but I believe this is the fix:

https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/303

It should also help with https://github.com/sagemath/sage/issues/37511

- Best,
- Qian

Dima Pasechnik

unread,
Mar 4, 2024, 2:07:43 PM3/4/24
to fricas...@googlegroups.com
On Mon, Mar 4, 2024 at 12:33 AM Qian Yun <oldk...@gmail.com> wrote:
Hi,

Can you confirm that restarting the build fails at different
places?

In the mean time, I think this is the same upstream issue:

https://gitlab.com/embeddable-common-lisp/ecl/-/issues/718

It is a long thread, but I believe this is the fix:

https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/303

yes, I can confirm that I can build a seemingly working fricas with the latest ECL master branch,
which has this merge request merged.

I'll report more on this as I see tests.
 
--
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.

Qian Yun

unread,
Mar 18, 2024, 7:38:24 PM3/18/24
to fricas...@googlegroups.com
Hi,

Is there an update for this?

I'd like to see fricas-1.3.10 get included in sage-10.3 release.
(Also the ECL fix since ECL is already updated.)

Is that possible since it's already in RC stage?
(When will sage-10.3 be released BTW?)

- Qian

Dima Pasechnik

unread,
Mar 19, 2024, 7:18:06 AM3/19/24
to fricas...@googlegroups.com
On Mon, Mar 18, 2024 at 11:38 PM Qian Yun <oldk...@gmail.com> wrote:

Is there an update for this?

we have, hmm, large internal disturbances at @sagemath. Devs blocking each other on GitHub, devs quitting, etc etc. Takes a lot of time...
 

I'd like to see fricas-1.3.10 get included in sage-10.3 release.
(Also the ECL fix since ECL is already updated.)

 

Is that possible since it's already in RC stage?
(When will sage-10.3 be released BTW?)
quite soon, I think.
 

Qian Yun

unread,
Mar 19, 2024, 8:51:16 AM3/19/24
to fricas...@googlegroups.com


On 3/19/24 19:17, Dima Pasechnik wrote:
> On Mon, Mar 18, 2024 at 11:38 PM Qian Yun <oldk...@gmail.com> wrote:
>
>>
>> Is there an update for this?
>>
>
> we have, hmm, large internal disturbances at @sagemath. Devs blocking each
> other on GitHub, devs quitting, etc etc. Takes a lot of time...
>

Well, that's unfortunate. But for the technical side, do you
still have the FriCAS giving strange output in
https://github.com/sagemath/sage/pull/37041#issuecomment-1889097696

sage: x = fricas("x::TaylorSeries Fraction Integer")
sage: y = fricas("y::TaylorSeries Fraction Integer")
sage: 2*(1+2*x+sqrt(1-4*x)-2*x*y).recip()

2
----------------------------------------------
+-------------+
\|- 4 sage0 + 1 - 2 sage0 sage1 + 2 sage0 + 1


>>
>> I'd like to see fricas-1.3.10 get included in sage-10.3 release.
>> (Also the ECL fix since ECL is already updated.)
>>
>
> ECL update is pending. Have you tested
> https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/324
> ?

I have not test this RC version. What I meant is to add the patch
https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/303
to ecl-23.9.9 in sage.

>
>>
>> Is that possible since it's already in RC stage?
>> (When will sage-10.3 be released BTW?)
>>
> quite soon, I think.

While, I think it's OK to include fricas-1.3.10 in sage-10.4 as well.

- Best,
- Qian

Dima Pasechnik

unread,
Mar 19, 2024, 9:27:50 AM3/19/24
to fricas...@googlegroups.com
On Tue, Mar 19, 2024 at 12:51 PM Qian Yun <oldk...@gmail.com> wrote:


On 3/19/24 19:17, Dima Pasechnik wrote:
> On Mon, Mar 18, 2024 at 11:38 PM Qian Yun <oldk...@gmail.com> wrote:
>
>>
>> Is there an update for this?
>>
>
> we have, hmm, large internal disturbances at @sagemath. Devs blocking each
> other on GitHub, devs quitting, etc etc. Takes a lot of time...
>

Well, that's unfortunate.  But for the technical side, do you
still have the FriCAS giving strange output in
https://github.com/sagemath/sage/pull/37041#issuecomment-1889097696

sage: x = fricas("x::TaylorSeries Fraction Integer")
sage: y = fricas("y::TaylorSeries Fraction Integer")
sage: 2*(1+2*x+sqrt(1-4*x)-2*x*y).recip()

                        2
----------------------------------------------
  +-------------+
\|- 4 sage0 + 1  - 2 sage0 sage1 + 2 sage0 + 1


this and other weird errors reported there are now gone, just checked.

 
>>
>> I'd like to see fricas-1.3.10 get included in sage-10.3 release.
>> (Also the ECL fix since ECL is already updated.)
>>
>
> ECL update is pending. Have you tested
> https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/324
> ?

I have not test this RC version.  What I meant is to add the patch
https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/303
to ecl-23.9.9 in sage.

>
>>
>> Is that possible since it's already in RC stage?
>> (When will sage-10.3 be released BTW?)
>>
> quite soon, I think.

While, I think it's OK to include fricas-1.3.10 in sage-10.4 as well.

By right, FriCAS is better built with sbcl (at least until there is a faster interface,
via a compiled ECL module, like the one we have for Maxima).
But the overtly rigid Sage packaging system would then require sbcl become a Sage package too,
(at least if FriCAS becomes a standard package)
etc etc. These sorts of issues are a large part of the reasons for
disturbances I mentioned, people are tired of this (IMHO) nonsense).

Dima

Nasser M. Abbasi

unread,
Mar 20, 2024, 6:10:52 AM3/20/24
to FriCAS - computer algebra system
"(When will sage-10.3 be released BTW?)"

Fyi, 
Sage 10.3 has been released:

https://groups.google.com/g/sage-release/c/3D23f1_cU-k
Reply all
Reply to author
Forward
0 new messages