From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Running guix on nixos Date: Fri, 22 Jan 2016 13:57:05 +0100 Message-ID: <8760ylai1q.fsf@gnu.org> References: <87a8nzzzhr.fsf@nevada.int.iggy.bz> <874me79uf2.fsf@gnu.org> <87y4biy3ic.fsf@nevada.int.iggy.bz> 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]:34517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbH6-0005et-1P for help-guix@gnu.org; Fri, 22 Jan 2016 07:57:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMbH2-0002kC-Qh for help-guix@gnu.org; Fri, 22 Jan 2016 07:57:11 -0500 In-Reply-To: <87y4biy3ic.fsf@nevada.int.iggy.bz> (Jeff Mickey's message of "Thu, 21 Jan 2016 14:24:59 -0800") 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-bounces+gcggh-help-guix=m.gmane.org@gnu.org To: Jeff Mickey Cc: help-guix@gnu.org Jeff Mickey skribis: > * Ludovic Court=C3=A8s [2016-01-21 01:02]: >> guix build -K hello > > This fails with the exact same error, it can't build gcc. > > g++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tabl= es -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissin= g-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overl= ength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -Wl,-rpath=3D/n= ix/store/dbdj046q2ybl01ld56ywr0rkpy91g0xz-glibc-2.22/lib -Wl,-dynamic-linke= r -Wl,/nix/store/dbdj046q2ybl01ld56ywr0rkpy91g0xz-glibc-2.22/lib/ld-linux-x= 86-64.so.2 -L/nix/store/df8qyymanigrki2rgcmwbpkygg7c5n2g-libstdc++-4.9.3/li= b -o build/genhooks \ > build/genhooks.o build/errors.o ../build-x86_64-unknown-linux-gnu/lib= iberty/libiberty.a > g++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tabl= es -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissin= g-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overl= ength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -Wl,-rpath=3D/n= ix/store/dbdj046q2ybl01ld56ywr0rkpy91g0xz-glibc-2.22/lib -Wl,-dynamic-linke= r -Wl,/nix/store/dbdj046q2ybl01ld56ywr0rkpy91g0xz-glibc-2.22/lib/ld-linux-x= 86-64.so.2 -L/nix/store/df8qyymanigrki2rgcmwbpkygg7c5n2g-libstdc++-4.9.3/li= b -o build/genchecksum \ > build/genchecksum.o ../build-x86_64-unknown-linux-gnu/libiberty/libib= erty.a > /nix/store/xw7xz3cr8nhw24m6cchiha8g6lslwv1j-binutils-cross-boot0-2.25.1/b= in/x86_64-guix-linux-gnu-ld: cannot find -lstdc++ > collect2: error: ld returned 1 exit status > Makefile:2532: recipe for target 'build/genhooks' failed > make[3]: *** [build/genhooks] Error 1 > make[3]: *** Waiting for unfinished jobs.... > /nix/store/xw7xz3cr8nhw24m6cchiha8g6lslwv1j-binutils-cross-boot0-2.25.1/b= in/x86_64-guix-linux-gnu-ld: cannot find -lstdc++ > collect2: error: ld returned 1 exit status > Makefile:2532: recipe for target 'build/genchecksum' failed > > > If I look in > /nix/store/df8qyymanigrki2rgcmwbpkygg7c5n2g-libstdc++-4.9.3/lib I see > the following: > > $ ls /nix/store/df8qyymanigrki2rgcmwbpkygg7c5n2g-libstdc++-4.9.3/lib > $ ls /nix/store/df8qyymanigrki2rgcmwbpkygg7c5n2g-libstdc++-4.9.3/ > include lib lib64 share > $ ls /nix/store/df8qyymanigrki2rgcmwbpkygg7c5n2g-libstdc++-4.9.3/lib64 > libstdc++.a libstdc++.a-gdb.py libstdc++.la libsupc++.a libsupc++.la I think there=E2=80=99s an impurity leading the build system to use lib64/ instead of lib/. Compare with what we get with =E2=80=9Creal=E2=80=9D Guix: --8<---------------cut here---------------start------------->8--- $ ls $(guix build -e '(@@ (gnu packages commencement) libstdc++)') include/ lib/ share/ --8<---------------cut here---------------end--------------->8--- >> Also, make sure nix-daemon uses pristine chroot builds. > > [...] > > Yes, had to add nix.useChroot to true in my > /etc/nixos/configuration.nix. God I miss some s-exp. Heh. Could it be that the above libstdc++ was built before you had enabled chroot builds? Are you sure the chroot doesn=E2=80=99t contain /bin or any= thing like that? (Are you sure you don=E2=80=99t want to use guix-daemon? :-)) Ludo=E2=80=99.