tessel / t1-runtime

[UNMAINTAINED] Tessel 1 JavaScript runtime.
Other
117 stars 33 forks source link

Error when colony invokes sh #663

Closed LinusU closed 10 years ago

LinusU commented 10 years ago

I'm hitting an error when trying to run colony on my MacBook Air running OS X 10.10 Yosemite. When I try to run even the simplest scripts I get the error sh: -m: command not found. The exit status code is 0.

➜  runtime git:(master) ✗ cat test.js
console.log('Linus');

➜  runtime git:(master) ✗ out/Release/colony test.js
sh: -m: command not found

Running colony without a script parameter provides the correct behaviour.

➜  runtime git:(master) ✗ out/Release/colony        
Usage: colony script.js

I followed the steps in the README.md to install everything, that is:

brew tap tessel/tools
brew install gyp ninja
brew install gcc-arm
git clone https://github.com/tessel/runtime.git
cd runtime
make update
make colony
make test
natevw commented 10 years ago

The trouble is an empty string in https://github.com/tessel/runtime/blob/052f5d8d7cbc8049a480ec5016f1bb452273c2d5/src/colony/lua/preload.lua#L82 and the workaround is:

diff --git a/Makefile b/Makefile
index ae29180..2beb9c0 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ endif
 compile = \
     $(CCENV) gyp $(join config/, $(1)) --depth=. -f $(GYPTARGET) \
         -D builtin_section=.rodata -D node_version=$(NODE_VERSION) \
+        -D compiler_path="$(shell pwd)/node_modules/colony-compiler/bin/colony-compiler.js" \
         -D enable_ssl=$(ENABLE_TLS) -D enable_net=$(ENABLE_NET) &&\
     ninja -C out/$(CONFIG)

…but @kevinmehall should be landing this or similar fix soon AFAICT.

LinusU commented 10 years ago

Thanks for the quick help, got it working now :)