Commit "Allow parallel build after database bootstrap"

35 views
Skip to first unread message

Grégory Vanuxem

unread,
Aug 20, 2026, 11:21:13 PMAug 20
to fricas...@googlegroups.com
Hello Waldek,

I manually applied the commit in object to my copy of FriCAS, it's not applicable as it is since to CATDOMS make operations I added JULIACATDOMS, idem for CATLIST.  But after I was no longer able to compile this copy. I checked 5 times to see if it was a bad manual application but no in fact.

Is there some possibility that some specificities, category/domain order or something like that for example, prevent compilation? In other words, does it require some specificities in algebra? The compilation stuck on a category with several default definitions?

That is a big problem for me but I wonder. I am tired but really the manual apply was very simple.

Greg

Waldek Hebisch

unread,
Aug 20, 2026, 11:53:26 PMAug 20
to fricas...@googlegroups.com
On Fri, Aug 21, 2026 at 05:20:23AM +0200, Grégory Vanuxem wrote:
> Hello Waldek,
>
> I manually applied the commit in object to my copy of FriCAS, it's not
> applicable as it is since to CATDOMS make operations I added JULIACATDOMS,
> idem for CATLIST. But after I was no longer able to compile this copy. I
> checked 5 times to see if it was a bad manual application but no in fact.
>
> Is there some possibility that some specificities, category/domain order or
> something like that for example, prevent compilation? In other words, does
> it require some specificities in algebra? The compilation stuck on a
> category with several default definitions?

Database bootstrap (which corresponds to first stage of previous
bootstrap) makes some assumptions (basically that your types are
not too hairy), but they should be the same as before. And it
should be independent of order of domains. It is doing now a bit
more work (it now produces database entries for category defaults)
and it is possible that you found a latent bug.

After database bootstrap (and copying category .fasl-s to target
directory) you should be able to compile any constructor if you do
this like our Makefile-s do, that is pass ')noopt' option and set
DAASE to point to freshly created databases.

The second stage compiles all domains that may be loaded by FriCAS
inlining optimizations.

There is a change in second stage: there is now DOMLIST2, but that
should not affect you unless you want inline optimization for
your domains. And DOMLIST2 is matter of efficiency, if you set
it incorrectly inline optimization would be less effective, but
build should work.

You do not say which kind of error you get? What is in error
messages? And at what stage it is? Depending how far it went
you should see messages like 'doing stamp-db', 'doing stamp-oboo3'
and 'doing stamp-bootstrap'

If you get message about failed load, than most likely you need
to add a domain/category to appropriate list.

--
Waldek Hebisch

Waldek Hebisch

unread,
Aug 21, 2026, 7:51:49 AMAug 21
to fricas...@googlegroups.com
On Fri, Aug 21, 2026 at 05:20:23AM +0200, Grégory Vanuxem wrote:
>
> Is there some possibility that some specificities, category/domain order or
> something like that for example, prevent compilation? In other words, does
> it require some specificities in algebra? The compilation stuck on a
> category with several default definitions?

Thinking more, there is a change: previously build was more tolerant
to having incomplete list of constructors. 'komp_all.input' should
contain ')compile ...' line for each constructor. If you miss
a category there, then almost surely build will fail. Previously
you could get away with having a category in list used later,
but missing from 'komp_all.input'. But the intent always was
that 'komp_all.input' should be complete.

--
Waldek Hebisch

Grégory Vanuxem

unread,
Aug 21, 2026, 12:07:59 PMAug 21
to fricas...@googlegroups.com
Ok, I have the point, this is indeed as I guessed early this morning, for me, that is categories that have some default definitions and that break almost on each categories, for example:


(1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile JMTYPE.spad )noopt" | DAASE=./r7 FRICAS=/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu FRICAS_INITFILE= /home/greg/Tmp/jlfricas/build/x86_64-linux-gnu/bin/interpsys
Checking for foreign routines
FRICAS="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu"
spad-lib="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System
       Version: jlFriCAS 1.3.14-julia-dev built with SBCL 2.6.4.debian
                 Timestamp: ven. 21 août 2026 17:44:54 CEST
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

   Using local database ./r7/algebra/interp.daase..
   Re-reading interp.daase
   Using local database ./r7/algebra/operation.daase..
   Re-reading operation.daase
   Using local database ./r7/algebra/category.daase..
   Re-reading category.daase
   Using local database ./r7/algebra/browse.daase..
