higepon / mosh

Mosh is a free and fast interpreter for Scheme as specified in the R6RS.
http://mosh.monaos.org/
Other
181 stars 13 forks source link

Errors with the ./gen-git-build.sh #246

Closed bentxt closed 1 year ago

bentxt commented 1 year ago

When I first ran ./gen-git-build.sh on macos Ventura 13.1, I got this error

$ ./gen-git-build.sh
...
gmake -C runtimes/srfi-mosh # Bootstrap using vanilla-mosh and psyntax-mosh
gmake[1]: Entering directory '/Users/ben/builds/mosh-scheme/mosh.git/boot/runtimes/srfi-mosh'
mosh -5 bootstrap.vanilla-mosh/phase0.vanilla-mosh.scm
loading nmosh runtime
macro disabled.
loading alexpander
expanding...
dump(BOOT0.fasl)..
mosh bootstrap.psyntax-mosh/phase1.psyntax-mosh.ss
expanding...
writing BOOT1.exp
mosh -5 bootstrap.vanilla-mosh/phase2.scm

 Exception:
    error in raise: unhandled exception has occurred

 Condition components:
    1. &assertion
    2. &who: memv
    3. &message: "list required, but got (#<box> . #<box>)"
    4. &irritants: ()

 Stack trace:
    1. throw: <subr>
    2. memv: <subr>
    3. (&expand~1zQhRU0~1876 &t~1zQhRU0~9834):  #<transcoded-textual-input-port #<binary-input-port BOOT1.exp>>:50
    4. (lambda (&es~1zQhRU0~9363) ...):  (UTF8Codec.cpp func) src/UTF8Codec.cpp:79 50c7a70
gmake[1]: *** [Makefile:16: nmosh_image.cpp] Error 255
gmake[1]: Leaving directory '/Users/ben/builds/mosh-scheme/mosh.git/boot/runtimes/srfi-mosh'
gmake: *** [Makefile:36: runtimes/srfi-mosh/nmosh_image.cpp] Error 2
gmake: Leaving directory '/Users/ben/builds/mosh-scheme/mosh.git/boot'
higepon commented 1 year ago

Thank you for trying Mosh. I was able to reproduce this but no clue what's happening there. This is probably GC issue. Could you try GC_DONT_GC=1 ./gen-git-build.sh instead of ./gen-git-build.sh?

bentxt commented 1 year ago

I did try it with and here's the error output

$ GC_DONT_GC=1 ./gen-git-build.sh
...
expanding(R5RS) mosh-exceptions.scm with ((rnrs) (nmosh conditions))
expanding(R5RS) expander.scm with ((rnrs base))
expanding(R6RS) init.ss
 program
compile...
writing boot image...
done.
done.
gmake[1]: Leaving directory '/Users/ben/builds/mosh-scheme/mosh.git/boot/runtimes/srfi-mosh'
cp runtimes/srfi-mosh/nmosh_image.cpp ../src/nmosh_image.cpp
gmake: Leaving directory '/Users/ben/builds/mosh-scheme/mosh.git/boot'
generating free-vars-decl.scm
gmake: Entering directory '/Users/ben/builds/mosh-scheme/mosh.git/boot'
gmake: 'free-vars-decl.scm' is up to date.
gmake: Leaving directory '/Users/ben/builds/mosh-scheme/mosh.git/boot'
gmake: 'src/Instruction.h' is up to date.
bison -p "number_yy" -d src/NumberReader.y -o src/NumberReader.tab.cpp
src/NumberReader.y:124.1-5: invalid directive: `%code'
src/NumberReader.y:125.1-127.1: syntax error, unexpected {...}
gmake: *** [Generate.mk:41: src/NumberReader.tab.cpp] Error 1
okuoku commented 1 year ago

macOS have incompatible version of bison so you'll have to set PATH to Homebrew(or whatever) provided bison e.g.) export PATH=/usr/local/opt/bison/bin:$PATH

bentxt commented 1 year ago

thanks your solution worked:

brew install bison
export PATH=/usr/local/opt/bison/bin:$PATH
GC_DONT_GC=1 ./gen-git-build.sh