node-gyp configure always fails with EXDEV error

I am trying to compile the following MWE, taken essentially from the official Node.js documentation:

#include<v8.h>
#include<node.h>

using namespace v8;

Handle<Value> Method (const Arguments& _args) {
    HandleScope Scp;
    return Scp.Close (String::New ("world"));
}

void Initialize (Handle<Object> _target) {
    _target->Set (
        String.NewSymbol ("hello"),
        FunctionTemplate::New (Method)->GetFunction ()
    );
}

NODE_MODULE ("Hello", Initialize)

The corresponding binding.gyp file is as follows:

{
    "targets": [
        {
            "target_name": "hello",
            "sources": ["hello.cpp"]
        }
    ]
}

When I attempt to run node-gyp configure, I get the following errors:

$ node-gyp configure
info it worked if it ends with ok
info downloading http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz
ERR! Error: EXDEV, link '/usr/lib/nodejs/node-gyp/legacy/tools/gyp/pylib/gyp/easy_xml.pyc'
ERR! not ok
$

I am running the 64-bit version of Fedora 17. Here is the output of uname -a:

Linux localhost.localdomain 3.5.5-2.fc17.x86_64 #1 SMP Wed Oct 3 13:20:37 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Here is some more system information:

$ rpm -q nodejs
nodejs-0.6.18-1.fc17.x86_64
$ rpm -q node-gyp
node-gyp-0.4.1-2.fc17.noarch

Thanks in advance for your help.

I tracked a problem like this (and a related EPERM instead of EXDEV) on my 64 bit FC16 system down to an old version of node-gyp trying to hard link files from the system install location (on the root filesystem) into the ~/.node-gyp cache (on a different filesystem).

This problem was fixed in later node-gyp releases.

For me the solution was going from the "ancient" node and node-gyp distributed via the tchol.org RPM repo with their 0.6 RPM's to a current version of node (0.8.12) which bundles its own npm and node-gyp and doesn't have the bug listed here.