"Wrong Architecture" when installing markdown parsers via npm

I'm on Mac OS X 10.7.4. When I try to install robotskirt or node-discount, I get wrong architecture errors. Example:

[1/2] cxx: src/markdown.cc -> build/Release/src/markdown_1.o
[2/2] cxx_link: build/Release/src/markdown_1.o -> build/Release/markdown.node
ld: warning: ignoring file ./libmarkdown.a, file was built for archive which is not the architecture being linked (i386)
Waf: Leaving directory `/Users/jong/node_modules/discount/build'
'build' finished successfully (2.639s)
discount@0.2.3 node_modules/discount

And robotskirt:

[1/7] cc: src/markdown.c -> build/Release/src/markdown_1.o
[2/7] cc: src/array.c -> build/Release/src/array_1.o
[3/7] cc: src/buffer.c -> build/Release/src/buffer_1.o
[4/7] cc: src/html.c -> build/Release/src/html_1.o
[5/7] cxx: src/robotskirt.cc -> build/Release/src/robotskirt_2.o
[6/7] cxx_link: build/Release/src/robotskirt_2.o build/Release/src/markdown_1.o build/Release/src/array_1.o build/Release/src/buffer_1.o build/Release/src/html_1.o -> build/Release/robotskirt.node
[7/7] cc_link: build/Release/src/markdown_1.o build/Release/src/array_1.o build/Release/src/buffer_1.o build/Release/src/html_1.o -> build/Release/libsundown.dylib
ld: warning: ignoring file Release/src/markdown_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/array_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/buffer_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/html_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/markdown_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/array_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/buffer_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file Release/src/html_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
Waf: Leaving directory `/Users/jong/node_modules/robotskirt/build'
'build' finished successfully (0.406s)
robotskirt@0.2.5 node_modules/robotskirt

It looks like a C compiler issue to me, but I know nothing about that. Tickets I've opened: https://github.com/benmills/robotskirt/issues/20#issuecomment-6794474, https://github.com/visionmedia/node-discount/issues/20.

Anyone know how I can fix this, or how I can solve this problem?

You may have more than one C compiler on your path, or a C compiler and a linker that don't match (in particular, one is for x86 and one is x64). Use "which -a gcc" and "which -a ld" to find out where the compiler and linker are being run from. If those commands output more than one thing, you'll want to edit the PATH environment to variable exclude one of those directories and control which version runs.