From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: bootstrap guile segfaults on powerpc 32-bit Date: Thu, 7 Nov 2019 09:30:31 +0200 Message-ID: <20191107073031.GK14453@E5400> References: <20191104105756.GC372@E5400> <87a798x60i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VB1oQhYtJt8uuzk+" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43899) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iScFc-0005hh-Nm for guix-devel@gnu.org; Thu, 07 Nov 2019 02:30:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iScFY-0006xi-Mr for guix-devel@gnu.org; Thu, 07 Nov 2019 02:30:39 -0500 Content-Disposition: inline In-Reply-To: <87a798x60i.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" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --VB1oQhYtJt8uuzk+ Content-Type: multipart/mixed; boundary="GU3/x65mZ6MFE8p3" Content-Disposition: inline --GU3/x65mZ6MFE8p3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 06, 2019 at 06:35:09PM +0100, Ludovic Court=C3=A8s wrote: > Hi! >=20 > Efraim Flashner skribis: >=20 > > I'm trying again to see about porting Guix to 32-bit powerpc and I've > > come across a problem with the static guile. static guile has bin/ > > share/ and lib/ outputs. Looking at (gnu packages bootstrap), the > > make-guile-wrapper function around line 377 takes its own bin/guile to > > wrap itself in the code from share and the precompiled go files in lib/. > > Unfortunately on powerpc I'm getting the error: > > > > /gnu/store/krb9h94g81f4xgsjwfs58p8fiir5gmpq-build-bootstrap-guile.sh: l= ine 8: 5 Segmentation fault GUILE_SYSTEM_PATH=3D$out/share/guile/2= =2E2 GUILE_SYSTEM_COMPILED_PATH=3D$out/lib/guile/2.2/ccache $out > > /bin/guile -c "(begin (use-modules (ice-9 match)) (match (command-line)= ((_ out bash) (let ((bin-dir (string-append out \"/bin\")) (guile (string-= append out \"/bin/guile\")) (guile-real (string-append out > > \"/bin/.guile-real\")) (dollar (string (integer->char 36)))) (chmod bi= n-dir 493) (rename-file guile guile-real) (call-with-output-file guile (lam= bda (p) (format p \"#!~a\\nexport GUILE_SYSTEM_PATH=3D~a/sha > > re/guile/2.2\\nexport GUILE_SYSTEM_COMPILED_PATH=3D~a/lib/guile/2.2/cca= che\\nexec -a \\\"~a0\\\" ~a \\\"~a@\\\"\\n\" bash out out dollar guile-rea= l dollar))) (chmod guile 365) (chmod bin-dir 365)))))" $out > > /gnu/store/rbz12p3wl7dlrn5gyk6yp62ixmcir3vb-bash > > /gnu/store/krb9h94g81f4xgsjwfs58p8fiir5gmpq-build-bootstrap-guile.sh: l= ine 11: 6 Segmentation fault $out/bin/guile --version > > builder for `/gnu/store/cr6anc23kmprmilvyhi721b5b4sacln5-guile-bootstra= p-2.2.drv' failed with exit code 139 >=20 > Indeed, here=E2=80=99s what I see: >=20 > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix build guile-static-stripped --target=3Dpowerpc-linu= x-gnu=20 > 5.5 MB will be downloaded: > /gnu/store/nsscff8a2yic1x4cgdqlzd5829asln4w-guile-static-stripped-2.2.6 > substituting /gnu/store/nsscff8a2yic1x4cgdqlzd5829asln4w-guile-static-str= ipped-2.2.6... > downloading from https://ci.guix.gnu.org/nar/lzip/nsscff8a2yic1x4cgdqlzd5= 829asln4w-guile-static-stripped-2.2.6... > guile-static-stripped-2.2.6 5.2MiB 2.2MiB/s 00:02 [###########= #######] 100.0% >=20 > /gnu/store/nsscff8a2yic1x4cgdqlzd5829asln4w-guile-static-stripped-2.2.6 > $ qemu-ppc /gnu/store/nsscff8a2yic1x4cgdqlzd5829asln4w-guile-static-strip= ped-2.2.6/bin/guile -q > guile: warning: failed to install locale > qemu: uncaught target signal 11 (Segmentation fault) - core dumped > Adres-eraro > $ git log |head -1 > commit 198a7ac02fe52acfed996cb66d3c79e2e8595747 > --8<---------------cut here---------------end--------------->8--- >=20 > I=E2=80=99d need a cross-gdb for powerpc-linux-gnu to actually get a back= trace, > though. >=20 > Are you able to get a backtrace on the actual PowerPC machine? >=20 strace was easy to do, I have that attached. I haven't used gdb very much. Here's the initial "I figured out how to make it do something": (ins)efraim@g4:~/guile-static$ gdb -q ./bin/guile Reading symbols from ./bin/guile... (No debugging symbols found in ./bin/guile) (ins)(gdb) run Starting program: /home/efraim/guile-static/bin/guile guile: warning: failed to install locale Program received signal SIGSEGV, Segmentation fault. 0x10073d90 in ?? () I figured it was worth trying with other architectures, so I built %guile-static-stripped for x86_64-linux: =2E/pre-inst-env guix build -e '(@@ (gnu packages make-bootstrap) %guile-st= atic-stripped)' but that one didn't have any problems. Now I'm building it for i686-linux. After that I'll try again with the bootstrap-tarballs, but i686-linux -> powerpc-linux and see if that changes anything. > Thanks, > Ludo=E2=80=99. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --GU3/x65mZ6MFE8p3 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=guile-strace execve("./bin/guile", ["./bin/guile", "-q"], 0xbfeb83ec /* 27 vars */) = 0 brk(NULL) = 0x1076b000 brk(0x1076bd48) = 0x1076bd48 uname({sysname="Linux", nodename="g4", ...}) = 0 set_tid_address(0x1076b068) = 2734 set_robust_list(0x1076b070, 12) = 0 rt_sigaction(SIGRTMIN, {sa_handler=0x100f50f8, sa_mask=[], sa_flags=SA_SIGINFO}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {sa_handler=0x100f51dc, sa_mask=[], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 readlink("/proc/self/exe", "/home/efraim/guile-static/bin/gu"..., 4096) = 35 brk(0x1078cd48) = 0x1078cd48 brk(0x1078d000) = 0x1078d000 openat(AT_FDCWD, "/run/current-system/locale/2.29/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-cross-powerpc-linux-gnu-2.29/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/current-system/locale/2.29/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/current-system/locale/2.29/en_US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/current-system/locale/2.29/en_US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/current-system/locale/2.29/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/current-system/locale/2.29/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/current-system/locale/2.29/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "guile: warning: failed to instal"..., 41) = 41 futex(0x1034dd54, FUTEX_WAKE_PRIVATE, 2147483647) = 0 openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3 ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 read(3, "00100000-00103000 r-xp 00000000 "..., 1024) = 380 close(3) = 0 sched_getaffinity(2734, 32, [0]) = 4 brk(0x1079d000) = 0x1079d000 brk(0x107ad000) = 0x107ad000 brk(0x107bd000) = 0x107bd000 brk(0x107cd000) = 0x107cd000 brk(0x107dd000) = 0x107dd000 rt_sigaction(SIGPWR, {sa_handler=0x100e6590, sa_mask=~[INT QUIT ABRT TERM RTMIN RT_1], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0 rt_sigaction(SIGXCPU, {sa_handler=0x100e6280, sa_mask=~[INT QUIT ABRT TERM RTMIN RT_1], sa_flags=SA_RESTART}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [XCPU PWR], NULL, 8) = 0 openat(AT_FDCWD, "/proc/stat", O_RDONLY) = 3 read(3, "cpu 2783050 8294 428571 3066401"..., 4096) = 1344 close(3) = 0 swapcontext(0xbff823d8, 0) = 0 brk(0x1085d000) = 0x1085d000 pipe2([3, 4], O_CLOEXEC) = 0 futex(0x1034dca8, FUTEX_WAKE_PRIVATE, 2147483647) = 0 clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {tv_sec=0, tv_nsec=10033856}) = 0 openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_LARGEFILE) = 5 fstat64(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1, 0x9), ...}) = 0 ioctl(5, TCGETS, 0xbff82848) = -1 EINVAL (Invalid argument) read(5, "#ms\22\0\230\376\224Q\0011g\223\305}\201\5=\n\23\315Y\t\213\270\16]\217#\351\326Y"..., 4096) = 4096 close(5) = 0 brk(0x1086d000) = 0x1086d000 openat(AT_FDCWD, "/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-cross-powerpc-linux-gnu-2.29/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-cross-powerpc-linux-gnu-2.29/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) futex(0x10360970, FUTEX_WAKE_PRIVATE, 2147483647) = 0 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7c3e000 fcntl64(0, F_GETFL) = 0x2 (flags O_RDWR) _llseek(0, 0, 0xbff823b8, SEEK_CUR) = -1 ESPIPE (Illegal seek) ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 fcntl64(1, F_GETFL) = 0x2 (flags O_RDWR) _llseek(1, 0, 0xbff823b8, SEEK_CUR) = -1 ESPIPE (Illegal seek) ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0 fcntl64(2, F_GETFL) = 0x2 (flags O_RDWR) _llseek(2, 0, 0xbff823b8, SEEK_CUR) = -1 ESPIPE (Illegal seek) readlink("/proc/self/exe", "/home/efraim/guile-static/bin/gu"..., 256) = 35 lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/home/efraim", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 lstat64("/home/efraim/guile-static", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/home/efraim/guile-static/bin", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0 stat64("/home/efraim/guile-static/share/guile/2.2/ice-9/eval.scm", {st_mode=S_IFREG|0444, st_size=25718, ...}) = 0 stat64("/home/efraim/guile-static/lib/guile/2.2/ccache/ice-9/eval.go", {st_mode=S_IFREG|0444, st_size=87205, ...}) = 0 openat(AT_FDCWD, "/home/efraim/guile-static/lib/guile/2.2/ccache/ice-9/eval.go", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 _llseek(5, 0, [87205], SEEK_END) = 0 mmap2(NULL, 87205, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb7c28000 close(5) = 0 mprotect(0xb7c38000, 1892, PROT_READ|PROT_WRITE) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 stat64("/home/efraim/guile-static/share/guile/2.2/init.scm", 0xbff829c8) = -1 ENOENT (No such file or directory) stat64("/home/efraim/guile-static/share/guile/2.2/ice-9/boot-9.scm", {st_mode=S_IFREG|0444, st_size=147395, ...}) = 0 stat64("/home/efraim/guile-static/lib/guile/2.2/ccache/ice-9/boot-9.go", {st_mode=S_IFREG|0444, st_size=516405, ...}) = 0 openat(AT_FDCWD, "/home/efraim/guile-static/lib/guile/2.2/ccache/ice-9/boot-9.go", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 _llseek(5, 0, [516405], SEEK_END) = 0 mmap2(NULL, 516405, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb7ba9000 close(5) = 0 mprotect(0xb7bf9000, 73376, PROT_READ|PROT_WRITE) = 0 stat64("/home/efraim/guile-static/share/guile/2.2/ice-9/psyntax-pp.scm", {st_mode=S_IFREG|0444, st_size=184880, ...}) = 0 stat64("/home/efraim/guile-static/lib/guile/2.2/ccache/ice-9/psyntax-pp.go", {st_mode=S_IFREG|0444, st_size=472565, ...}) = 0 openat(AT_FDCWD, "/home/efraim/guile-static/lib/guile/2.2/ccache/ice-9/psyntax-pp.go", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5 _llseek(5, 0, [472565], SEEK_END) = 0 mmap2(NULL, 472565, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb7b35000 close(5) = 0 mprotect(0xb7b85000, 34352, PROT_READ|PROT_WRITE) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x31e8c378} --- +++ killed by SIGSEGV +++ --GU3/x65mZ6MFE8p3-- --VB1oQhYtJt8uuzk+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl3DyBMACgkQQarn3Mo9 g1FsKBAAmJ6lskxf4NRbDc0W88jPOXpWfQyNVWQMl+laG2RN4VTLj1gr/lZQBa25 akCv79IVwcxAIvgGTSor59gyAbCSg0EwSkLErGrXvruuiCVn7NUJtRl3BKCrW4gd lQq7rDmkoz3ffnbP3vAyUjsbsn1HiupojJHtprHiUITZeq3+SIn74Xiar7dKhQdl s5k5f/6bwQzkrAClgW1Lghx2e0SNODmDUQ4K4ri5/hcnXPWQFzBZrfieedysxYsY +M9W5gsjp/8WOLQPkoiebOiwgBW9MdBbmgc42G3MHi7H7F6Vk6L02E6UagXeloW4 6tiPDATLU6iOrQPYRYWZUhOD8If7XqfApP11eF6sXfk7LmoLobO9f2LojE96r0up hvrViYVfeTOQ0pfJOceC861tmUOSI1FzczSm6CZzqINrZt+UJOayxoOW+l82LY7+ cG1ZpzCQmnmD6fIYPFykxdkxeC876eBiZMrTZjkmODj7nkv/toSf372dO4A3Niqh XL8zGCU9MxrZrcC3R7DaWyySJGLSg9q9Jder7/m8zu+rz3ftJPTi2ULYEn5i0tkM hJ9C2eG6nB5cH/kqL2Qva202WRiunm4Lf7ti6j7whVXgZFgb8gVBcQtNqQv8+PCc To/lgH6aUzpYrPYMuunvP/LjTIVDieqglMzNKKNN0us0MNjWL0g= =YKW0 -----END PGP SIGNATURE----- --VB1oQhYtJt8uuzk+--