* [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build
@ 2016-11-13 13:19 manolis837
2016-11-13 13:19 ` [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build first manolis837
0 siblings, 1 reply; 4+ messages in thread
From: manolis837 @ 2016-11-13 13:19 UTC (permalink / raw)
To: guix-devel
Hello everyone,
This patch solves the undefined referrence issues I had when building the latest versions of glibc-hurd.
Manolis
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build first.
2016-11-13 13:19 [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build manolis837
@ 2016-11-13 13:19 ` manolis837
2016-11-14 13:05 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: manolis837 @ 2016-11-13 13:19 UTC (permalink / raw)
To: guix-devel
From: Manolis Ragkousis <manolis837@gmail.com>
* gnu/packages/base.scm (glibc/hurd): Avoid linking errors by forcing
mach/hurd/libpthread glibc subdirs to build before anything else.
---
gnu/packages/base.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 1c01874..abefe4e 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -714,7 +714,17 @@ with the Linux kernel.")
;; Use the right 'pwd'.
(substitute* "configure"
(("/bin/pwd") "pwd")))
- ,original-phases)))
+ (alist-replace
+ 'build
+ (lambda _
+ ;; Force mach/hurd/libpthread subdirs to build first in order to avoid
+ ;; linking errors.
+ (zero?
+ (and (system* "make" "mach/subdir_lib")
+ (system* "make" "hurd/subdir_lib")
+ (system* "make" "libpthread/subdir_lib")
+ (system* "make"))))
+ ,original-phases))))
((#:configure-flags original-configure-flags)
`(append (list "--host=i586-pc-gnu"
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build first.
2016-11-13 13:19 ` [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build first manolis837
@ 2016-11-14 13:05 ` Ludovic Courtès
2016-11-30 13:21 ` Manolis Ragkousis
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-11-14 13:05 UTC (permalink / raw)
To: manolis837; +Cc: guix-devel
manolis837@gmail.com skribis:
> From: Manolis Ragkousis <manolis837@gmail.com>
>
> * gnu/packages/base.scm (glibc/hurd): Avoid linking errors by forcing
> mach/hurd/libpthread glibc subdirs to build before anything else.
Rather:
* gnu/packages/base.scm (glibc/hurd)[arguments]: Replace 'build' phase.
The comment in there is what explains the details.
> + (alist-replace
> + 'build
> + (lambda _
> + ;; Force mach/hurd/libpthread subdirs to build first in order to avoid
> + ;; linking errors.
If there’s a link to a bug-hurd discussion, you can add it here, in case
someone wants to see the details at a later point in time.
> + (zero?
> + (and (system* "make" "mach/subdir_lib")
> + (system* "make" "hurd/subdir_lib")
> + (system* "make" "libpthread/subdir_lib")
> + (system* "make"))))
The ‘zero?’ call is misplaced.
Also, I’d suggest enabling parallel builds, so something like this:
(let ((-j (list "-j" (number->string (parallel-job-count)))))
(let-syntax ((make (syntax-rules ()
((_ target)
(zero? (apply system* "make" target -j))))))
(and (make "mach/subdir_lib")
(make "hurd/subdir_lib")
(make "libpthread/subdir_lib")
(zero? (apply system* "make" -j)))))
OK with changes along these lines.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build first.
2016-11-14 13:05 ` Ludovic Courtès
@ 2016-11-30 13:21 ` Manolis Ragkousis
0 siblings, 0 replies; 4+ messages in thread
From: Manolis Ragkousis @ 2016-11-30 13:21 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Updated the patch with your suggestions, added you as a co-author and I
pushed it to core-updates.
Thank you,
Manolis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-30 13:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-13 13:19 [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build manolis837
2016-11-13 13:19 ` [PATCH] gnu: glibc-hurd: Force mach/hurd/libpthread subdirs to build first manolis837
2016-11-14 13:05 ` Ludovic Courtès
2016-11-30 13:21 ` Manolis Ragkousis
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).