Open ketsuban opened 9 years ago
SBCL needs a binary of SBCL to bootstrap itself. It looks like there haven't been official PowerPC binaries since 0.9.x; I'll have to see if that's new enough to build modern SBCL.
The website says the most recent PPC Darwin binary is 1.0.47, is that of any use?
Wow, that's pretty recent - only four years old. http://sourceforge.net/projects/sbcl/files/sbcl/1.0.47/ PowerPC binaries had been dropped in a number of releases prior to that, so I'd assumed no newer releases would have them.
I'll test this tonight.
Didn't work for me on 10.4: https://gist.github.com/mistydemeo/c77c3375ebe9d679f44d
Need to test on 10.5.
If you want to try this out, I pushed a branch named sbcl
with an update to the sbcl formula.
Tested on 10.5, failed at the same point as in your gist. The release notes for 1.1.2 are the most recent reference to PowerPC, can you piggyback to modernity by building 1.1.2 with 1.0.47 and then 1.2.15 with 1.1.2?
Alternatively, the website says you can build with CMUCL, Clozure CL or CLISP, and the latter builds for me without problems; you might try that. (Edit: On second thoughts, don't do this—building SBCL with CLISP on my PowerBook works, but it takes approximately forever.)
oh my god, I get to cart this out 😍😍😍
Just ran into this myself, I'll try bootstrapping with clisp as well. If it works, should we update the formula to use clisp as bootstrap? Approximately forever is better than never 🤷♂️
@mistydemeo I confirmed that the sbcl
branch fails in the same way as in your gist:
17: (SB-IMPL::REPL-FUN NIL)
18: ((LAMBDA ()))
19: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {11E40145}>)
20: (SB-IMPL::TOPLEVEL-REPL NIL)
21: (SB-IMPL::TOPLEVEL-INIT)
22: ((LABELS SB-IMPL::RESTART-LISP))
unhandled condition in --disable-debugger mode, quitting
this is on an eMac running Tiger.
related: clisp fails to build because of missing libiconv:
/usr/local/bin/gcc-4.2 -m32 -I/usr/local/opt/readline/include -F/usr/local/Frameworks -I/usr/local/include -I/private/tmp/clisp20200429-948-w80xbg/clisp-2.49/src/gllib -w -pipe -mcpu=7450 -faltivec -mmacosx-version-min=10.4 -O0 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -falign-functions=4 -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DDYNAMIC_MODULES -DNO_GETTEXT -I. -w -pipe -mcpu=7450 -faltivec -mmacosx-version-min=10.4 -O0 -c stream.c
stream.d: In function ‘iconv_mblen’:
stream.d:4051: error: ‘iconv’ undeclared (first use in this function)
stream.d:4051: error: (Each undeclared identifier is reported only once
stream.d:4051: error: for each function it appears in.)
stream.d: In function ‘iconv_mbstowcs’:
stream.d:4103: error: ‘iconv’ undeclared (first use in this function)
stream.d: In function ‘iconv_wcslen’:
however, libiconv doesn't symlink itself in to the system paths, so brew install libiconv
doesn't fix building clisp.
would the appropriate path be for me to link libiconv into the system paths, or to patch the clisp formula to rely on libiconv with specific paths?
re: a bootstrapping common lisp, I've verified that versions 1.2, 1.3 and 1.4 of dppccl
work on Tiger/PPC:
1.5 and 1.6 fail with a dyld error:
$ ./dppccl
dyld: lazy symbol binding failed: Symbol not found: _realpath$DARWIN_EXTSN
Referenced from: /private/tmp/ccl-1.5/ccl/./dppccl
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _realpath$DARWIN_EXTSN
Referenced from: /private/tmp/ccl-1.5/ccl/./dppccl
Expected in: /usr/lib/libSystem.B.dylib
Trace/BPT trap
Presumably that's when he started building for Leopard.
nevermind about ccl :(
Creating directory: /private/tmp/sbcl-1.2.14/obj/from-host/src/compiler/ppc/
;Compiler warnings for "src/compiler/parse-lambda-list.lisp" :
; In CHECK-DS-LIST: Conflicting type declarations for COMPILER-ERROR
; In CHECK-DS-LIST: Conflicting type declarations for COMPILER-ERROR
; In CHECK-DS-LIST: Conflicting type declarations for COMPILER-ERROR
; In CHECK-DS-LIST/&REST: Conflicting type declarations for COMPILER-ERROR
; In CHECK-DS-LIST/&REST: Conflicting type declarations for COMPILER-ERROR
; In CHECK-DS-LIST/&KEY: Conflicting type declarations for COMPILER-ERROR
; In CHECK-DS-LIST/&KEY: Conflicting type declarations for COMPILER-ERROR
; In CMACRO-CHECK-DS-LIST/&KEY: Conflicting type declarations for COMPILER-ERROR
; In CMACRO-CHECK-DS-LIST/&KEY: Conflicting type declarations for COMPILER-ERROR
> Error: FAILURE-P was set when creating "obj/from-host/src/compiler/parse-lambda-list.dfsl".
> While executing: COMPILE-STEM, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Continue, using possibly bogus file "obj/from-host/src/compiler/parse-lambda-list.dfsl"
> Type :? for other options.
Re: the clisp libiconv problem, this was apparently fixed in 2017, and in fact there have been a huge number of commits to clisp in the past few years, but strangely the last official release was 10 years ago?!?
@ketsuban SBCL 2.0.9 builds for PPC: https://trac.macports.org/ticket/65188 Apparently even 2.2.2 builds: https://trac.macports.org/ticket/65484
If anyone wants to experiment, here PPC is restored into 2.3.0: https://github.com/barracuda156/sbcl-ppc/tree/ppc
@barracuda156 fantastic! I'll dust this off for https://github.com/cellularmitosis/leopard.sh
@barracuda156 fantastic! I'll dust this off for https://github.com/cellularmitosis/leopard.sh
@cellularmitosis I would suggest building 2.0.9 (there are two versions of portfiles in those tickets, but if it does not work, I can share mine from a local machine). 2.3.0 builds to some point but then freezes here: https://trac.macports.org/ticket/65188#comment:33 (no solution for that yet).
P. S. I recall we discussed your project briefly on Macrumors?
Error message is "make-host-1.sh: line 34: /private/tmp/sbcl--bootstrap3220150904-30319-1k4z49v/sbcl-1.1.6-x86-darwin/src/runtime/sbcl: Bad CPU type in executable".
https://gist.github.com/Ketsuban/6b0a4f7b9bd154b36d88