From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: Hwo to debug and teacking builds? Date: Tue, 28 Mar 2017 16:07:54 +0000 Message-ID: <20170328160754.vsmzshiwlqb322av@abyayala> References: <58DA29EC.30008@crazy-compilers.com> <8737dx7mpb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cstfK-0005nT-9Q for help-guix@gnu.org; Tue, 28 Mar 2017 12:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cstfG-00075C-5Q for help-guix@gnu.org; Tue, 28 Mar 2017 12:08:14 -0400 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Catonano Cc: help-guix Catonano transcribed 4.3K bytes: > 2017-03-28 11:52 GMT+02:00 Ludovic Court=C3=A8s : >=20 > > Howdy! > > > > Hartmut Goebel skribis: > > > > > when defining a new package, I often find myself spending *a lot* o= f > > > time debugging and tweaking the build. E.g. the if the Makefile nee= ds to > > > be modified, or some test-cases adjusted. > > > > > > How do I "get into" the build container, so I can debug, modify fil= es, > > > rebuild and run tests there - in a closed environment (nearly) like= the > > > build-daemon has? > > > > Most of the time, you don=E2=80=99t need to get into a container. In= those > > cases, it=E2=80=99s enough to do: > > > > guix build -K foo > > # build fails=E2=80=A6 > > cd /tmp/guix-build-foo.drv-0 > > source ./environment-variables > > cd foo-1.2 > > =E2=80=A6 > > > > In some cases (for example when you have tests that fail in the build > > environment but succeed once you=E2=80=99ve followed the steps above)= , you > > really need a container similar to that created by guix-daemon. In t= hat > > case, do: > > > > guix build -K foo > > # build fails=E2=80=A6 > > cd /tmp/guix-build-foo.drv-0 > > guix environment -C foo --ad-hoc strace gdb > > rm /bin/sh # to be really like in the guix-daemon environ= ment > > source ./environment-variables > > cd foo-1.2 > > $GUIX_ENVIRONMENT/bin/strace -f -o log make check > > =E2=80=A6 > > > > That would probably make a good =E2=80=9CDebugging Build Failures=E2=80= =9D section. > > > > > > > This is important information and it's more detailed than what Pjotr wr= ote > in his wrap up >=20 > I'd do it myself but I don't know the first thing about the info system >=20 > Which is the source file ? doc/guix.texi > How do I compile it ? I never got anything else than html to build with make of guix, (make doc/guix.html).. it's not super obvious. I know how texi2pdf etc works, but this should at least be listed somewhere other than the Makefile. > Which Emacs mode should I use ?