Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

make doesn't work in NFS directory due to flock #4064

Closed
clange opened this issue Sep 28, 2012 · 2 comments
Closed

make doesn't work in NFS directory due to flock #4064

clange opened this issue Sep 28, 2012 · 2 comments
Labels

Comments

@clange
Copy link

clange commented Sep 28, 2012

I tried to build Node.js in my home directory on a university computer. The home partition is mounted as follows:

HOST:/vol/vol1/staff on /home/staff type nfs (rw,nosuid,hard,intr,actimeo=120,sloppy,vers=4,addr=IP,clientaddr=CLIENTIP)

The build process failed at some point saying:

  flock /home/staff/langec/download/node-v0.8.11/out/Release/linker.lock g++ -pthread -rdy
namic -m64  -o /home/staff/langec/download/node-v0.8.11/out/Release/mksnapshot -Wl,--start
-group /home/staff/langec/download/node-v0.8.11/out/Release/obj.target/mksnapshot/deps/v8/
src/mksnapshot.o /home/staff/langec/download/node-v0.8.11/out/Release/obj.target/deps/v8/t
ools/gyp/libv8_base.a /home/staff/langec/download/node-v0.8.11/out/Release/obj.target/deps
/v8/tools/gyp/libv8_nosnapshot.a -Wl,--end-group 
flock: /home/staff/langec/download/node-v0.8.11/out/Release/linker.lock: Input/output erro
r
make[1]: *** [/home/staff/langec/download/node-v0.8.11/out/Release/mksnapshot] Error 65
make[1]: Leaving directory `/home/staff/langec/download/node-v0.8.11/out'
make: *** [node] Error 2

This is because NFS doesn't support this kind of file locking.

Building in /tmp and then copying to the actual target directory worked.

@TooTallNate
Copy link

You can probably work around this by invoking make like:

$ LINK=g++ make

@bnoordhuis
Copy link
Member

Noted, though there is not much we can (or should) do about that except for documenting the workaround that @TooTallNate described.

In theory, file locks work with NFS v4 but they're kind of spotty in practice - the failure cases are both interesting and numerous.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants