Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.61 fails to build: Heap exhausted during garbage collection: 56 bytes available, 88 requested #80

Open
barracuda156 opened this issue Nov 12, 2024 · 10 comments

Comments

@barracuda156
Copy link

; wrote /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/.home/.cache/common-lisp/sbcl-2.4.10-macosx-ppc32/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/kalyna-tmpO1PDDUR.fasl
; compilation finished in 0:01:57.671
; compiling file "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/salsa20.lisp" (written 20 AUG 2024 04:05:03 PM):

; file: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/salsa20.lisp
; in: DEFUN SALSA-CORE
;     (DOTIMES (IRONCLAD::I IRONCLAD::N-ROUNDS)
;       (IRONCLAD::QUARTER-ROUND 4 8 12 0)
;       (IRONCLAD::QUARTER-ROUND 9 13 1 5)
;       (IRONCLAD::QUARTER-ROUND 14 2 6 10)
;       (IRONCLAD::QUARTER-ROUND 3 7 11 15)
;       (IRONCLAD::QUARTER-ROUND 1 2 3 0)
;       (IRONCLAD::QUARTER-ROUND 6 7 4 5)
;       (IRONCLAD::QUARTER-ROUND 11 8 9 10)
;       (IRONCLAD::QUARTER-ROUND 12 13 14 15))
; --> BLOCK LET TAGBODY UNLESS IF >= 
; ==>
;   1
; 
; note: forced to do GENERIC-< (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;       The second argument is a INTEGER, not a FIXNUM.

; --> BLOCK LET TAGBODY PSETQ PROGN SETQ THE 1+ 
; ==>
;   1
; 
; note: forced to do GENERIC-+ (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;       The result is a (VALUES (INTEGER 1) &OPTIONAL), not a (VALUES FIXNUM
;                                                                     &OPTIONAL).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;       The result is a (VALUES (INTEGER 1) &OPTIONAL), not a (VALUES FIXNUM
;                                                                     &OPTIONAL).
;       etc.

; in: DEFINE-STREAM-CRYPTOR SALSA20
;     (INCF IRONCLAD::CIPHERTEXT-START 64)
; --> THE 
; ==>
;   (+ 64 IRONCLAD::CIPHERTEXT-START)
; 
; note: doing unsigned word to integer coercion (cost 20), for:
;       the first result of inline (unsigned-byte 32) arithmetic

;     (INCF IRONCLAD::PLAINTEXT-START 64)
; --> THE 
; ==>
;   (+ 64 IRONCLAD::PLAINTEXT-START)
; 
; note: doing unsigned word to integer coercion (cost 20), for:
;       the first result of inline (unsigned-byte 32) arithmetic

;     (ZEROP
;      (SETF (AREF IRONCLAD::STATE 8)
;              (IRONCLAD::MOD32+ (AREF IRONCLAD::STATE 8) 1)))
; 
; note: doing unsigned word to integer coercion (cost 20), for:
;       the first argument of IF-EQ

;     (INCF IRONCLAD::CIPHERTEXT-START IRONCLAD::SIZE)
; --> THE 
; ==>
;   (+ IRONCLAD::SIZE IRONCLAD::CIPHERTEXT-START)
; 
; note: doing unsigned word to integer coercion (cost 20), for:
;       the first result of inline (unsigned-byte 32) arithmetic

;     (INCF IRONCLAD::PLAINTEXT-START IRONCLAD::SIZE)
; --> THE 
; ==>
;   (+ IRONCLAD::SIZE IRONCLAD::PLAINTEXT-START)
; 
; note: doing unsigned word to integer coercion (cost 20), for:
;       the first result of inline (unsigned-byte 32) arithmetic


; wrote /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/.home/.cache/common-lisp/sbcl-2.4.10-macosx-ppc32/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/salsa20-tmpIX4U16ZB.fasl
; compilation finished in 0:00:01.406
; compiling file "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/keystream.lisp" (written 20 AUG 2024 04:05:03 PM):

; wrote /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/.home/.cache/common-lisp/sbcl-2.4.10-macosx-ppc32/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/keystream-tmp93OFNPHA.fasl
; compilation finished in 0:00:00.592
; compiling file "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source/cl-ironclad/src/ciphers/kuznyechik.lisp" (written 20 AUG 2024 04:05:03 PM):
Heap exhausted during garbage collection: 56 bytes available, 88 requested.
     | Immobile Objects |
 Gen layout symbol   code  Boxed   Cons    Raw   Code  SmMix  Mixed  LgRaw LgCode  LgMix Waste%       Alloc        Trig   Dirty GCs Mem-age
  2      0      0      0  32861   3823  12830     52    391   2818    139     54    112    4.7   207147528   171885573   53080   1  0.8039
  3      0      0      0  45426   6433  15343    481    750   3129    292    434    659    4.7   284854952     2000000   43287   0  0.5342
  4      0      0      0      0      0      0      0      0      0      0      0      0    0.0           0     2000000       0   0  0.0000
  5      0      0      0      0      0      0      0      0      0      0      0      0    0.0           0     2000000       0   0  0.0000
  6      0      0      0    838    376     43   3281    279     34      5     62    127    1.7    20310216     2000000     218   0  0.0000
Tot      0      0      0  79125  10632  28216   3814   1420   5981    436    550    898    4.6   512311944 [95.4% of 536870912 max]
GC control variables:
   *GC-INHIBIT* = true
   *GC-PENDING* = true
   *STOP-FOR-GC-PENDING* = false
Collection trigger variables:
   dynamic_space_size = 536870912
   bytes_allocated = 512311944
   auto_gc_trigger = 404351737
   bytes_consed_between_gcs = 26843545
fatal error encountered in SBCL pid 39581 pthread 0x45a408:
Heap exhausted, game over.

   0: [*] 0x10015cc pc=0x10031f88 {0x10031f00+0088} SB-KERNEL::COLLECT-GARBAGE
   1:     0x100154c pc=0x10004970 {0x10004000+0970} (FLET "WITHOUT-GCING-BODY-" :IN SB-KERNEL::SUB-GC)
   2:     0x10014cc pc=0x10004458 {0x10004000+0458} (FLET "WITHOUT-INTERRUPTS-BODY-" :IN SB-KERNEL::SUB-GC)
   3:     0x100144c pc=0x10004138 {0x10004000+0138} SB-KERNEL::SUB-GC
   4:     0x1001440 pc=0x0 LRA=0x33ec7 
   5: [I*]0x10013e0 pc=0x11032eac {0x11032ae0+03cc} SB-C::JOIN-EQUALITY-CONSTRAINTS
   6:     0x1001380 pc=0x10e56ba0 {0x10e56468+0738} SB-C::JOIN-TYPE-CONSTRAINTS
   7:     0x1001360 pc=0x10acd820 {0x10acd5b8+0268} SB-C::COMPUTE-BLOCK-IN
   8:     0x1001340 pc=0x10ace1e0 {0x10ace160+0080} SB-C::UPDATE-BLOCK-IN
   9:     0x1001320 pc=0x105de3b8 {0x105dde30+0588} SB-C::FIND-AND-PROPAGATE-CONSTRAINTS
  10:     0x1001300 pc=0x102ded30 {0x102deb50+01e0} SB-C::CONSTRAINT-PROPAGATE
  11:     0x10012e0 pc=0x11082190 {0x11081de0+03b0} SB-C::IR1-OPTIMIZE-PHASE-1
  12:     0x10012c0 pc=0x110366c0 {0x11036518+01a8} SB-C::IR1-PHASES
  13:     0x10012a0 pc=0x10f06518 {0x10f06380+0198} SB-C::COMPILE-COMPONENT
  14:     0x1001260 pc=0x1107b218 {0x1107b010+0208} SB-C::COMPILE-TOPLEVEL
  15:     0x1001240 pc=0x11015df8 {0x11015b90+0268} SB-C::CONVERT-AND-MAYBE-COMPILE
  16:     0x10011e0 pc=0x11029030 {0x11028d08+0328} SB-C::PROCESS-TOPLEVEL-FORM
  17:     0x1001180 pc=0x11029168 {0x11028d08+0460} SB-C::PROCESS-TOPLEVEL-FORM
  18:     0x1001160 pc=0x110439d8 {0x11043910+00c8} SB-C::PROCESS-TOPLEVEL-PROGN
  19:     0x1001100 pc=0x11029550 {0x11028d08+0848} SB-C::PROCESS-TOPLEVEL-FORM
  20:     0x10010e0 pc=0x110439d8 {0x11043910+00c8} SB-C::PROCESS-TOPLEVEL-PROGN
  21:     0x1001080 pc=0x11029248 {0x11028d08+0540} SB-C::PROCESS-TOPLEVEL-FORM
  22:     0x1001020 pc=0x11029168 {0x11028d08+0460} SB-C::PROCESS-TOPLEVEL-FORM
  23:     0x1000f98 pc=0x10cae548 {0x10cac5f8+1f50} (LAMBDA (SB-KERNEL::FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-C::SUB-COMPILE-FILE)
  24:     0x1000f18 pc=0x10117fe8 {0x101179d0+0618} SB-C::%DO-FORMS-FROM-INFO
  25:     0x1000e98 pc=0x10cadf78 {0x10cac5f8+1980} (LAMBDA () :IN SB-C::SUB-COMPILE-FILE)
  26:     0x1000e38 pc=0x10b20c98 {0x10b20360+0938} (FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT)
  27:     0x1000d70 pc=0x10cad4d8 {0x10cac5f8+0ee0} SB-C::SUB-COMPILE-FILE
  28:     0x1000ca0 pc=0x10828ba8 {0x10827a50+1158} COMPILE-FILE
  29:     0x1000c58 pc=0x1188ef60 {0x1188edd0+0190} UIOP/UTILITY::CALL-WITH-MUFFLED-CONDITIONS
  30:     0x1000c38 pc=0x1188ed10 {0x1188ebb0+0160} UIOP/PATHNAME::CALL-WITH-ENOUGH-PATHNAME
  31:     0x1000bc0 pc=0x1188de68 {0x1188d9a0+04c8} UIOP/LISP-BUILD::COMPILE-FILE*
  32:     0x1000ba0 pc=0x1188d668 {0x1188d358+0310} ASDF/LISP-ACTION::PERFORM-LISP-COMPILATION
  33:     0x1000b80 pc=0x1188d1f8 {0x1188d030+01c8} (SB-PCL::EMF ASDF/ACTION::PERFORM)
  34:     0x1000b20 pc=0x1188c3b0 {0x1188bf80+0430} (LAMBDA () :IN ASDF/ACTION::CALL-WHILE-VISITING-ACTION)
  35:     0x1000a28 pc=0x1188bba0 {0x1188abb0+0ff0} (SB-PCL::FAST-METHOD ASDF/ACTION::PERFORM-WITH-RESTARTS :AROUND (T T))
  36:     0x1000a08 pc=0x1188ab18 {0x1188a8e0+0238} (SB-PCL::FAST-METHOD ASDF/PLAN::PERFORM-PLAN (T))
  37:     0x1000990 pc=0x10b20ae8 {0x10b20360+0788} (FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT)
  38:     0x1000970 pc=0x1188a228 {0x11889f38+02f0} (SB-PCL::FAST-METHOD ASDF/PLAN::PERFORM-PLAN :AROUND (T))
  39:     0x1000950 pc=0x11889ec0 {0x11889c20+02a0} (SB-PCL::FAST-METHOD ASDF/OPERATE::OPERATE (ASDF/OPERATION::OPERATION ASDF/COMPONENT::COMPONENT))
  40:     0x1000910 pc=0x11889b50 {0x11889000+0b50} (SB-PCL::EMF ASDF/OPERATE::OPERATE)
  41:     0x10008b0 pc=0x113cdeb0 {0x113cd000+0eb0} (LAMBDA () :IN ASDF/OPERATE::OPERATE)
  42:     0x1000850 pc=0x113cd3e0 {0x113cd000+03e0} (SB-PCL::FAST-METHOD ASDF/OPERATE::OPERATE :AROUND (T T))
  43:     0x1000810 pc=0x11889b50 {0x11889000+0b50} (SB-PCL::EMF ASDF/OPERATE::OPERATE)
  44:     0x10007b0 pc=0x113cdeb0 {0x113cd000+0eb0} (LAMBDA () :IN ASDF/OPERATE::OPERATE)
  45:     0x1000750 pc=0x113cd3e0 {0x113cd000+03e0} (SB-PCL::FAST-METHOD ASDF/OPERATE::OPERATE :AROUND (T T))
  46:     0x1000638 pc=0x113d70a0 {0x113d6000+10a0} ASDF/SESSION::CALL-WITH-ASDF-SESSION
  47:     0x10005d8 pc=0x113cdff8 {0x113cd000+0ff8} (LAMBDA () :IN ASDF/OPERATE::OPERATE)
  48:     0x10004c0 pc=0x113d70a0 {0x113d6000+10a0} ASDF/SESSION::CALL-WITH-ASDF-SESSION
  49:     0x1000460 pc=0x113cd3e0 {0x113cd000+03e0} (SB-PCL::FAST-METHOD ASDF/OPERATE::OPERATE :AROUND (T T))
  50:     0x10003d8 pc=0x105c3aa8 {0x105c32a8+0800} SB-INT::SIMPLE-EVAL-IN-LEXENV
  51:     0x10003b8 pc=0x101133e0 {0x10113300+00e0} EVAL
  52:     0x1000288 pc=0x10066700 {0x10065e40+08c0} SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS
  53:     0x1000130 pc=0x10023ea8 {0x100232b0+0bf8} SB-IMPL::TOPLEVEL-INIT
  54:     0x10000d0 pc=0x10022f28 {0x10022700+0828} (FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP)
  55:     0x1000060 pc=0x10022ba8 {0x10022700+04a8} (FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP)
  56:     0x1000000 pc=0x100228c8 {0x10022700+01c8} SB-IMPL::%START-LISP
Note: [I] = interrupted, [*] = no LRA
Command failed: /opt/local/bin/sbcl --no-sysinit --no-userinit --non-interactive --eval '(require "asdf")' --eval '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) #p"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system/" #p"/opt/local/share/common-lisp/system/" asdf:*central-registry*))' --eval '(asdf:operate (quote asdf:build-op) (quote ironclad-text))' 2>&1
Exit code: 1
Error: Failed to build cl-ironclad: asdf:build-op cannot be executed
@glv2
Copy link
Collaborator

glv2 commented Nov 12, 2024

Could you try increasing the maximum heap size that SBCL can use:

sbcl --dynamic-space-size 2048 ...

@barracuda156
Copy link
Author

@glv2 Apparently it does not allow that:

This is SBCL 2.4.10, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

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.
mmap: Cannot allocate memory
fatal error encountered in SBCL pid 2351 pthread 0x45a408:
Can't allocate 0x80000000 bytes for space 1

Command failed: /opt/local/bin/sbcl --dynamic-space-size 2048 --no-sysinit --no-userinit --non-interactive --eval '(require "asdf")' --eval '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) #p"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system/" #p"/opt/local/share/common-lisp/system/" asdf:*central-registry*))' --eval '(asdf:operate (quote asdf:build-op) (quote ironclad-text))' 2>&1
Exit code: 1

@catap Kirill, is there a way to use this arg via the portgroup? Am I doing something wrong? (For now I just manually added that into SBCL invocation in the PG; I do not see how to pass args from portfile code.)

@barracuda156
Copy link
Author

@catap On a side note, PG code for picking CCL does not work correctly:

Execute asdf:build-op at ironclad-text by CCL
sh: /opt/local/bin/ccl64: No such file or directory
Command failed: /opt/local/bin/ccl64 --no-init --batch --eval '(require "asdf")' --eval '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) #p"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system/" #p"/opt/local/share/common-lisp/system/" asdf:*central-registry*))' --eval '(asdf:operate (quote asdf:build-op) (quote ironclad-text))' 2>&1
Exit code: 127
Error: Failed to build cl-ironclad: asdf:build-op cannot be executed

And clisp is disabled to to common_lisp.threads yes :)

@barracuda156
Copy link
Author

But anyway, CCL fails to build this immediately:

--->  Building cl-ironclad
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system
Execute asdf:build-op at ironclad-text by CCL
> Error of type SIMPLE-ERROR: Reader error: No external symbol named "BUILD-OP" in package #<Package "ASDF"> .
> While executing: CCL::%PARSE-TOKEN, in process listener(1).
 (F019AA60) : 0 (PRINT-CALL-HISTORY :CONTEXT NIL :PROCESS NIL :ORIGIN NIL :DETAILED-P T :COUNT 536870911 :START-FRAME-NUMBER 0 :STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #xC592BF6> :PRINT-LEVEL 2 :PRINT-LENGTH 5 :SHOW-INTERNAL-FRAMES NIL :FORMAT :TRADITIONAL) 548
  (&KEY :CONTEXT :PROCESS :ORIGIN :DETAILED-P :COUNT :START-FRAME-NUMBER :STREAM :PRINT-LEVEL :PRINT-LENGTH :SHOW-INTERNAL-FRAMES :FORMAT)
   CCL::CONTEXT: NIL
   PROCESS: NIL
   CCL::ORIGIN: NIL
   CCL::DETAILED-P: T
   COUNT: 536870911
   CCL::START-FRAME-NUMBER: 0
   STREAM: #<SYNONYM-STREAM to *TERMINAL-IO* #xC592BF6>
   CCL::PRINT-LEVEL: 2
   CCL::PRINT-LENGTH: 5
   CCL::SHOW-INTERNAL-FRAMES: NIL
   FORMAT: :TRADITIONAL

  CCL::FRAME-NUMBER: 0
  *BACKTRACE-PRINT-LEVEL*: 2
  *BACKTRACE-PRINT-LENGTH*: 5
  *BACKTRACE-FORMAT*: :TRADITIONAL
  *STANDARD-OUTPUT*: #<SYNONYM-STREAM to *TERMINAL-IO* #xC592BF6>
  *PRINT-CIRCLE*: NIL

 (F019AA70) : 1 (ABNORMAL-APPLICATION-EXIT) 124
  NIL

  #:G46268: (ERROR)
  CCL::%HANDLERS%: ((ERROR) (PROCESS-RESET))

 (F019AAA0) : 2 (BREAK-LOOP-HANDLE-ERROR #<SIMPLE-ERROR #xC63F256> -66688336) 1024
  (CONDITION *TOP-ERROR-FRAME*)
   CONDITION: #<SIMPLE-ERROR #xC63F256>
   *TOP-ERROR-FRAME*: -66688336

  CCL::BOGUS-GLOBALS: NIL
  CCL::NEWVALS: NIL
  CCL::OLDVALS: NIL

 (F019AAB0) : 3 (%ERROR #<SIMPLE-ERROR #xC63F256> ("BUILD-OP" #<Package "ASDF">) -66688336) 212
  (CONDITION CCL::ARGS CCL::ERROR-POINTER)
   CONDITION: #<SIMPLE-ERROR #xC63F256>
   CCL::ARGS: ("BUILD-OP" #<Package "ASDF">)
   CCL::ERROR-POINTER: -66688336



 (F019AAC0) : 4 (%PARSE-TOKEN #<STRING-INPUT-STREAM  #xC63F3EE> #\a (NIL)) 1400
  (STREAM CCL::FIRSTCHAR CCL::DOT-OK)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::FIRSTCHAR: #\a
   CCL::DOT-OK: (NIL)

  CCL::TB: #("BUILD-OP-registr" 0 8 16 NIL)
  CCL::ESCAPES: NIL
  CCL::EXPLICIT-PACKAGE: #<Package "ASDF">
  CCL::NONDOTS: T
  CCL::DOUBLE-COLON: NIL
  STRING: "BUILD-OP-registr"
  CCL::LEN: 8
  CCL::NUM: NIL
  CCL::PKG: #<Package "ASDF">
  CCL::FOUND: NIL
  SYMBOL: NIL
  CCL::TOKEN: "BUILD-OP"
  SYMBOL: NIL
  #:CONTINUE: #<RESTART CONTINUE #x1A08DE>
  #:G45064: (#<RESTART CONTINUE #x1A08DE>)
  CCL::%RESTARTS%: ((#<# # #x1A08DE>) (#<# # #x1A0A5E>) (#<# # #x1A0AEE>) (#<# # #x1A0C16> #<# # #x1A0C3E>))

 (F019AB00) : 5 (%PARSE-EXPRESSION #<STRING-INPUT-STREAM  #xC63F3EE> #\a (NIL)) 208
  (STREAM CCL::FIRSTCHAR CCL::DOT-OK)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::FIRSTCHAR: #\a
   CCL::DOT-OK: (NIL)

  READTABLE: #<READTABLE #xC4192AE>
  CCL::ATTRTAB: #(1 1 1 1 1 ...)
  CCL::ATTR: 6
  CCL::START-POS: 22

 (F019AB20) : 6 (%READ-LIST-EXPRESSION #<STRING-INPUT-STREAM  #xC63F3EE> (NIL) #\)) 180
  (STREAM CCL::DOT-OK &OPTIONAL CCL::TERMCH)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::DOT-OK: (NIL)
   CCL::TERMCH: #\)

  CCL::FIRSTCH: #\a

 (F019AB40) : 7 (READ-LIST #<STRING-INPUT-STREAM  #xC63F3EE> NIL #\)) 392
  (STREAM &OPTIONAL CCL::NODOTS CCL::TERMCH)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::NODOTS: NIL
   CCL::TERMCH: #\)

  CCL::DOT-OK: (NIL)
  CCL::HEAD: (NIL QUOTE)
  CCL::TAIL: (QUOTE)
  CCL::SOURCE-NOTE-LIST: NIL
  CCL::FIRSTFORM: QUOTE
  CCL::FIRSTFORM-P: T
  CCL::FIRSTFORM-SOURCE-NOTE: NIL

 (F019AB60) : 8 (%PARSE-EXPRESSION #<STRING-INPUT-STREAM  #xC63F3EE> #\( (NIL)) 368
  (STREAM CCL::FIRSTCHAR CCL::DOT-OK)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::FIRSTCHAR: #\(
   CCL::DOT-OK: (NIL)

  READTABLE: #<READTABLE #xC4192AE>
  CCL::ATTRTAB: #(1 1 1 1 1 ...)
  CCL::ATTR: 8
  CCL::START-POS: 15
  CCL::DEF: #<Anonymous Function #xC1A4D0E>

 (F019AB80) : 9 (%READ-LIST-EXPRESSION #<STRING-INPUT-STREAM  #xC63F3EE> (NIL) #\)) 180
  (STREAM CCL::DOT-OK &OPTIONAL CCL::TERMCH)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::DOT-OK: (NIL)
   CCL::TERMCH: #\)

  CCL::FIRSTCH: #\(

 (F019ABA0) : 10 (READ-LIST #<STRING-INPUT-STREAM  #xC63F3EE> NIL #\)) 392
  (STREAM &OPTIONAL CCL::NODOTS CCL::TERMCH)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::NODOTS: NIL
   CCL::TERMCH: #\)

  CCL::DOT-OK: (NIL)
  CCL::HEAD: (NIL ASDF:OPERATE)
  CCL::TAIL: (ASDF:OPERATE)
  CCL::SOURCE-NOTE-LIST: NIL
  CCL::FIRSTFORM: ASDF:OPERATE
  CCL::FIRSTFORM-P: T
  CCL::FIRSTFORM-SOURCE-NOTE: NIL

 (F019ABC0) : 11 (%PARSE-EXPRESSION #<STRING-INPUT-STREAM  #xC63F3EE> #\( NIL) 368
  (STREAM CCL::FIRSTCHAR CCL::DOT-OK)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::FIRSTCHAR: #\(
   CCL::DOT-OK: NIL

  READTABLE: #<READTABLE #xC4192AE>
  CCL::ATTRTAB: #(1 1 1 1 1 ...)
  CCL::ATTR: 8
  CCL::START-POS: 1
  CCL::DEF: #<Anonymous Function #xC1A4D0E>

 (F019ABE0) : 12 (%READ-FORM #<STRING-INPUT-STREAM  #xC63F3EE> 0 NIL) 380
  (STREAM CCL::ARG CCL::EOF-VAL)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::ARG: 0
   CCL::EOF-VAL: NIL

  CCL::CH: #\(

 (F019AC00) : 13 (READ-INTERNAL #<STRING-INPUT-STREAM  #xC63F3EE> T NIL NIL) 208
  (STREAM CCL::EOF-ERROR-P CCL::EOF-VALUE CCL::RECURSIVE-P)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::EOF-ERROR-P: T
   CCL::EOF-VALUE: NIL
   CCL::RECURSIVE-P: NIL

  CCL::%READ-OBJECTS%: NIL
  CCL::%KEEP-WHITESPACE%: NIL

 (F019AC10) : 14 (READ #<STRING-INPUT-STREAM  #xC63F3EE> T NIL NIL) 84
  (&OPTIONAL STREAM CCL::EOF-ERROR-P CCL::EOF-VALUE CCL::RECURSIVE-P)
   STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>
   CCL::EOF-ERROR-P: T
   CCL::EOF-VALUE: NIL
   CCL::RECURSIVE-P: NIL



 (F019AC20) : 15 (READ-FROM-STRING "(asdf:operate (quote asdf:build-op) (quote ironclad-text))" T NIL :START 0 :END NIL :PRESERVE-WHITESPACE NIL) 292
  (STRING &OPTIONAL CCL::EOF-ERROR-P CCL::EOF-VALUE &KEY :START :END :PRESERVE-WHITESPACE)
   STRING: "(asdf:operate (quote asdf:build-op) (quote ironclad-text))"
   CCL::EOF-ERROR-P: T
   CCL::EOF-VALUE: NIL
   CCL::START: 0
   CCL::END: NIL
   CCL::PRESERVE-WHITESPACE: NIL

  CCL::IDX: NIL
  STREAM: #<STRING-INPUT-STREAM  #xC63F3EE>

 (F019AC40) : 16 (FUNCALL #'#<(:INTERNAL CCL::EVAL-STRING CCL::STARTUP-CCL)> "(asdf:operate (quote asdf:build-op) (quote ironclad-text))") 260
  (CCL::S)
   CCL::S: "(asdf:operate (quote asdf:build-op) (quote ironclad-text))"

  #:CONTINUE: #<RESTART CONTINUE #x1A0A5E>
  #:G46189: (#<RESTART CONTINUE #x1A0A5E>)
  CCL::%RESTARTS%: ((#<# # #x1A0A5E>) (#<# # #x1A0AEE>) (#<# # #x1A0C16> #<# # #x1A0C3E>))

 (F019AC60) : 17 (STARTUP-CCL NIL) 976
  (&OPTIONAL CCL::INIT-FILE)
   CCL::INIT-FILE: NIL

  #:ABORT: #<RESTART ABORT #x1A0AEE>
  #:G46177: (#<RESTART ABORT #x1A0AEE>)
  CCL::%RESTARTS%: ((#<# # #x1A0AEE>) (#<# # #x1A0C16> #<# # #x1A0C3E>))
  #:G46182: ((:EVAL . "(asdf:operate (quote asdf:build-op) (quote ironclad-text))"))
  CCL::P: (:EVAL . "(asdf:operate (quote asdf:build-op) (quote ironclad-text))")
  CCL::PARAM: "(asdf:operate (quote asdf:build-op) (quote ironclad-text))"
  #:G46185: :EVAL

 (F019AC90) : 18 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 60
  NIL

  CCL::F: CCL::LISTENER-FUNCTION
  CCL::INIT-FILE: ("home:ccl-init" "home:\\.ccl-init")

 (F019ACB0) : 19 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 468
  NIL

  *TERMINAL-IO*: #<ECHOING-TWO-WAY-STREAM input #<BASIC-CHARACTER-INPUT-STREAM ISO-8859-1 (CHARACTER-SPECIAL/0) #xC59341E>, output #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (PIPE/1) #xC5931D6> #xC593B0E>
  CCL::CLOSE-STREAMS: NIL
  CCL::CLEANUP-FUNCTION: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #xC591F1E>
  CCL::INITIAL-FUNCTION: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #xC591EFE>
  CCL::AUTO-FLUSH: T
  OUTPUT-STREAM: #<BASIC-CHARACTER-OUTPUT-STREAM ISO-8859-1 (PIPE/1) #xC5931D6>
  INPUT-STREAM: #<BASIC-CHARACTER-INPUT-STREAM ISO-8859-1 (CHARACTER-SPECIAL/0) #xC59341E>
  CCL::ECHOING: T

 (F019ACE0) : 20 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #xC591C5E> (#<COMPILED-LEXICAL-CLOSURE # #xC591966>)) 400
  (PROCESS CCL::INITIAL-FORM)
   PROCESS: #<TTY-LISTENER listener(1) [Active] #xC591C5E>
   CCL::INITIAL-FORM: (#<COMPILED-LEXICAL-CLOSURE # #xC591966>)

  CCL::EXITED: NIL
  #:G46728: (PROCESS-RESET)
  CCL::%HANDLERS%: ((PROCESS-RESET))
  #:ABORT: #<RESTART ABORT #x1A0C3E>
  #:ABORT-BREAK: #<RESTART ABORT-BREAK #x1A0C16>
  #:G46729: (#<RESTART ABORT-BREAK #x1A0C16> #<RESTART ABORT #x1A0C3E>)
  CCL::%RESTARTS%: ((#<# # #x1A0C16> #<# # #x1A0C3E>))

 (F019AD20) : 21 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<TTY-LISTENER listener(1) [Active] #xC591C5E> (#<COMPILED-LEXICAL-CLOSURE # #xC591966>)) 164
  (PROCESS CCL::INITIAL-FORM)
   PROCESS: #<TTY-LISTENER listener(1) [Active] #xC591C5E>
   CCL::INITIAL-FORM: (#<COMPILED-LEXICAL-CLOSURE # #xC591966>)

  *CURRENT-PROCESS*: #<TTY-LISTENER listener(1) [Active] #xC591C5E>
  #:G46725: (CCL::*FREE-XPS* CCL::*FREE-CIRCULARITY-HASH-TABLES* CCL::*FAKE-STACK-FRAMES* CCL::*LOGICAL-BLOCK-XP* CCL::*FORMAT-TOP-LEVEL* ...)
  #:G46726: (NIL NIL NIL NIL NIL ...)

 (F019AD40) : 22 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 176
  NIL

  CCL::*CURRENT-LISP-THREAD*: #<LISP-THREAD listener [tcr @ #x5007F0] #xC5919C6>
  CCL::INITIAL-FUNCTION: (#<Compiled-function # (Non-Global)  #xC18A6C6> #<TTY-LISTENER listener(1) [Active] #xC591C5E> (#))
  CCL::TCR: 1311228
  CCL::THREAD: #<LISP-THREAD listener [tcr @ #x5007F0] #xC5919C6>

Command failed: /opt/local/bin/ccl --no-init --batch --eval '(require "asdf")' --eval '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) #p"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system/" #p"/opt/local/share/common-lisp/system/" asdf:*central-registry*))' --eval '(asdf:operate (quote asdf:build-op) (quote ironclad-text))' 2>&1
Exit code: 255

@barracuda156
Copy link
Author

@catap Well, I am out of options. CLISP fails even if I remove forcing threads:

--->  Building cl-ironclad
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/source
xinstall: mkdir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system
Execute asdf:build-op at ironclad-text by CLISP
#P"/opt/local/lib/clisp-2.49.93+/dynmod/asdf.lisp"
(*DEFAULT-PATHNAME-DEFAULTS*
 #P"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system/"
 #P"/opt/local/share/common-lisp/system/")
WARNING: Adding method
         #<STANDARD-METHOD :AROUND (#<STANDARD-CLASS COMPILE-OP> #<STANDARD-CLASS IRONCLAD-SOURCE-FILE>)>
         to an already called generic function
         #<STANDARD-GENERIC-FUNCTION PERFORM>
*** - Error while trying to load definition for system bordeaux-threads from
      pathname
      /opt/local/share/common-lisp/source/cl-bordeaux-threads/bordeaux-threads.asd:
      This implementation is unsupported.
Command failed: /opt/local/bin/clisp --quiet --quiet -x '(require "asdf")' -x '(setf asdf:*central-registry* (list* (quote *default-pathname-defaults*) #p"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lisp_cl-ironclad/cl-ironclad/work/build/system/" #p"/opt/local/share/common-lisp/system/" asdf:*central-registry*))' -x '(asdf:operate (quote asdf:build-op) (quote ironclad-text))' 2>&1
Exit code: 1
Error: Failed to build cl-ironclad: asdf:build-op cannot be executed

@barracuda156
Copy link
Author

I cannot really bisect too, since this commit is required now: 2e9bb0a
I.e. the version from cd67e7b which built on ppc earlier cannot be built with the current SBCL.

I can only try manually reverting select commits since cd67e7b to see if anything builds. Or selectively adding newer commits on top of cd67e7b (plus the required fix).

@glv2
Copy link
Collaborator

glv2 commented Nov 12, 2024

@glv2 Apparently it does not allow that:

This is SBCL 2.4.10, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

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.
mmap: Cannot allocate memory
fatal error encountered in SBCL pid 2351 pthread 0x45a408:
Can't allocate 0x80000000 bytes for space 1

Have you tried with a lower memory amount, like:

sbcl --dynamic-space-size 1024 ...

or

sbcl --dynamic-space-size 1500 ...

@barracuda156
Copy link
Author

Ok, cd67e7b (which built before) with 2e9bb0a fails to build now with the same heap error, so nothing to bisect, it is SBCL's bug.

@glv2 sbcl --dynamic-space-size 1024 worked! The build completed successfully now.

@catap I will try to add custom args support into the PG, so that this can work without hacking it manually.

@barracuda156
Copy link
Author

Another run with --dynamic-space-size 1024 failed however. Perhaps need to use a bit higher value to make it reproducible.

@barracuda156
Copy link
Author

@glv2 Yeah, I think it will be fine with 1500.
Closing the issue, thank you!

@catap I will fix that in MacPorts.

barracuda156 added a commit to barracuda156/powerpc-ports that referenced this issue Nov 12, 2024
barracuda156 added a commit to barracuda156/powerpc-ports that referenced this issue Nov 13, 2024
barracuda156 added a commit to barracuda156/powerpc-ports that referenced this issue Nov 17, 2024
barracuda156 added a commit to barracuda156/powerpc-ports that referenced this issue Nov 17, 2024
reneeotten pushed a commit to macports/macports-ports that referenced this issue Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants