all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: base: Build glibc-hurd for i586-pc-gnu instead of i686-pc-gnu.
Date: Tue, 30 Jun 2015 21:36:04 +0200	[thread overview]
Message-ID: <87fv590z17.fsf@gnu.org> (raw)
In-Reply-To: <CAFtzXzNqGreiPW6J7uTxr6_3WhN6SJGQuaO=TuUK_0CxT4WTJw@mail.gmail.com> (Manolis Ragkousis's message of "Mon, 29 Jun 2015 19:43:53 +0300")

Manolis Ragkousis <manolis837@gmail.com> skribis:

> With this patch we can produce working static binaries for a Hurd system.

Woohoo!  :-)

> We had to change it to use i586, because the default i686 variant
> introduces bugs.

Specifically, static binaries (cross-)built for i686-gnu segfault early
on (heap address seems to be miscalculated), like this:

--8<---------------cut here---------------start------------->8---
$ gdb --args ./true
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./true...done.
(gdb) r
Starting program: /home/ludo/t/static.debug3/bin/true 

Program received signal EXC_BAD_ACCESS, Could not access memory.
allocate_dtv (result=result@entry=0x8132a38) at dl-tls.c:300
300     dl-tls.c: No such file or directory.
(gdb) bt full
#0  allocate_dtv (result=result@entry=0x8132a38) at dl-tls.c:300
        dtv = 0x806ef50 <__memset_sse2>
        dtv_length = 15
#1  0x08087add in _dl_allocate_tls_storage () at dl-tls.c:364
        allocated = 0x8132208
        result = 0x8132a38
        size = 2116
#2  0x08087d3d in _dl_allocate_tls (mem=mem@entry=0x0) at dl-tls.c:460
No locals.
#3  0x0804cce3 in __pthread_create_internal (thread=thread@entry=0x1001e5c, attr=attr@entry=0x0, start_routine=start_routine@entry=0x0, arg=arg@entry=0x0) at ./pthread/pt-create.c:152
        err = 0
        pthread = 0x8131e38
        setup = <optimized out>
        sigset = 2147483647
        stacksize = 2097152
        __PRETTY_FUNCTION__ = "__pthread_create_internal"
#4  0x0804bfcc in _init_routine (stack=0x0) at ../libpthread/sysdeps/mach/hurd/pt-sysdep.c:66
        thread = 0x8050043 <__mach_msg+67>
        err = <optimized out>
#5  init_routine () at ../libpthread/sysdeps/mach/hurd/pt-sysdep.c:90
No locals.
#6  0x0805905b in init (data=0x1001ea0) at ../sysdeps/mach/hurd/i386/init-first.c:206
        newsp = <optimized out>
        od = <optimized out>
        argv = 0x1001ea4
        argc = <optimized out>
        envp = 0x1001f10
        d = 0x1001f10
#7  doinit1 (argc=1) at ../sysdeps/mach/hurd/i386/init-first.c:358
No locals.
#8  0x08048e74 in _start () at ../sysdeps/mach/hurd/i386/static-start.S:22
No locals.
--8<---------------cut here---------------end--------------->8---

> From 30137dd367eb67b349411d61249af97fade40f2f Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Mon, 29 Jun 2015 19:12:51 +0300
> Subject: [PATCH] gnu: base: Build glibc-hurd for i586-pc-gnu instead of
>  i686-pc-gnu.
>
> With this commit "guix build bootstrap-tarballs --target=i586-pc-gnu"
> produces working static binaries.
>
> * gnu/packages/base.scm (glibc/hurd, glibc/hurd-headers): Change i686-pc-gnu
>   to i586-pc-gnu.
> * gnu/packages/cross-base.scm (cross-libc): Same.
> * gnu/packages/hurd.scm (gnumach-headers, hurd-headers): Same.
> * gnu/packages/patches/glibc-hurd-libs.patch: New patch.

[...]

> --- a/gnu/packages/hurd.scm
> +++ b/gnu/packages/hurd.scm
> @@ -58,7 +58,7 @@
>        ;; least install its headers when not cross-compiling.
>        ,@(if (%current-target-system)
>            '()
> -          '(#:configure-flags '("--build=i686-pc-gnu")))
> +          '(#:configure-flags '("--build=i586-pc-gnu")))

Could you add here a link to his message, for future reference?  (I
don’t know where we can file this bug, maybe we should just ask the Hurd
folks.)

OK for wip-hurd with this change, thanks!

Ludo’.

      reply	other threads:[~2015-06-30 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 16:43 [PATCH] gnu: base: Build glibc-hurd for i586-pc-gnu instead of i686-pc-gnu Manolis Ragkousis
2015-06-30 19:36 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv590z17.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=Guix-devel@gnu.org \
    --cc=manolis837@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.