From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Vorobiev Subject: Re: Daemon update Date: Tue, 26 May 2015 22:27:41 -0500 Message-ID: References: <87siasirgo.fsf@gnu.org> <87a8wy5oet.fsf@gnu.org> <877fs0k9ox.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11470c7825e1ec051707d5bf Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxS0t-00041n-69 for guix-devel@gnu.org; Tue, 26 May 2015 23:28:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxS0q-00059b-T1 for guix-devel@gnu.org; Tue, 26 May 2015 23:28:15 -0400 In-Reply-To: <877fs0k9ox.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel@gnu.org --001a11470c7825e1ec051707d5bf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ok, I have just tried to build the binary tarball on a VM where I reproduced all the paths I want (basically, instead of /gnu I want /shared/shape_tier3/common/local/guix) and which has c++11 compliant gcc -- that also failed. I pulled today's git and ran guix-daemon --no-substitutes. The error seems to be "unable to fork: Operation not permitted". I am running guix-daemon as myself and I have all permissions to the /.../local/guix): GUIX_PACKAGE_PATH=3D \ ./pre-inst-env "/usr/bin/guile" \ "./build-aux/make-binary-tarball.scm" "x86_64-linux" "guix-binary.x86_64-linux.tar.xz" ......... | recursively deleting path `/shared/shape_tier3/common/local/guix/store/m38laca1idmvx8m03dl6b5qmn8xhv9= c3-guile-bootstrap-2.0.drv.chroot' | lock released on `/shared/shape_tier3/common/local/guix/store/pgs6vqy03wg2m5mn2ahvi4sarx89vn= ls-guile-bootstrap-2.0.lock' | building of `/shared/shape_tier3/common/local/guix/store/m38laca1idmvx8m03dl6b5qmn8xhv9= c3-guile-bootstrap-2.0.drv': goal destroyed Backtrace: In ice-9/boot-9.scm: 157: 11 [catch #t # ...] In unknown file: ?: 10 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 9 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 8 [eval # #] In ice-9/boot-9.scm: 2401: 7 [save-module-excursion #] 4052: 6 [#] In unknown file: ?: 5 [load-compiled/vm "/home/alex/.cache/guile/ccache/2.0-LE-8-2.0/home/alex/src/guix/build-aux/m= ake-binary-tarball.scm.go"] In build-aux/make-binary-tarball.scm: 38: 4 [#] In guix/store.scm: 986: 3 [run-with-store # ...] In build-aux/make-binary-tarball.scm: 41: 2 [# #] In guix/store.scm: 933: 1 [# #] 624: 0 [build-things # #] guix/store.scm:624:0: In procedure build-things: guix/store.scm:624:0: Throw to key `srfi-34' with args `(#)'. Makefile:4331: recipe for target 'guix-binary.x86_64-linux.tar.xz' failed make: [guix-binary.x86_64-linux.tar.xz] Error 1 (ignored) Thanks, Alex On Fri, May 22, 2015 at 8:45 AM, Ludovic Court=C3=A8s wrote: > Alexander Vorobiev skribis: > > > Doesn't binary distribution have hardcoded /gnu/* paths? > > Yes it does. > > > I can't use those unfortunately. We have a standard configuration of > > RHEL 6.5 installed on hundreds of servers and any modifications of the > > root directory (and all other "standard" directories) layout are out > > of question. > > OK. Note that using a store other than /gnu/store prevents you from > using substitutes from hydra.gnu.org (just mentioning it if that is of > interest to you.) > > > Would it be too hard to add an environment variable(s) pointing to a > > Guix's store and cache directories so that the binary build of the > > daemon doesn't depend on the hardcoded values? Thanks, Alex > > There are two issues here: > > 1. File names hard-coded in the RUNPATH and other places of the > =E2=80=98guix-daemon=E2=80=99 binary of the tarball. > > 2. The store directory that =E2=80=98guix-daemon=E2=80=99 targets. > > #2 can actually be changed at run-time via the (purposefully > undocumented) =E2=80=98NIX_STORE_DIR=E2=80=99 environment variable (see = =E2=80=98test-env.in=E2=80=99 in > the source tree.) > > #1 means that if you want to run the =E2=80=98guix-daemon=E2=80=99 binary= from the > binary tarball, you=E2=80=99ll have to somehow satisfy its requirements. = You > might be able to unpack the tarball in an arbitrary directory, and then > define =E2=80=98LD_LIBRARY_PATH=E2=80=99 so that =E2=80=98guix-daemon=E2= =80=99 finds all the .so files > that it needs and are provided by the binary tarball (libstdc++.so, > libgcrypt.so, libsqlite3.so, libc.so, etc.) > > Once =E2=80=98guix-daemon=E2=80=99 is running, you could run =E2=80=98gui= x environment guix=E2=80=99, > and from there you could build Guix from source. > > But that is really hacky, and perhaps not particularly easier than > building a newer GCC on your machine. > > Alternately, you could build a suitable binary tarball on another > machine: just install and configure Guix with the options that you need, > and run =E2=80=98make guix-binary.x86_64-linux.tar.xz=E2=80=99. > > WDYT? > > Ludo=E2=80=99. > --001a11470c7825e1ec051707d5bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ok, I have just tried to build the binary tarball on a VM = where I reproduced all the paths I want (basically, instead of /gnu I want = /shared/shape_tier3/common/local/guix) and which has c++11 compliant gcc --= that also failed. I pulled today's git and ran guix-daemon --no-substi= tutes. The error seems to be=C2=A0"unable to fork: Operation not permi= tted". I am running guix-daemon as myself and I have all permissions t= o the /.../local/guix):

GUIX_PACKAGE_PATH=3D \
./pre-inst-env "/usr/bin/guile" =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 \
=C2=A0 "./build-aux/make-bina= ry-tarball.scm" "x86_64-linux" "guix-binary.x86_64-linu= x.tar.xz"

.........

=
| =C2=A0 recursively deleting path `/shared/shape_tier3= /common/local/guix/store/m38laca1idmvx8m03dl6b5qmn8xhv9c3-guile-bootstrap-2= .0.drv.chroot'
| =C2=A0 lock released on `/shared/shape_tier3= /common/local/guix/store/pgs6vqy03wg2m5mn2ahvi4sarx89vnls-guile-bootstrap-2= .0.lock'
| =C2=A0 building of `/shared/shape_tier3/common/loc= al/guix/store/m38laca1idmvx8m03dl6b5qmn8xhv9c3-guile-bootstrap-2.0.drv'= : goal destroyed
Backtrace:
In ice-9/boot-9.scm:
<= div>=C2=A0157: 11 [catch #t #<catch-closure 198d7e0> ...]
I= n unknown file:
=C2=A0 =C2=A0?: 10 [apply-smob/1 #<catch-closu= re 198d7e0>]
In ice-9/boot-9.scm:
=C2=A0 63: 9 [call= -with-prompt prompt0 ...]
In ice-9/eval.scm:
=C2=A0432:= 8 [eval # #]
In ice-9/boot-9.scm:
2401: 7 [save-module= -excursion #<procedure 19aa9c0 at ice-9/boot-9.scm:4045:3 ()>]
<= div>4052: 6 [#<procedure 19aa9c0 at ice-9/boot-9.scm:4045:3 ()>]
In unknown file:
=C2=A0 =C2=A0?: 5 [load-compiled/vm "= /home/alex/.cache/guile/ccache/2.0-LE-8-2.0/home/alex/src/guix/build-aux/ma= ke-binary-tarball.scm.go"]
In build-aux/make-binary-tarball.= scm:
=C2=A0 38: 4 [#<procedure 19bd840 ()>]
In gu= ix/store.scm:
=C2=A0986: 3 [run-with-store # ...]
In bu= ild-aux/make-binary-tarball.scm:
=C2=A0 41: 2 [#<procedur= e 315e840 at build-aux/make-binary-tarball.scm:40:7 (state)> #]
In guix/store.scm:
=C2=A0933: 1 [#<procedure 3aac870 at guix= /store.scm:932:28 (store)> #]
=C2=A0624: 0 [build-things # #]<= /div>

guix/store.scm:624:0: In procedure build-things:
guix/store.scm:624:0: Throw to key `srfi-34' with args `(#<= condition &nix-protocol-error [message: "unable to fork: Operation= not permitted" status: 1] 3d65f60>)'.
Makefile:4331:= recipe for target 'guix-binary.x86_64-linux.tar.xz' failed
make: [guix-binary.x86_64-linux.tar.xz] Error 1 (ignored)

Thanks,
Alex
<= div class=3D"gmail_extra">
On Fri, May 22, 20= 15 at 8:45 AM, Ludovic Court=C3=A8s <ludo@gnu.org> wrote:
Alexander Vorobiev <alexander.vorobiev@gmail.com> skribis:

> Doesn't binary distribution have hardcoded /gnu/* paths?

Yes it does.

> I can't use those unfortunately. We have a standard configuration = of
> RHEL 6.5 installed on hundreds of servers and any modifications of the=
> root directory (and all other "standard" directories) layout= are out
> of question.

OK.=C2=A0 Note that using a store other than /gnu/store prevents you= from
using substitutes from h= ydra.gnu.org (just mentioning it if that is of
interest to you.)

> Would it be too hard to add an environment variable(s) pointing to a > Guix's store and cache directories so that the binary build of the=
> daemon doesn't depend on the hardcoded values?=C2=A0 Thanks, Alex<= br>
There are two issues here:

=C2=A0 1. File names hard-coded in the RUNPATH and other places of the
=C2=A0 =C2=A0 =C2=A0=E2=80=98guix-daemon=E2=80=99 binary of the tarball.
=C2=A0 2. The store directory that =E2=80=98guix-daemon=E2=80=99 targets.
#2 can actually be changed at run-time via the (purposefully
undocumented) =E2=80=98NIX_STORE_DIR=E2=80=99 environment variable (see =E2= =80=98test-env.in=E2= =80=99 in
the source tree.)

#1 means that if you want to run the =E2=80=98guix-daemon=E2=80=99 binary f= rom the
binary tarball, you=E2=80=99ll have to somehow satisfy its requirements.=C2= =A0 You
might be able to unpack the tarball in an arbitrary directory, and then
define =E2=80=98LD_LIBRARY_PATH=E2=80=99 so that =E2=80=98guix-daemon=E2=80= =99 finds all the .so files
that it needs and are provided by the binary tarball (libstdc++.so,
libgcrypt.so, libsqlite3.so, libc.so, etc.)

Once =E2=80=98guix-daemon=E2=80=99 is running, you could run =E2=80=98guix = environment guix=E2=80=99,
and from there you could build Guix from source.

But that is really hacky, and perhaps not particularly easier than
building a newer GCC on your machine.

Alternately, you could build a suitable binary tarball on another
machine: just install and configure Guix with the options that you need, and run =E2=80=98make guix-binary.x86_64-linux.tar.xz=E2=80=99.

WDYT?

Ludo=E2=80=99.

--001a11470c7825e1ec051707d5bf--