[Nix-dev] Re: Error: NIX on a little big file system
Eelco Dolstra
e.dolstra at tudelft.nl
Tue Nov 24 15:33:42 CET 2009
Pjotr Prins wrote:
> Hi Eelco,
>
> When I run Nix on a big file system I get:
>
> root at pjotr-32:~/svn/nixpkgs# nix-env -f . -i cmake --show-trace
> installing `cmake-2.6.4'
> error: while instantiating the derivation named `cmake-2.6.4' at `/home/pjotr/svn/nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix:4:7':
> while evaluating the derivation attribute `setupHook' at `/home/pjotr/svn/nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix:9:12':
> preallocating file of 1087 bytes: Value too large for defined data type
Sounds like a bug in the kernel or in the NFS (?) server.
As a workaround, you can look for this bit of code in src/libutil/archive.cc:
#if HAVE_POSIX_FALLOCATE
if (len) {
errno = posix_fallocate(fd, 0, len);
/* Note that EINVAL may indicate that the underlying
filesystem doesn't support preallocation (e.g. on
OpenSolaris). Since preallocation is just an
optimisation, ignore it. */
if (errno && errno != EINVAL)
throw SysError(format("preallocating file of %1% bytes") % len);
}
#endif
and change the "#if HAVE_POSIX_FALLOCATE" to "#if 0", or ignore EOVERFLOW just
like EINVAL.
We could also just ignore all errors from posix_fallocate, since it's just an
optimisation anyway.
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list