Build fails on gosling, looking for nodefrontend.js

<more make output deleted>
../../src/dialogc -t aa gosling_complete_unicode.dg -o gosling.aastory --no-warn-not-topic
../../bin/aamrun.py gosling.aastory <gosling.in >aamachine.out
ERROR: Could not find nodefrontend.js!
	Current: /Users/sue/workspace/dialog/test/gosling/../../bin/aamrun.py
	Tried: /Users/sue/workspace/dialog/aamachine/src/js/nodefrontend.js
	Tried: /Users/sue/workspace/Aamachine/src/js/nodefrontend.js
make: *** [aamachine.out] Error 2
sue@solfar dialog %

Yeah, that’s a bit of a hack. Since the Å-machine interpreter doesn’t install binaries in any convenient location, I put a wrapper in /bin in the Dialog repository that checks a few different locations for it. On my local machine, I have folders Projects/Dialog and Projects/Aamachine, so it looks (from Dialog/bin) in ../../Aamachine; for the automated tests, it clones the Å-machine repo into the root of the main Dialog directory, so it looks in ../aamachine. If it can’t find the interpreter in either place, it gives that error.

So check out the Ă…-machine repo into one of those locations, or add a line to the wrapper in /bin pointing to the proper location for your local machine.

I have aamachine installed through Homebrew, and I suspect that others may do the same. Perhaps adding the appropriate spot in /opt/homebrew to the directories that are searched might be of use?

A very reasonable idea! I don’t have it installed via Homebrew, so I don’t know what that appropriate spot is, but if you add the path to bin/aamrun.py I think that will be a good improvement.

Will do, in a future PR. Thanks!

(And I’ll check where apt-get drops aamachine on the Linux environment on my Chromebook and add that, too, and we can add a reasonable number of other places if other distros put it somewhere else.)

1 Like

The 6502 test case also expects to find the Å-machine source files in some particular places, but I wouldn’t worry about that one. It’ll already run automatically on every pull request, and I could never figure out how to make it work properly on Mac (it needs a specific assembler to build the 6502 terp).

Kick? I use Kick Assembler on my Mac for 6502 development.

xa65, apparently. I know very little about 6502 development and whether there’s a standard syntax shared between different assemblers, but this is the one listed in the Makefile, so it’s the one I’ve been using in testing.

This is the code I added for the screen size predicates, so if this syntax looks like what you’re used to, it might work with Kick? Take a look in the src/6502 directory and see if the stuff there compiles.

notltheap
	cmp #$20
	bne notwidth
	; Current div width
	lda stflag
	beq mainwidth
	; In status bar
	lda stfullw
	sta result+1
	jmp cdone
mainwidth
	; Not in status bar
	lda screenw
	sta result+1
	jmp cdone
notwidth
	cmp #$21
	bne	cdone
	; Current div height
	lda stflag
	beq mainheight
	; In status bar
	lda stsizey
	sta result+1
	jmp cdone
mainheight
	; Not in status bar
	lda #0
	sta result+1
	jmp cdone

Not the same as Kick, but the current version (2.4.1) is in Homebrew, too.

I can’t find the .js files in the Homebrew installation. Are they included in the package? I see them in the source tree on Github.

They very well might not be, if Homebrew only installs the binaries (aambundle and aamshow). The Node and aambox frontends are mainly meant for testing rather than release, so I wouldn’t be surprised if the formula left them out.