unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: base: Disable bogus code in Hurd's glibc.
@ 2015-07-31 16:17 Manolis Ragkousis
  2015-07-31 18:38 ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-07-31 16:17 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

This patch solves the issue I had with building perl natively on Hurd. It seems
PAGE_COPY_THRESHOLD was causing a not properly tested PAGE_COPY_FWD_MAYBE
to be used, which caused the error "miniperl: memmove.c:72: memmove:
Assertion `len == 0' failed."

OK to apply to wip-hurd?

Manolis

[-- Attachment #2: 0001-gnu-base-Disable-bogus-code-in-Hurd-s-glibc.patch --]
[-- Type: text/x-patch, Size: 1783 bytes --]

From b4ea96e2b8b5c6e8dcfff9d46ccb9f963d338c7d Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Fri, 31 Jul 2015 19:08:39 +0300
Subject: [PATCH] gnu: base: Disable bogus code in Hurd's glibc.

* gnu/packages/patches/glibc-hurd-libs.patch: New patch.
---
 gnu/packages/patches/glibc-hurd-libs.patch | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/patches/glibc-hurd-libs.patch b/gnu/packages/patches/glibc-hurd-libs.patch
index 2102f77..73e1e99 100644
--- a/gnu/packages/patches/glibc-hurd-libs.patch
+++ b/gnu/packages/patches/glibc-hurd-libs.patch
@@ -41,3 +41,34 @@ Index: eglibc-2.18/sysdeps/generic/symbol-hacks.h
  asm ("memset = __GI_memset");
 +#  endif
  #endif
+
+We need to disable this, or else memmove will not work properly in Hurd's glibc.
+
+From 69f807d6a4afa43e7a596e04f22923567b235ce9 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Wed, 29 Jul 2015 10:34:01 +0200
+Subject: [PATCH] Disable the fix for now, the resulting code seems bogus
+
+---
+ .topmsg                 | 11 +++++++++++
+ sysdeps/mach/pagecopy.h |  3 +++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/sysdeps/mach/pagecopy.h b/sysdeps/mach/pagecopy.h
+index 29b73ce..9d1f4de 100644
+--- a/sysdeps/mach/pagecopy.h
++++ b/sysdeps/mach/pagecopy.h
+@@ -20,7 +20,10 @@
+ 
+ /* Threshold at which vm_copy is more efficient than well-optimized copying
+    by words.  This parameter should be tuned as necessary.  */
++#define PAGE_THRESHOLD		(16384)	/* XXX Tune this.  */
++#if 0
+ #define PAGE_COPY_THRESHOLD		(16384)	/* XXX Tune this.  */
++#endif
+ 
+ #define PAGE_SIZE		__vm_page_size
+ #define PAGE_COPY_FWD(dstp, srcp, nbytes_left, nbytes)			      \
+-- 
+2.4.6
+
-- 
2.4.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: base: Disable bogus code in Hurd's glibc.
  2015-07-31 16:17 [PATCH] gnu: base: Disable bogus code in Hurd's glibc Manolis Ragkousis
@ 2015-07-31 18:38 ` Mark H Weaver
  2015-07-31 19:21   ` Manolis Ragkousis
  0 siblings, 1 reply; 4+ messages in thread
From: Mark H Weaver @ 2015-07-31 18:38 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> writes:

> This patch solves the issue I had with building perl natively on Hurd. It seems
> PAGE_COPY_THRESHOLD was causing a not properly tested PAGE_COPY_FWD_MAYBE
> to be used, which caused the error "miniperl: memmove.c:72: memmove:
> Assertion `len == 0' failed."
>
> OK to apply to wip-hurd?

Instead of tacking this onto the end of glibc-hurd-libs.patch, I think
it should be in its own file.  Can you send an updated patch?

    Thanks,
      Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: base: Disable bogus code in Hurd's glibc.
  2015-07-31 18:38 ` Mark H Weaver
@ 2015-07-31 19:21   ` Manolis Ragkousis
  2015-07-31 19:51     ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-07-31 19:21 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 15 bytes --]

Updated patch.

