Hello,

For the record I replicated the problem with the latest nix-1.6.1. From my 
reading of the man 2 mount page the first argument should be "/dev/shm" not 
"none".

Thanks,
FDS

From: Federico Sacerdoti
Sent: Wednesday, February 26, 2014 5:53 PM
To: '[email protected]'
Subject: build-chroot-dirs mount problem

Hello,

I've been using NIX for years, and like it very much. I'm trying to build a 
package (R, one of my favorites) in a chroot environment. I'm using nix-1.5.3 
and running with multiple build users, etc.

$ cat /etc/nix/nix.conf
build-users-group = nix-builders
use-sqlite-wal = false

# TODO: This disrupts any script with #!/bin/bash
build-use-chroot = true

# Try for building R
build-chroot-dirs = 
/bin=/nix/store/7mjplwq1r0agngqj2058hl5z8kb3w15g-bash-4.2-p42/bin

When I try to build I see on stderr:

error: failed to set up the build environment for 
`/nix/store/hlll5ykl3dbfpmrkz6j64xh8a7ifz30k-R-3.0.1-7.drv'

When I strace the nix-daemon I see a strange call to mount:

26146 lstat("/dev/shm", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=200, ...}) = 0
26146 mount("none", 
"/nix/store/hlll5ykl3dbfpmrkz6j64xh8a7ifz30k-R-3.0.1-7.drv.chroot/dev/shm", 
"tmpfs", 0, NULL) = -1 ENOENT (No such file or directory)
26146 futex(0x7feca7bcd1a4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
26146 write(2, "build error: mounting /dev/shm: No such file or directory\n", 
58) = 58

Seems this fails because the source = "none", which doesn't exist (ENOENT). I 
must be doing something wrong.

Thanks
FDS

________________________________

Note: This email is for the confidential use of the named addressee(s) only and 
may contain proprietary, confidential or privileged information. If you are not 
the intended recipient, you are hereby notified that any review, dissemination 
or copying of this email is strictly prohibited, and to please notify the 
sender immediately and destroy this email and any attachments. Email 
transmission cannot be guaranteed to be secure or error-free. The Company, 
therefore, does not make any guarantees as to the completeness or accuracy of 
this email or any attachments. This email is for informational purposes only 
and does not constitute a recommendation, offer, request or solicitation of any 
kind to buy, sell, subscribe, redeem or perform any type of transaction of a 
financial product.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to