From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: PowerPC & GNU/Hurd cross-compilation Date: Mon, 30 Jan 2017 15:43:41 +0100 Message-ID: <87h94gbobm.fsf@gnu.org> References: <87d1fgjech.fsf@gnu.org> <8760l8jczg.fsf@gnu.org> <7tlgts4w9r.fsf@gmail.com> 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]:54380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYDBQ-0002qr-Cj for guix-devel@gnu.org; Mon, 30 Jan 2017 09:43:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYDBL-0001qR-GN for guix-devel@gnu.org; Mon, 30 Jan 2017 09:43:52 -0500 In-Reply-To: <7tlgts4w9r.fsf@gmail.com> ("Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama"'s message of "Mon, 30 Jan 2017 12:33:52 +0100") 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" To: Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama Cc: guix-devel Hey Carlos, csanchezdll@gmail.com (Carlos S=C3=A1nchez de La Lama) skribis: >>> $ file $(./pre-inst-env guix build -q --target=3Dpowerpc-linux-gnu guil= e )/bin/guile >>> The following files will be downloaded: >>> /gnu/store/4cmc36jhjj2qq7z5pd0n9fw48dfq1cr7-guile-2.0.13-debug >>> /gnu/store/h153jzzqiz10xc3yh4r2w7lkrm5pbx88-guile-2.0.13 >>> /gnu/store/253hrca11y3cjh2f83dcjaxiv9a2j5m3-gmp-6.1.2 >>> /gnu/store/29iq9axvllgdrf6y6zfqz111icmy3pdj-libgc-7.6.0 >>> /gnu/store/911r5chr83yi6xivavndgb6mcvn71qv1-libunistring-0.9.7 >>> /gnu/store/hkhffl6c6iap2igbbcap2vqbcgh7xkjv-gcc-cross-sans-libc-powe= rpc-linux-gnu-5.4.0 >>> /gnu/store/k2j02w9q58h6i07y1fixvcdq8jply68i-gcc-cross-powerpc-linux-= gnu-5.4.0 >>> /gnu/store/naqawviclvwzixvcjc17c3sss7zj9k1w-readline-7.0 >>> /gnu/store/qivxbbn03scn5wn932ky8mm5xap5zn93-glibc-cross-powerpc-linu= x-gnu-2.24 >>> /gnu/store/rqb8p9f13mfha1xkkjwf7wfjvzv34xlk-libltdl-2.4.6 >>> /gnu/store/z1qain73n3475p6sdb2ignwyalckvgnx-libffi-3.2.1 >>> /gnu/store/4dazcdvnbgvhdvi5aj17ci07mz1xwzvq-bash-4.4.5 >>> /gnu/store/6fzzsp453p3n5axcnl0rddjf1yw9309m-ncurses-6.0 >>> /gnu/store/r7dbj8y4nf024phn8sd2v4206y71mk8q-pkg-config-powerpc-linux= -gnu-0.29 >>> /gnu/store/rbhdn0wkbgb69w17f1fhridw81msam8v-libatomic-ops-7.4.4 >> >> With QEMU: >> >> --8<---------------cut here---------------start------------->8--- >> $ qemu-ppc /gnu/store/4dazcdvnbgvhdvi5aj17ci07mz1xwzvq-bash-4.4.5/bin/ba= sh --version >> GNU bash, version 4.4.5(1)-release (powerpc-unknown-linux-gnu) >> Copyright (C) 2016 Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later >> >> This is free software; you are free to change and redistribute it. >> There is NO WARRANTY, to the extent permitted by law. >> $ qemu-ppc /gnu/store/h153jzzqiz10xc3yh4r2w7lkrm5pbx88-guile-2.0.13/bin/= guile -q --version >> qemu: uncaught target signal 11 (Segmentation fault) - core dumped >> --8<---------------cut here---------------end--------------->8--- >> >> Carlos, could you check whether the cross-compiled Guile works on a real >> PowerPC machine? I suspect =E2=80=98qemu-ppc=E2=80=99 doesn=E2=80=99t e= mulate everything libgc >> relies on. > > I checked out commit 58ea4d to try to obtain most sustitutes from hydra, > but seems my products differ: > > $ ./pre-inst-env guix build -q --target=3Dpowerpc-linux-gnu guile > /gnu/store/75vvlackg42i2aisc8zxgvqnkfz3nnx0-guile-2.0.13-debug > /gnu/store/g4q5kgrl8qigzaqlhhg2jjnmzhj75pk7-guile-2.0.13 > > While, for hydra, products for evaluation 109452 (which uses commit > 58ea4d) are: > powerpc-linux-gnu.guile-2.0.13.x86_64-linux: > /gnu/store/viv5cw795vy7gblgv68k16q4ri37s7aj-guile-2.0.13-debug > /gnu/store/1zy8jfwbb2g956ihg5d9bk2ac41xhcsc-guile-2.0.13 > powerpc-linux-gnu.guile-2.0.13.i686-linux: Fails. > > Note I am on i686. The =E2=80=9C.x86_64-linux=E2=80=9D in the Hydra job name above means that = it=E2=80=99s cross-built from x86_64; that=E2=80=99s why the store file name is different from the one you have on i686. The failure on i686 is a timeout while running libgc=E2=80=99s test suite (= the native i686 build): https://hydra.gnu.org/build/1820051 --8<---------------cut here---------------start------------->8--- make check-TESTS make[2]: Entering directory '/tmp/guix-build-libgc-7.6.0.drv-0/gc-7.6.0' make[3]: Entering directory '/tmp/guix-build-libgc-7.6.0.drv-0/gc-7.6.0' PASS: leaktest PASS: cordtest PASS: smashtest PASS: hugetest PASS: middletest PASS: threadleaktest PASS: threadkey_test PASS: subthreadcreate_test PASS: initsecondarythread_test PASS: staticrootstest PASS: realloc_test PASS: test_cpp PASS: disclaim_test PASS: disclaim_bench building of `/gnu/store/yk15c9c5vjny19pw30zkygf2vzy6zp7h-libgc-7.6.0.drv' t= imed out after 3600 seconds of silence --8<---------------cut here---------------end--------------->8--- I=E2=80=99ve just tried: ./pre-inst-env guix build -e '(@@ (gnu packages commencement) guile-final= )' \ -s i686-linux -K on my x86_64 box and it passes without a problem. Probably that was a transient failure, though we=E2=80=99ll need to pay attention. > In any case, the cross-compiled Guile generated on my machine works on > the real PowerPC: > > ./pre-inst-env guix gc --references /gnu/store/g4q5kgrl8qigzaqlhhg2jjnmzh= j75pk7-guile-2.0.13 | xargs tar cf ~/guile.tar > > I scp to ppc machine, untar, and guile works: > > ppc$ /gnu/store/g4q5kgrl8qigzaqlhhg2jjnmzhj75pk7-guile-2.0.13/bin/guile -= -version > guile (GNU Guile) 2.0.13 > Copyright (C) 2016 Free Software Foundation, Inc. Awesome, thanks for checking! Ludo=E2=80=99.