> CoffeeScript suggests `npm install coffee-script`, so (also being
> interested in Node) I used the OS X Node installer.
>
> On the above command, the error was `env: node: Bad CPU type in
> executable`.
On what computer? Node requires an Intel-compatible processor.
What does `file $(which node)` say?
The Core processor is a 32-bit processor, and the pre-compiled Mac binaries are built for 64-bit only, and thus require a Core 2 processor or newer. That explains the "Bad CPU type" error you saw.
As for the compilation problems, in MacPorts, we've restricted Node to Snow Leopard (10.6) and up, since recent versions seemed to have problems on 10.5 and earlier.
Consider upgrading to Snow Leopard; it is faster than Leopard and more able to run modern programs like Node. Snow Leopard was only $29 when Apple was selling it; you can probably find it for less used now.
What kind of problems? I'm quite sure that 0.6.6 compiles and runs on
10.5 but please report any issues and I'll happily fix them.
We disabled nodejs in Leopard and earlier in MacPorts in response to this report that nodejs 0.6.2 crashed on Leopard:
http://groups.google.com/group/nodejs/browse_thread/thread/e4bbdec19f281746/7d5e6fed8e0861c5
And this report that nodejs 0.6.2 compilation failed on Tiger:
https://trac.macports.org/ticket/32218
But upon further testing now, I see that 0.6.6 does work for me on Leopard. So I have requested that we allow installation on Leopard again:
Doing a pull on the latest v0.6 branch I get:
[33/35] cxx: src/platform_darwin.cc -> out/Release/src/platform_darwin_5.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=0
-DARCH="x64" -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter
-D_FORTIFY_SOURCE=2 -IRelease/src -I../src -IRelease/deps/http_parser
-I../deps/http_parser -IRelease/deps/uv/include -I../deps/uv/include
-IRelease/deps/uv/src/ares -I../deps/uv/src/ares
-IRelease/deps/v8/include -I../deps/v8/include -I/opt/local/include
-Ideps/v8/include ../src/platform_darwin.cc -c -o
Release/src/platform_darwin_5.o
In file included from ../src/platform_darwin_proctitle.cc:34,
from ../src/platform_darwin.cc:59:
/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:70:35:
error: SecurityHI/SecurityHI.h: No such file or directory
Waf: Leaving directory `/Users/tanepiper/build/node/out'
Build failed: -> task failed (err #1):
{task: cxx platform_darwin.cc -> platform_darwin_5.o}
make: *** [program] Error 1
Up till now, it's compiled file on this machine - won't be an issue
for me after Monday, my new job starts and I'm on a Lion machine, but
there are compilation issues on systems < Lion
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
> Can confirm I've not been able to install > v0.6.4 on 10.6.8 with the
> GCC compile tools from XCode.
0.6.6 builds and runs fine on Leopard. All versions of 0.6 have built and run fine for me on Snow Leopard.
> Doing a pull on the latest v0.6 branch I get:
>
> [33/35] cxx: src/platform_darwin.cc -> out/Release/src/platform_darwin_5.o
> /usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_FDATASYNC=0
> -DARCH="x64" -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter
> -D_FORTIFY_SOURCE=2 -IRelease/src -I../src -IRelease/deps/http_parser
> -I../deps/http_parser -IRelease/deps/uv/include -I../deps/uv/include
> -IRelease/deps/uv/src/ares -I../deps/uv/src/ares
> -IRelease/deps/v8/include -I../deps/v8/include -I/opt/local/include
> -Ideps/v8/include ../src/platform_darwin.cc -c -o
> Release/src/platform_darwin_5.o
> In file included from ../src/platform_darwin_proctitle.cc:34,
> from ../src/platform_darwin.cc:59:
> /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:70:35:
> error: SecurityHI/SecurityHI.h: No such file or directory
> Waf: Leaving directory `/Users/tanepiper/build/node/out'
> Build failed: -> task failed (err #1):
> {task: cxx platform_darwin.cc -> platform_darwin_5.o}
> make: *** [program] Error 1
There are only a dozen reports of this error on Google and half of them are yours. Sounds like something broken in your computer's Carbon framework. I'd reinstall the OS.
Most likely because I installed GGC tools instead of the full XCode3
package, this may be what's breaking it (and therefor maybe should be
documented you *need* XCode on Snow/Leopard instead of just the GCC
tools)
But as I said, as of Monday I'm personally not going to care any more
as I'll be moving to Lion with my new job so mehh
- Tane
Is there any way to build node with just GCC and *without* installing
all of XCode?
> Any progress on this issue? I'm running into the same thing.
Monitor this upstream bug report:
http://code.google.com/p/v8/issues/detail?id=1936
> Is there any way to build node with just GCC and *without* installing
> all of XCode?
Nobody on OS X installs "just GCC without Xcode" so you're in unknown territory. I suggest you simply install Xcode the way everybody else does.