(1) ->
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |$tryRecompileArguments| NIL))
Value = NIL
(1) ->    Compiling FriCAS source code from file
      /home/greg/Tmp/jlfricas/src/algebra/JMTYPE.spad using system
      compiler.
   JMTYPE abbreviates category JLMachineType
------------------------------------------------------------------------
   initializing NRLIB JMTYPE for JLMachineType
   compiling into NRLIB JMTYPE

;;;     ***       |JLMachineType| REDEFINED
WARNING: redefining BOOT::|JLMachineType| in DEFUN
Time: 0 SEC.

   JMTYPE- abbreviates domain JLMachineType&
------------------------------------------------------------------------
   initializing NRLIB JMTYPE- for JLMachineType&
   compiling into NRLIB JMTYPE-
   compiling exported string : S -> String
      JMTYPE-;string;SS;1 is replaced by PRINC-TO-STRING
Time: 0 SEC.

(time taken in buildFunctor:  81)

;;;     ***       |JLMachineType&| REDEFINED
Time: 0 SEC.


   Cumulative Statistics for Constructor JLMachineType&
      Time: 0 seconds

   finalizing NRLIB JMTYPE-
   Processing JLMachineType& for Browser database:
--------constructor---------
; compiling file "/home/greg/Tmp/jlfricas/src/algebra/JMTYPE-.NRLIB/JMTYPE-.lsp" (written 21 AUG 2026 05:45:50 PM):

; file: /home/greg/Tmp/jlfricas/src/algebra/JMTYPE-.NRLIB/JMTYPE-.lsp
; in: SDEFUN |JMTYPE-;string;SS;1|
;     (BOOT::SDEFUN BOOT::|JMTYPE-;string;SS;1|
;                   ((BOOT::|x| (BOOT::S)) (BOOT::% (BOOT::|String|)))
;                   (PRINC-TO-STRING BOOT::|x|))
; --> PROGN SB-IMPL::%DEFUN SB-IMPL::%DEFUN SB-INT:NAMED-LAMBDA
; ==>
;   #'(SB-INT:NAMED-LAMBDA BOOT::|JMTYPE-;string;SS;1|
;         (BOOT::|x| BOOT::%)
;       (DECLARE (SB-C::TOP-LEVEL-FORM))
;       (BLOCK BOOT::|JMTYPE-;string;SS;1| (PRINC-TO-STRING BOOT::|x|)))
;
; caught STYLE-WARNING:
;   The variable % is defined but never used.
;
; compilation unit finished
;   caught 1 STYLE-WARNING condition


; wrote /home/greg/Tmp/jlfricas/src/algebra/JMTYPE-.NRLIB/JMTYPE-.fasl
; compilation finished in 0:00:00.004
------------------------------------------------------------------------
   JLMachineType& is now explicitly exposed in frame initial
   JLMachineType& will be automatically loaded when needed from
      /home/greg/Tmp/jlfricas/src/algebra/JMTYPE-.NRLIB/JMTYPE-
   finalizing NRLIB JMTYPE
   Processing JLMachineType for Browser database:
--------constructor---------
; compiling file "/home/greg/Tmp/jlfricas/src/algebra/JMTYPE.NRLIB/JMTYPE.lsp" (written 21 AUG 2026 05:45:50 PM):

; wrote /home/greg/Tmp/jlfricas/src/algebra/JMTYPE.NRLIB/JMTYPE.fasl
; compilation finished in 0:00:00.000
------------------------------------------------------------------------
   JLMachineType is now explicitly exposed in frame initial
   JLMachineType will be automatically loaded when needed from
      /home/greg/Tmp/jlfricas/src/algebra/JMTYPE.NRLIB/JMTYPE

