Message ID | 20161113131946.4185-2-manolis837@gmail.com |
---|---|
State | New |
Headers | show |
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’.
Updated the patch with your suggestions, added you as a co-author and I pushed it to core-updates. Thank you, Manolis
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"
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(-)