[-- Attachment #2: 0001-gnu-base-Disable-bogus-code-in-Hurd-s-glibc.patch --]
[-- Type: text/x-patch, Size: 3202 bytes --]

From f45ea217c7e50606ea4fb3559f0bb308d515b7b2 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Fri, 31 Jul 2015 19:08:39 +0300
Subject: [PATCH] gnu: base: Disable bogus code in Hurd's glibc.

* gnu/packages/patches/glibc-hurd-disable-memmove-fix.patch: New file.
* gnu/packages/base.scm (glibc/hurd)[source]: Add patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                      |  1 +
 gnu/packages/base.scm                              |  1 +
 .../patches/glibc-hurd-disable-memmove-fix.patch   | 29 ++++++++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 100644 gnu/packages/patches/glibc-hurd-disable-memmove-fix.patch

diff --git a/gnu-system.am b/gnu-system.am
index 721e1b5..1718a52 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -450,6 +450,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/glibc-ldd-x86_64.patch			\
   gnu/packages/patches/glibc-locales.patch			\
   gnu/packages/patches/glibc-hurd-libs.patch			\
+  gnu/packages/patches/glibc-hurd-disable-memmove-fix.patch	\
   gnu/packages/patches/gmp-arm-asm-nothumb.patch		\
   gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   gnu/packages/patches/gobject-introspection-cc.patch		\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 48c9a33..19a88d4 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -621,6 +621,7 @@ with the Linux kernel.")
                (base32
                 "0fkmn1kfsbhyrkf1wqqvc47dl5bzflnbcggjjfp5s9c489z916zw"))
               (patches (list (search-patch "glibc-hurd-libs.patch")
+                             (search-patch "glibc-hurd-disable-memmove-fix.patch")
                              (search-patch "libpthread-remove-duplicate.patch")))))
 
     ;; Libc provides <hurd.h>, which includes a bunch of Hurd and Mach headers,
diff --git a/gnu/packages/patches/glibc-hurd-disable-memmove-fix.patch b/gnu/packages/patches/glibc-hurd-disable-memmove-fix.patch
new file mode 100644
index 0000000..0146768
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-disable-memmove-fix.patch
@@ -0,0 +1,29 @@
+We need to disable this, or else memmove will not work properly in Hurd's glibc.
+
+From 69f807d6a4afa43e7a596e04f22923567b235ce9 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Wed, 29 Jul 2015 10:34:01 +0200
+Subject: [PATCH] Disable the fix for now, the resulting code seems bogus
+
+---
+ .topmsg                 | 11 +++++++++++
+ sysdeps/mach/pagecopy.h |  3 +++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/sysdeps/mach/pagecopy.h b/sysdeps/mach/pagecopy.h
+index 29b73ce..9d1f4de 100644
+--- a/sysdeps/mach/pagecopy.h
++++ b/sysdeps/mach/pagecopy.h
+@@ -20,7 +20,10 @@
+ 
+ /* Threshold at which vm_copy is more efficient than well-optimized copying
+    by words.  This parameter should be tuned as necessary.  */
++#define PAGE_THRESHOLD		(16384)	/* XXX Tune this.  */
++#if 0
+ #define PAGE_COPY_THRESHOLD		(16384)	/* XXX Tune this.  */
++#endif
+ 
+ #define PAGE_SIZE		__vm_page_size
+ #define PAGE_COPY_FWD(dstp, srcp, nbytes_left, nbytes)			      \
+-- 
+2.4.6
\ No newline at end of file
-- 
2.4.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: base: Disable bogus code in Hurd's glibc.
  2015-07-31 19:21   ` Manolis Ragkousis
@ 2015-07-31 19:51     ` Mark H Weaver
  0 siblings, 0 replies; 4+ messages in thread
From: Mark H Weaver @ 2015-07-31 19:51 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> writes:
> Updated patch.

Looks good.  Okay for wip-hurd.

    Thanks!
      Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-31 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-31 16:17 [PATCH] gnu: base: Disable bogus code in Hurd's glibc Manolis Ragkousis
2015-07-31 18:38 ` Mark H Weaver
2015-07-31 19:21   ` Manolis Ragkousis
2015-07-31 19:51     ` Mark H Weaver

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).