igorklopov / enclose

Compile your Node.js project into an executable
http://enclosejs.com
Other
936 stars 43 forks source link

execute x86 bin in x64 environment #67

Closed mrbigmouth closed 9 years ago

mrbigmouth commented 9 years ago

Environment is Ubuntu 14.04.1 64bit. After execute command "enclose", see error below:

/usr/local/lib/node_modules/enclose/bin/enclose.js:118 if (error) throw error; ^ Error: Compiler not found for v0.12.7-linux-x86 at ChildProcess. (/usr/local/lib/node_modules/enclose/bin/enclose.js:166:10) at ChildProcess.emit (events.js:95:17) at Process.ChildProcess._handle.onexit (child_process.js:818:12)

It's because enclose-v4.2.2-linux-x86-bb37fdb is not a executeable file in x64 environment. I think your code: https://github.com/igorklopov/enclose/blob/master/bin/enclose.js#L85 should be return a "x64" string?

igorklopov commented 9 years ago

AFAIK it becomes an executable if you have i386 libraries. So, EncloseJS installs all compilers, including x86. And you should set via --x64 flag. By the way you can use the function system() like in examples.

igorklopov commented 9 years ago

https://github.com/igorklopov/enclose/blob/master/examples/03-require/compile.js#L6 https://github.com/igorklopov/enclose/blob/master/bin/enclose.js#L89

mrbigmouth commented 9 years ago

I mean: when I first run "enclose" for help text, the errror happen! .....that mean I don't know I should add -x64 flag even environment is x64. XD

igorklopov commented 9 years ago

:) indeed. Thanks - i will fix it

igorklopov commented 9 years ago

Fixed that. Please retry if you have time. Thanks!

mrbigmouth commented 9 years ago

It's ok now