Skip to content
Snippets Groups Projects

Replace clisp with ecl for cross-compiling sbcl

Closed Lee Starnes requested to merge lstarnes/packages:sbcl-ecl into current

clisp doesn't work well on big endian, but ecl apparently does. So this MR adds ecl and switches sbcl to compile with it.

Edited by Lee Starnes

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Lee Starnes added 1 commit

    added 1 commit

    Compare with previous version

  • Lee Starnes added 1 commit

    added 1 commit

    • 0f5fbe29 - user/ecl, experimental/sbcl: correct dependencies

    Compare with previous version

  • Lee Starnes added 1 commit

    added 1 commit

    • 53ebdf82 - user/ecl: !check because it needs install before check

    Compare with previous version

  • Lee Starnes marked as a Work In Progress

    marked as a Work In Progress

  • Lee Starnes added 1 commit

    added 1 commit

    Compare with previous version

  • Lee Starnes added 1 commit

    added 1 commit

    • 8a140433 - sbcl: add missed libffcall dep

    Compare with previous version

  • Lee Starnes added 3 commits

    added 3 commits

    • 1146c9ab - user/ecl: don't use vendored libs
    • 5f44e00e - experimental/sbcl: patch for musl ppc mcontext access
    • a083d4af - user/clisp: remove

    Compare with previous version

  • Lee Starnes unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Lee Starnes changed title from WIP: Replace clisp with ecl for compiling sbcl to Replace clisp with ecl for cross-compiling sbcl

    changed title from WIP: Replace clisp with ecl for compiling sbcl to Replace clisp with ecl for cross-compiling sbcl

  • I'm testing these changes out on ppc64.

    I removed the change to delete clisp, but otherwise it's the same.

    SBCL builds and passes most tests. Then I get dropped into a debug prompt:

    ...
    obj/from-xc/src/code/last-file.lisp-obj
    ; SB-Loader: (221+699+10778+117+10065) structs/vars/funs/methods/other
    SB-XC:*FEATURES* =
    (:PPC64 :GENCGC :64-BIT :ALIEN-CALLBACKS :ANSI-CL :BIG-ENDIAN :COMMON-LISP
     :COMPARE-AND-SWAP-VOPS :DLCLOSE-IS-NOOP :ELF :IEEE-FLOATING-POINT
     :LINKAGE-TABLE :LINUX :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR
     :OS-PROVIDES-DLOPEN :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC
     :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :SB-DOC :SB-EVAL :SB-FUTEX
     :SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-LOCATIONS :SB-THREAD :SB-UNICODE :SBCL
     :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
     :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS :UNIX :UNTAGGED-FDEFNS)
    [building initial core file in "output/cold-sbcl.core": 
    writing 0 bytes [0 pages] from #<gspace @#x4000000 :READ-ONLY>
    writing 65536 bytes [1 page] from #<gspace @#x4100000 :STATIC>
    writing 41025536 bytes [626 pages] from #<gspace @#x1000000000 :DYNAMIC>
    movable dynamic space: 377 boxed pages, 247 code pages
    /INITIAL-FUN=#X10024E9236
    done]
    //testing for consistency of first and second GENESIS passes
    //header files match between first and second GENESIS -- good
    //entering make-target-2.sh
    //doing warm init - compilation phase
    This is SBCL 2.0.5, 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.
    Initial page table:
    Gen  Boxed   Code    Raw  LgBox LgCode  LgRaw  Pin       Alloc     Waste        Trig      WP GCs Mem-age
     6     377    247      0      0      0      0    0    40847008     47456     2000000     624   0  0.0000
               Total bytes allocated    =      40847008
               Dynamic-space-size bytes =    1073741824
    CORRUPTION WARNING in SBCL pid 285582(tid 0x7fffbb262670):
    Memory fault at 0x3c4c00063842b2b0 (pc=0x3c4c00063842b2b0)
    The integrity of this image is possibly compromised.
    Exiting.
    Welcome to LDB, a low-level debugger for the Lisp runtime environment.
    ldb>

    I will try updating to the latest versions of ecl and sbcl to see if it makes any difference.

    Then I will try build sbcl with clisp (which has been updated and patch situation improved).

    If either of them work, we'll keep the working one. If both fail, it's probably a bug in SBCL.

  • With sbcl 2.2.4 and ecl 21.2.1, it's worse:

    ...
    ;;; Warning:
    ;;;   in file knownfun.lisp, position 3628
    ;;;   at (DEFUN %DEFKNOWN ...)
    ;;;   ! Unsupported CONS type (OR CTYPE (CONS (EQL FUNCTION)) (MEMBER :GENERIC-FUNCTION)). Replacing it with T.
    ;;; End of Pass 1.
    ;;; Finished compiling src/compiler/knownfun.lisp.
    ;;;
    ;;; Loading "/root/packages/experimental/sbcl/src/sbcl-2.2.4/obj/from-host/src/compiler/knownfun.fas"
    ;;;
    ;;; Compiling src/compiler/ctype.lisp.
    ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=2
    ;;;
    ;;; End of Pass 1.
    ;;; Finished compiling src/compiler/ctype.lisp.
    ;;;
    ;;; Loading "/root/packages/experimental/sbcl/src/sbcl-2.2.4/obj/from-host/src/compiler/ctype.fas"
    ;;;
    ;;; Compiling src/compiler/fndb.lisp.
    ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=2
    ;;;
    ;;; End of Pass 1.
    ;;; Finished compiling src/compiler/fndb.lisp.
    ;;;
    ;;; Loading "/root/packages/experimental/sbcl/src/sbcl-2.2.4/obj/from-host/src/compiler/fndb.fas"
    ;;;
    ;;; Compiling src/compiler/generic/vm-fndb.lisp.
    ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=2
    ;;;
    ;;; End of Pass 1.
    ;;; Finished compiling src/compiler/generic/vm-fndb.lisp.
    ;;;
    ;;; Loading "/root/packages/experimental/sbcl/src/sbcl-2.2.4/obj/from-host/src/compiler/generic/vm-fndb.fas"
    An error occurred during initialization:
    bad modulus specified for MOD type specifier: 0.
    >>> ERROR: sbcl: build failed
  • Keeping SBCL the same, ecl at 21.2.1 makes no difference w.r.t. the memory error mentioned earlier.

  • Zach van Rijn changed target branch from master to current

    changed target branch from master to current

  • Lee Starnes added 2348 commits

    added 2348 commits

    • a083d4af...fc4df5a4 - 2337 commits from branch adelie:current
    • 03743f9e - user/ecl: new package
    • f5bf16a6 - experimental/sbcl: switch to ecl for cross-compile
    • 2eb4367d - user/ecl: fox
    • d7106d33 - user/ecl, experimental/sbcl: correct dependencies
    • 71bd7ca8 - user/ecl: !check because it needs install before check
    • 500323c0 - sbcl: ppc64 is not ppc32
    • 221b2801 - sbcl: add missed libffcall dep
    • 10a64020 - user/ecl: don't use vendored libs
    • 4c450992 - experimental/sbcl: patch for musl ppc mcontext access
    • 37608b81 - user/clisp: remove
    • 405c4da8 - user/ecl: bump to 21.2.1

    Compare with previous version

  • Author Contributor

    I just rebased. Unfortunately the "bad modulus specified" error still happens on newer SBCL, but it successfully compiles with newer ECL and older SBCL.

  • Zach van Rijn added 396 commits

    added 396 commits

    • 405c4da8...b6e783ee - 385 commits from branch adelie:current
    • 846d418e - user/ecl: new package
    • 509b47ee - experimental/sbcl: switch to ecl for cross-compile
    • e1e1f0a1 - user/ecl: fox
    • 36426d28 - user/ecl, experimental/sbcl: correct dependencies
    • 888e97fc - user/ecl: !check because it needs install before check
    • daa46d6f - sbcl: ppc64 is not ppc32
    • d971c337 - sbcl: add missed libffcall dep
    • da46a3fd - user/ecl: don't use vendored libs
    • f5edb1db - experimental/sbcl: patch for musl ppc mcontext access
    • 195e9557 - user/clisp: remove
    • 74508391 - user/ecl: bump to 21.2.1

    Compare with previous version

  • closed

Please register or sign in to reply
Loading