{"record":{"id":"dc4ccc53d5500705","repo":"mame/quine-relay","slug":"1-interpreter-not-found-dc4ccc","errorCode":null,"errorMessage":"$(1) interpreter not found!","messagePattern":"\\$\\(1\\) interpreter not found!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/Makefile.gen.rb","lineNumber":21,"sourceCode":"OUT = []\n\ndef banner(s1, s2=nil, i=nil)\n  s = \"##  #{ \"#{ i + 1 }: \" if i }#{ s1 }#{ ' -> ' + s2 if s2 }  ##\"\n  OUT << \"\\t@echo\"\n  OUT << \"\\t@echo \\\"#{ \"#\" * s.size }\\\"\"\n  OUT << \"\\t@echo \\\"#{ s }\\\"\"\n  OUT << \"\\t@echo \\\"#{ \"#\" * s.size }\\\"\"\n  OUT << \"\\t@echo\"\nend\n\nOUT << <<-END\nMAKEFLAGS += --no-print-directory\n\nPATH := $(CURDIR)/vendor/local/bin:/usr/games:$(PATH)\nCLASSPATH := .\n\nfind_any0 = $(firstword $(foreach x,$(1),$(if $(shell which $(x) 2>/dev/null),$(x),)))\ncheck = $(if $(2),$(2),$(error $(1) interpreter not found!))\nfind_any = $(call check,$(1),$(call find_any0,$(2)))\n\nJAVASCRIPT   := $(call find_any,JavaScript,nodejs node js)\nSCHEME       := $(call find_any,Scheme,guile csi gosh)\nGBS          := $(call find_any,Gambas script,gbs3 gbs2 gba3)\nWASI_RUNTIME := $(call find_any,WASI runtime,wasmtime node)\n\nifeq ($(SCHEME),csi)\n  SCHEME := csi -s\nendif\nifeq ($(WASI_RUNTIME),node)\n  WASI_RUNTIME := node --experimental-wasi-unstable-preview1 vendor/wasi-runtime.js\nendif\n\n.DELETE_ON_ERROR:\nEND\nOUT << \"all: QR2.rb\"\nbanner(\"CHECK\")","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/mame/quine-relay/blob/c2aa5098d3e95409a36185b16371089dd04db642/src/Makefile.gen.rb#L3-L39","documentation":"src/Makefile.gen.rb is the generator that emits the root Makefile (File.write('../Makefile', ...) at line 80), and line 21 is the heredoc template of the check macro whose $(error $(1) interpreter not found!) aborts make when find_any finds none of the candidate interpreters for JAVASCRIPT (nodejs node js), SCHEME (guile csi gosh), GBS (gbs3 gbs2 gba3), or WASI_RUNTIME (wasmtime node). The error itself manifests at Makefile:7 of the generated file whenever the environment lacks a whole group; pointing at this line means the fix belongs in the generator, not in the generated Makefile (the two must stay in sync, and the Makefile is checksum-tracked via SHA256SUMS).","triggerScenarios":"Running make on a freshly generated Makefile in an environment missing every candidate of a group (no node/js, no guile/csi/gosh, no gbs3/gbs2/gba3, no wasmtime/node); regenerating the Makefile (cd src && rake ../Makefile) after editing the candidate lists without installing the tools; CI images missing /usr/games (gbs3) or vendor/local/bin.","commonSituations":"Maintainers adding a language stage that needs a new runtime and forgetting to extend the candidate lists; environments where an interpreter exists under a different name (deno instead of node, wasmer instead of wasmtime) and nobody added it to the lists; portable builds where gambas is not packaged.","solutions":["First confirm the environment actually has the tools: which nodejs node guile csi gosh gbs3 gbs2 gba3 wasmtime; install what is missing (apt-get install nodejs guile-3.0 gambas3-scripter wasmtime)","To support another runtime, edit the candidate list in this heredoc (e.g. WASI runtime,wasmtime wasmer node) and regenerate with cd src && rake ../Makefile so Makefile and generator stay consistent","Use the repo Dockerfile for a known-good toolchain instead of hand-satisfying every group","Do not hand-edit the generated Makefile: the next rake run will overwrite it and SHA256SUMS will mismatch"],"exampleFix":"# before (src/Makefile.gen.rb heredoc)\nWASI_RUNTIME := $(call find_any,WASI runtime,wasmtime node)\n\n# after -- widen the candidates, then regenerate (cd src && rake ../Makefile)\nWASI_RUNTIME := $(call find_any,WASI runtime,wasmtime wasmer node)","handlingStrategy":"validation","validationCode":"# Before regenerating or running make, confirm each find_any group resolves\n%w[nodejs node js guile csi gosh gbs3 gbs2 gba3 wasmtime].each do |x|\n  puts \"#{x}: #{`which #{x} 2>/dev/null`.empty? ? 'MISSING' : 'ok'}\"\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fix the environment first (install interpreters); only edit src/Makefile.gen.rb to add new candidate runtimes","After editing the generator, regenerate via cd src && rake ../Makefile so the root Makefile and its generator stay in sync","Never hand-edit the generated Makefile: rake overwrites it and SHA256SUMS will mismatch; run make check after regeneration"],"tags":["ruby","make","makefile","code-generation","interpreter","environment"],"backgroundTag":"interpreter-not-found","analyzedSha":"c2aa5098d3e95409a36185b16371089dd04db642","analyzedAt":"2026-08-21T15:28:43.741Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}