(1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile JOBAGG.spad )noopt" | DAASE=./r7 FRICAS=/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu FRICAS_INITFILE= /home/greg/Tmp/jlfricas/build/x86_64-linux-gnu/bin/interpsys
Checking for foreign routines
FRICAS="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu"
spad-lib="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System
       Version: jlFriCAS 1.3.14-julia-dev built with SBCL 2.6.4.debian
                 Timestamp: ven. 21 août 2026 17:44:54 CEST
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

   Using local database ./r7/algebra/interp.daase..
   Re-reading interp.daase
   Using local database ./r7/algebra/operation.daase..
   Re-reading operation.daase
   Using local database ./r7/algebra/category.daase..
   Re-reading category.daase
   Using local database ./r7/algebra/browse.daase..
(1) ->
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |$tryRecompileArguments| NIL))
Value = NIL
(1) ->    Compiling FriCAS source code from file
      /home/greg/Tmp/jlfricas/src/algebra/JOBAGG.spad using system
      compiler.
   JOBAGG abbreviates category JLObjectAggregate
------------------------------------------------------------------------
   initializing NRLIB JOBAGG for JLObjectAggregate
   compiling into NRLIB JOBAGG

;;;     ***       |JLObjectAggregate| REDEFINED
WARNING: redefining BOOT::|JLObjectAggregate| in DEFUN
Time: 0 SEC.

   JOBAGG- abbreviates domain JLObjectAggregate&
------------------------------------------------------------------------
   initializing NRLIB JOBAGG- for JLObjectAggregate&
   compiling into NRLIB JOBAGG-
   importing JLUtilityFunctions
   importing JLStringUtilities
   importing String
   processing macro definition getind a ==> concat construct(getindex(refs,,string jlId a,))
   compiling exported # : S -> NonNegativeInteger
****** comp fails at level 7 with expression: ******
error in function #

(|jlEvalString|
 (|concat|
  (|construct| "length("
               (|concat|
                (|construct| "getindex(refs,"
                             (|string| | << | (|jlId| |obj|) | >> |) ")"))
               ")")))
****** level 7  ******
x:= (jlId obj)
m:= (Integer)
f:=
((((|obj| # #) (|getind| #) (|#| #) (< #) ...)))

   >> Apparent user error:
   no modemap for construct with 3 arguments

(1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile JOBRING.spad )noopt" | DAASE=./r7 FRICAS=/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu FRICAS_INITFILE= /home/greg/Tmp/jlfricas/build/x86_64-linux-gnu/bin/interpsys
Checking for foreign routines
FRICAS="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu"
spad-lib="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System
       Version: jlFriCAS 1.3.14-julia-dev built with SBCL 2.6.4.debian
                 Timestamp: ven. 21 août 2026 17:44:54 CEST
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

   Using local database ./r7/algebra/interp.daase..
   Re-reading interp.daase
   Using local database ./r7/algebra/operation.daase..
   Re-reading operation.daase
   Using local database ./r7/algebra/category.daase..
   Re-reading category.daase
   Using local database ./r7/algebra/browse.daase..
(1) ->
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |$tryRecompileArguments| NIL))
Value = NIL
(1) ->    Compiling FriCAS source code from file
      /home/greg/Tmp/jlfricas/src/algebra/JOBRING.spad using system
      compiler.
   JOBRING abbreviates category JLObjectRing
------------------------------------------------------------------------
   initializing NRLIB JOBRING for JLObjectRing
   compiling into NRLIB JOBRING

;;;     ***       |JLObjectRing| REDEFINED
WARNING: redefining BOOT::|JLObjectRing| in DEFUN
Time: 0 SEC.

   JOBRING- abbreviates domain JLObjectRing&
------------------------------------------------------------------------
   initializing NRLIB JOBRING- for JLObjectRing&
   compiling into NRLIB JOBRING-
   importing JLUtilityFunctions
   processing macro definition getind a ==> concat construct(getindex(refs,,string jlId a,))
   processing macro definition junfunc(func,a) ==> (Sel Lisp make_jlref_wcall1)(func,a)
   processing macro definition junbfunc(bfunc,a) ==> (Sel Lisp jl_call1_bool_wrapped_index)(bfunc,jlId a)
   processing macro definition jbinfunc(func,a,b) ==> (Sel Lisp make_jlref_wcall2)(func,a,b)
   compiling exported zero? : S -> Boolean
Time: 0 SEC.

   compiling exported one? : S -> Boolean
Time: 0 SEC.

   compiling exported + : (S,S) -> S
      JOBRING-;+;3S;3 is replaced by make_jlref_wcall2+xy
Time: 0 SEC.

   compiling exported - : (S,S) -> S
      JOBRING-;-;3S;4 is replaced by make_jlref_wcall2-xy
Time: 0 SEC.

   compiling exported - : S -> S
      JOBRING-;-;2S;5 is replaced by make_jlref_wcall1-x
Time: 0 SEC.

   compiling exported * : (S,S) -> S
      JOBRING-;*;3S;6 is replaced by make_jlref_wcall2*xy
Time: 0 SEC.

   compiling exported * : (NMInteger,S) -> JLObject
      JOBRING-;*;NmiSJlo;7 is replaced by make_jlref_wcall2*xy
Time: 0 SEC.

   compiling exported * : (Integer,S) -> S
****** comp fails at level 7 with expression: ******
error in function *

(|jlref|
 (|concat|
  (|construct| (|string| |x|) "*"
               (|concat|
                (|construct| "getindex(refs,"
                             (|string| | << | (|jlId| |y|) | >> |) ")")))))
****** level 7  ******
x:= (jlId y)
m:= (Integer)
f:=
((((|y| # . #1=#) (|x| # #) (|y| . #1#) (* #) ...)))

   >> Apparent user error:
   no modemap for construct with 3 arguments

(1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile JOBTYPE.spad )noopt" | DAASE=./r7 FRICAS=/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu FRICAS_INITFILE= /home/greg/Tmp/jlfricas/build/x86_64-linux-gnu/bin/interpsys
Checking for foreign routines
FRICAS="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu"
spad-lib="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System
       Version: jlFriCAS 1.3.14-julia-dev built with SBCL 2.6.4.debian
                 Timestamp: ven. 21 août 2026 17:44:54 CEST
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

   Using local database ./r7/algebra/interp.daase..
   Re-reading interp.daase
   Using local database ./r7/algebra/operation.daase..
   Re-reading operation.daase
   Using local database ./r7/algebra/category.daase..
   Re-reading category.daase
   Using local database ./r7/algebra/browse.daase..
(1) ->
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |$tryRecompileArguments| NIL))
Value = NIL
(1) ->    Compiling FriCAS source code from file
      /home/greg/Tmp/jlfricas/src/algebra/JOBTYPE.spad using system
      compiler.
   JOBTYPE abbreviates category JLObjectType
------------------------------------------------------------------------
   initializing NRLIB JOBTYPE for JLObjectType
   compiling into NRLIB JOBTYPE

;;;     ***       |JLObjectType| REDEFINED
WARNING: redefining BOOT::|JLObjectType| in DEFUN
Time: 0 SEC.

   JOBTYPE- abbreviates domain JLObjectType&
------------------------------------------------------------------------
   initializing NRLIB JOBTYPE- for JLObjectType&
   compiling into NRLIB JOBTYPE-
   importing JLUtilityFunctions
   importing JLStringUtilities
   importing JLSymbol
   processing macro definition getind a ==> concat construct(getindex(refs,,string jlId a,))
   processing macro definition junfunc(func,a) ==> (Sel Lisp make_jlref_wcall1)(func,a)
   processing macro definition jbinfunc(func,a,b) ==> (Sel Lisp make_jlref_wcall2)(func,a,b)
   processing macro definition jterfunc(func,a,b,c) ==> (Sel Lisp make_jlref_wcall3)(func,a,b,c)
   processing macro definition jquatfunc(func,a,b,c,d) ==> (Sel Lisp make_jlref_wcall4)(func,a,b,c,d)
   processing macro definition jquinfunc(func,a,b,c,d,e) ==> (Sel Lisp make_jlref_wcall5)(func,a,b,c,d,e)
   processing macro definition defined? func ==> SEQ(:=(G0: Boolean,(Sel (JLUtilityFunctions) jlDefined?) func),exit(1,IF(G0,noBranch,exit(2,error concat(func, is not defined in Julia)))))
   compiling exported jlref : String -> S
      JOBTYPE-;jlref;SS;1 is replaced by make_jlref
Time: 0 SEC.

   compiling exported jlimref : String -> S
      JOBTYPE-;jlimref;SS;2 is replaced by make_jlimref
Time: 0 SEC.

   compiling exported jlId : S -> JLInt64
      JOBTYPE-;jlId;SJli;3 is replaced by JLREFID
Time: 0 SEC.

   compiling exported jlType : S -> Symbol
****** comp fails at level 8 with expression: ******
error in function jlType

(|coerce|
 (|jlEvalString|
  (|concat|
   (|construct| "string(typeof("
                (|concat|
                 (|construct| "getindex(refs,"
                              (|string| | << | (|jlId| |obj|) | >> |) ")"))
                "))"))))
****** level 8  ******
x:= (jlId obj)
m:= (Integer)
f:=
((((|obj| # #) (|defined?| #) (|jquinfunc| #) (|jquatfunc| #) ...)))

   >> Apparent user error:
   no modemap for construct with 3 arguments

(1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile NRING.spad )noopt" | DAASE=./r7 FRICAS=/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu FRICAS_INITFILE= /home/greg/Tmp/jlfricas/build/x86_64-linux-gnu/bin/interpsys
Checking for foreign routines
FRICAS="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu"
spad-lib="/home/greg/Tmp/jlfricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System
       Version: jlFriCAS 1.3.14-julia-dev built with SBCL 2.6.4.debian
                 Timestamp: ven. 21 août 2026 17:44:54 CEST
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

   Using local database ./r7/algebra/interp.daase..
   Re-reading interp.daase
   Using local database ./r7/algebra/operation.daase..
   Re-reading operation.daase
   Using local database ./r7/algebra/category.daase..
   Re-reading category.daase
   Using local database ./r7/algebra/browse.daase..
(1) ->
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |$tryRecompileArguments| NIL))
Value = NIL
(1) ->    Compiling FriCAS source code from file
      /home/greg/Tmp/jlfricas/src/algebra/NRING.spad using system
      compiler.
   NRING abbreviates category NMRing
------------------------------------------------------------------------
   initializing NRLIB NRING for NMRing
   compiling into NRLIB NRING

;;;     ***       |NMRing| REDEFINED
WARNING: redefining BOOT::|NMRing| in DEFUN
Time: 0 SEC.

   NRING- abbreviates domain NMRing&
------------------------------------------------------------------------
   initializing NRLIB NRING- for NMRing&
   compiling into NRLIB NRING-
   importing JLUtilityFunctions
   processing macro definition getind a ==> concat construct(getindex(refs,,string jlId a,))
   processing macro definition junfunc(func,a) ==> (Sel Lisp make_jlref_wcall1)(func,a)
   processing macro definition jbinfunc(func,a,b) ==> (Sel Lisp make_jlref_wcall2)(func,a,b)
   processing macro definition junbfunc(bfunc,a) ==> (Sel Lisp jl_call1_bool_wrapped_index)(bfunc,jlId a)
   processing macro definition jbinbfunc(op,a,b) ==> (Sel Lisp jl_call2_bool_wrapped_index)(op,jlId a,jlId b)
   compiling exported exact? : S -> Boolean
Time: 0 SEC.

   compiling exported unit? : S -> Boolean
Time: 0 SEC.

   compiling exported equal? : (S,S) -> Boolean
Time: 0 SEC.

   compiling exported irreducible? : S -> Boolean
Time: 0 SEC.

   compiling exported exactDivide : (S,S) -> S
      NRING-;exactDivide;3S;5 is replaced by make_jlref_wcall2divexactxy
Time: 0 SEC.

(time taken in buildFunctor:  42)

;;;     ***       |NMRing&| REDEFINED
Time: 0 SEC.


   Cumulative Statistics for Constructor NMRing&
      Time: 0 seconds

   finalizing NRLIB NRING-
   Processing NMRing& for Browser database:
--------constructor---------
--------(exact? ((Boolean) %))---------
--------(unit? ((Boolean) %))---------
--------(equal? ((Boolean) % %))---------
--------(irreducible? ((Boolean) %))---------
--------(exactDivide (% % %))---------
--------(jlNMRing ((String)))---------
; compiling file "/home/greg/Tmp/jlfricas/src/algebra/NRING-.NRLIB/NRING-.lsp" (written 21 AUG 2026 05:45:50 PM):

; file: /home/greg/Tmp/jlfricas/src/algebra/NRING-.NRLIB/NRING-.lsp
; in: SDEFUN |NRING-;exactDivide;3S;5|
;     (BOOT::SDEFUN BOOT::|NRING-;exactDivide;3S;5|
;                   ((BOOT::|x| (BOOT::S)) (BOOT::|y| (BOOT::S))
;                    (BOOT::% (BOOT::S)))
;                   (BOOT::|make_jlref_wcall2| "divexact" BOOT::|x| BOOT::|y|))
; --> PROGN SB-IMPL::%DEFUN SB-IMPL::%DEFUN SB-INT:NAMED-LAMBDA
; ==>
;   #'(SB-INT:NAMED-LAMBDA BOOT::|NRING-;exactDivide;3S;5|
;         (BOOT::|x| BOOT::|y| BOOT::%)
;       (DECLARE (SB-C::TOP-LEVEL-FORM))
;       (BLOCK BOOT::|NRING-;exactDivide;3S;5|
;         (BOOT::|make_jlref_wcall2| "divexact" BOOT::|x| BOOT::|y|)))
;
; caught STYLE-WARNING:
;   The variable % is defined but never used.
;
; compilation unit finished
;   caught 1 STYLE-WARNING condition


; wrote /home/greg/Tmp/jlfricas/src/algebra/NRING-.NRLIB/NRING-.fasl
; compilation finished in 0:00:00.008
------------------------------------------------------------------------
   NMRing& is now explicitly exposed in frame initial
   NMRing& will be automatically loaded when needed from
      /home/greg/Tmp/jlfricas/src/algebra/NRING-.NRLIB/NRING-
   finalizing NRLIB NRING
   Processing NMRing for Browser database:
--------constructor---------
--------(exact? ((Boolean) %))---------
--------(unit? ((Boolean) %))---------
--------(equal? ((Boolean) % %))---------
--------(irreducible? ((Boolean) %))---------
--------(exactDivide (% % %))---------
--------(jlNMRing ((String)))---------
; compiling file "/home/greg/Tmp/jlfricas/src/algebra/NRING.NRLIB/NRING.lsp" (written 21 AUG 2026 05:45:50 PM):

; wrote /home/greg/Tmp/jlfricas/src/algebra/NRING.NRLIB/NRING.fasl
; compilation finished in 0:00:00.000
------------------------------------------------------------------------
   NMRing is now explicitly exposed in frame initial
   NMRing will be automatically loaded when needed from
      /home/greg/Tmp/jlfricas/src/algebra/NRING.NRLIB/NRING

(1) -> make[4] : on quitte le répertoire « /home/greg/Tmp/jlfricas/src/algebra »
cp: impossible d'évaluer 'JOBAGG.NRLIB/JOBAGG.fasl': Aucun fichier ou dossier de ce nom
make[3]: *** [Makefile:667: stamp-oboo3] Error 1
make[3] : on quitte le répertoire « /home/greg/Tmp/jlfricas/src/algebra »
make[2]: *** [Makefile:605: all-ax] Error 2
make[2] : on quitte le répertoire « /home/greg/Tmp/jlfricas/src/algebra »
make[1]: *** [Makefile:224: all-algebra] Error 2
make[1] : on quitte le répertoire « /home/greg/Tmp/jlfricas/src »
make: *** [Makefile:244: all-src] Error 2
┌──(greg㉿ellipse)-[~/Tmp/jlfricas]

Hope that helps,

Greg



.  
 

Waldek Hebisch

unread,
Aug 21, 2026, 12:56:04 PMAug 21
to fricas...@googlegroups.com
From below I see that Spad compiler does not know enough about 'jlId'.

<snip>
> (1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile
> JOBAGG.spad )noopt" | DAASE=./r7
<snip>
> ****** comp fails at level 7 with expression: ******
> error in function #
>
> (|jlEvalString|
> (|concat|
> (|construct| "length("
> (|concat|
> (|construct| "getindex(refs,"
> (|string| | << | (|jlId| |obj|) | >> |) ")"))
> ")")))
> ****** level 7 ******
> x:= (jlId obj)
> m:= (Integer)
> f:=
> ((((|obj| # #) (|getind| #) (|#| #) (< #) ...)))
>
> >> Apparent user error:
> no modemap for construct with 3 arguments

AFAICS the real problem is expression 'string(jlId(obj))'. To compile
it correctly compiler must know signature of 'jlId' (which seem to be
'jlId : S -> JLInt64') and signature of 'string' (above I would guess
that needed signature is 'string : JLInt64 -> String).

<snip>
> (1) -> printf "%s\n%s" ")boot \$tryRecompileArguments := false" ")compile
> JOBTYPE.spad )noopt" | DAASE=./r7
<snop>
> compiling exported jlId : S -> JLInt64
> JOBTYPE-;jlId;SJli;3 is replaced by JLREFID
> Time: 0 SEC.
>
> compiling exported jlType : S -> Symbol
> ****** comp fails at level 8 with expression: ******
> error in function jlType
>
> (|coerce|
> (|jlEvalString|
> (|concat|
> (|construct| "string(typeof("
> (|concat|
> (|construct| "getindex(refs,"
> (|string| | << | (|jlId| |obj|) | >> |) ")"))
> "))"))))
> ****** level 8 ******
> x:= (jlId obj)
> m:= (Integer)
> f:=
> ((((|obj| # #) (|defined?| #) (|jquinfunc| #) (|jquatfunc| #) ...)))

Here 'jlId' shold be known (it was defined before in the same constructor),
so the trouble probably is due to missing signature for 'string'.

So, the question is: where you define 'string'? And is the constructor
where you define it present in 'komp_all.input'?

BTW: with current design _all_ constructurs that you add should be
present in 'komp_all.input'. You can get away with skipping some.
But if you skip a constructor exporting something used by other
constructors, the build machinery in current trunk will not work.

--
Waldek Hebisch

Grégory Vanuxem

unread,
Aug 21, 2026, 11:03:30 PMAug 21
to fricas...@googlegroups.com
I have found the root of this issue, I know it from parameterized categories. My code is correct but this optimization behaves like what I encountered with Nemo p-adic numbers, you can not give a Nemo integer as a parameter to the NMPadicNumberCategory. Only a Spad Integer, at least for the build process from memory.

Here JLInt64 does have the string operation, like in fact every Julia type in FriCAS (and Julia), it is inherited from JuliaType which exports it. That will not be accepted during the build process with the modification in object here. I can change it to Integer, that's not really a problem and solve the jlId issue. The problem, later, which is solvable, is the coerce to OutputForm in, also, JLObjectType, the two come from this category. This category is the root category of every Julia object and implements some routines used by all Julia objects. By Julia objects I mean objects that are manipulated by reference from Spad, they are in the Julia process. The coerce function can not be compiled during the build process, it contains code that uses Julia regex, in fact I need to replace // => / and for one domain get rid of '$'.

So to be simpler, in this piece of code:

    coerce(obj : %) : OutputForm ==
      ret : List String := jl_stringify_wrapped_index("show",
        "_"text/plain_"", jlId(obj))$Lisp
      if #ret ~= 0 then
        for i in 1..#ret repeat
          if not jlRegexMatch?(string(jlType(obj)), jlRegex "String") then
            -- Direct call to replace since $ has to be escaped in Nemo
            -- residue field
            ret.i := jlEvalString(concat(["replace(raw_"",
              ret.i, "_",", jlString("//"),"=>" ,jlString("/"), ")"]))
            --jlRegexReplace(concat(["raw_"",ret.i,"_""]), jlString("//"), jlString("/"))
      -- first line length only
      #ret ~= 1 or more?(elt(ret,1), _$LINELENGTH$Lisp)
        => pile(append(["" pretend OutputForm], ret pretend List OutputForm))
      vconcat(ret pretend List OutputForm)

If I remove the jlRegexReplace and jlEvalString (remove the  if #ret ~= 0   branch) and use Integer instead of JlInt64 the build process completes successfully. So, from my point of view, if everything is lispish in the category default implementation there is no problem.

To resume, the issue comes from these two operations in JLObjectType. Otherwise I have no problem building FriCAS including this commit. It's not a coding error :)

Greg

--
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 visit https://groups.google.com/d/msgid/fricas-devel/aoiDIVTNEba0UQOb%40fricas.org.

Waldek Hebisch

unread,
Aug 22, 2026, 8:58:34 AMAug 22
to fricas...@googlegroups.com
On Sat, Aug 22, 2026 at 05:02:50AM +0200, Grégory Vanuxem wrote:
> I have found the root of this issue, I know it from parameterized
> categories. My code is correct but this optimization behaves like what I
> encountered with Nemo p-adic numbers, you can not give a Nemo integer as a
> parameter to the NMPadicNumberCategory. Only a Spad Integer, at least for
> the build process from memory.

If you can build it in other way, but is does not work when you
patched current Makefile, then it looks that patched Makefile is
buggy. You did not say what you have in your Makefile, but most
likely list of constructors for build in memory is too short.
It should contain both system constructors and the ones you
added.
--
Waldek Hebisch

Grégory Vanuxem

unread,
Aug 24, 2026, 3:31:50 AMAug 24
to fricas...@googlegroups.com
Hello Waldek,

Sorry for the delay. I attached the Makefile.in. I looked at mine, it contained some minor errors that I fixed and with it, Makefile2.in for the attachment, I have no trouble building "jlFriCAS". I don't think there are errors in the first Makefile.in, I redo it from scratch to reflect your one. Mine is an old Makefile that I incrementally populated.

Greg

PS: BTW for some information, I quickly wrote documentation for the Julia inclusion with help of AI in two days, some corrections and additions are still needed: https://gvanuxem.github.io/jlfricas/

--
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.
Makefile.in
Makefile2.in

Waldek Hebisch

unread,
Aug 24, 2026, 11:24:19 AMAug 24
to fricas...@googlegroups.com
On Mon, Aug 24, 2026 at 09:31:11AM +0200, Grégory Vanuxem wrote:
> Hello Waldek,
>
> Sorry for the delay. I attached the Makefile.in. I looked at mine, it
> contained some minor errors that I fixed and with it, Makefile2.in for the
> attachment, I have no trouble building "jlFriCAS". I don't think there are
> errors in the first Makefile.in, I redo it from scratch to reflect your
> one. Mine is an old Makefile that I incrementally populated.

Your Makefile.in looks OK. AFAICS in Makefile2.in you build
serially. But there is another difference. Parallel build also
sets '$tryRecompileArguments := false'. With this compilation is
faster, but you need to add explicit import for things that
otherwise (that is when '$tryRecompileArguments' is true) would
be automatically imported.

First guess is that you need to add

import JLInt64

to your files. To see what is needed just start working FriCAS
with Julia interface, do

)boot $tryRecompileArguments := false

and then try to compile your files. All categories included in
FriCAS compile fine when you do this, but that required some
work (you can see a bunch of commits described 'add explicit imports').

--
Waldek Hebisch

Grégory Vanuxem

unread,
Aug 25, 2026, 11:02:40 AMAug 25
to fricas...@googlegroups.com
Many thanks Waldek, first for your awesome explanation of the build process during this discussion, secondly because after testing importing JlInt64, even if I switched to Integer, I saw the importance now to import almost everything, for example for the length of a List I had to import NonNegativeInteger to use it.

I finally managed to use/implement the actual build process with your commit in object.

Greg

--
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.
Reply all
Reply to author
Forward
0 new messages