Re: 01/01: gnu: packages: flex: Add missing 'lzip' input.
On Sun, 28 May 2017 09:58:07 -0400 Leo Famulariwrote: > On Sun, May 28, 2017 at 02:51:10PM +0200, Ludovic Courtès wrote: > > l...@famulari.name (Leo Famulari) skribis: > > > gnu: packages: flex: Add missing 'lzip' input. > > > > > > * gnu/packages/flex.scm (flex)[native-inputs]: Add lzip. > > > > I think this breaks ‘flex-boot0’ in (gnu packages commencement), doesn’t > > it? Can you clarify a bit what exactly broke here? Is it bootstrap on hurd? guix seemed to build things fine here on linux. I don't understand how flex could work before the patch as lzip was not pulled in as a dependency and the tarball is clearly an .lz one. -- Sergei pgprpgR2oQlOO.pgp Description: Цифровая подпись OpenPGP
Re: cross-compiling in core-updates
On Tue, 02 May 2017 09:14:21 +0200 Andy Wingowrote: > On Fri 28 Apr 2017 21:04, Manolis Ragkousis writes: > > > The reason for the cascading errors is bash-minimal. > > > > Trying to build `./pre-inst-env guix build bash-minimal' > > on core-updates ends up with : > > > > The following derivation will be built: > >/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv > > @ build-started > > /gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv - > > x86_64-linux > > /usr/local/var/log/guix/drvs/1r//0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv.bz2 > > ice-9/psyntax.scm:1534:32: In procedure expand-macro: > > ice-9/psyntax.scm:1534:32: Syntax error: > > /gnu/store/k84sww1zzh33a5hw8bcmsa5yp7w628a8-bash-minimal-4.4.12-guile-builder:1:2285: > > source expression failed to match any pattern in form (%modify-phases > > phases* (delete (quote move-development-files))) > > builder for > > `/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv' > > failed with exit code 1 > > @ build-failed > > /gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv - 1 > > builder for > > `/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv' > > failed with exit code 1 > > guix build: error: build failed: build of > > `/gnu/store/1r0fpfcik796g2b5v9ns163sgan1rkmz-bash-minimal-4.4.12.drv' failed > > > > It's the same issue Sergei reported and commit 78dea6f1d4a did not fix it. > > Hi! > > I suspect I know what this is. First, the package in question: > > (define-public bash-minimal > ;; A stripped-down Bash for non-interactive use. > (package (inherit bash) > (name "bash-minimal") > (inputs '()); no readline, no curses > > ;; No "include" output because there's no support for loadable modules. > (outputs (delete "include" (package-outputs bash))) > > (arguments >(let ((args `(#:modules ((guix build gnu-build-system) > (guix build utils) > (srfi srfi-1) > (srfi srfi-26)) > ,@(package-arguments bash > (substitute-keyword-arguments args >((#:configure-flags flags) > `(list "--without-bash-malloc" >"--disable-readline" >"--disable-history" >"--disable-help-builtin" >"--disable-progcomp" >"--disable-net-redirections" >"--disable-nls" > >;; Pretend 'dlopen' is missing so we don't build loadable >;; modules and related code. >"ac_cv_func_dlopen=no" > >,@(if (%current-target-system) > '("bash_cv_job_control_missing=no" >"bash_cv_getcwd_malloc=yes") > '( >((#:phases phases) > `(modify-phases ,phases >;; No loadable modules. >(delete 'move-development-files > > So you are aware of the change in Guile regarding "keyword" matching in > macros. In this case the "delete" in the modify-phases macro is a > keyword. Whereas before in Guile, they were only matched by name, now > they are matched by binding. If the keyword was bound where the macro > was defined, then it will only be matched to identifiers bound to the > same variable when the macro is used. Otherwise if the keyword was > unbound when the macro was defined, then it will match by name, but only > if the name is also unbound at the macro use. > > In (guix build utils), `delete' is bound to "delete" from (srfi srfi-1). > In the bash package definition, I am not sure what the scope is because > it's staged. However let's assume that the #:modules bit intends to > make it so that srfi-1 is present also in the bash-minimal module. That > should work, right? Except I think because the bash package *also* > defines a #:modules argument, that will result in: > > #:modules the-bash-minimal-modules ... #:modules the-bash-modules > > and the last keyword wins. So, perhaps try putting the > ,@(package-arguments bash) first in this list? > > (#:modules ((guix build gnu-build-system) > (guix build utils) > (srfi srfi-1) > (srfi srfi-26)) > ,@(package-arguments bash)) Yay! The following patch makes bash-minimal compile fine! diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index ef22728a9..38aa1786e 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -213,7 +213,7 @@ without modification.") (arguments - (let ((args `(#:modules ((guix build gnu-build-system) + (let ((args `(,@(package-arguments bash) +
Re: cross-compiling in core-updates
On Tue, 25 Apr 2017 17:10:58 +0300 Manolis Ragkousiswrote: > Hello Rene, > > I am currently looking into that. > > Manolis I've tracked it down to guile-2.-0>2.2 bump. 'define-syntax %modify-phases' somehow changed the meaning: https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00315.html but I know almost nothing on how all the nested guix's quotations interact. Would be nice to hear from those who Know Things (CCed Andy and Ludovic :) -- Sergei pgphxmJIMk3zU.pgp Description: Цифровая подпись OpenPGP
Re: [PATCH] gnu: go: Update to 1.8.1
On Mon, 17 Apr 2017 15:37:49 +0200 Petterwrote: > > > # ../misc/cgo/test > > > runtime/cgo: pthread_create failed: Resource temporarily unavailable ... > > $ /gnu/store/b4gflqj64yvksq7959r6m22mf9lzdy69-go-1.8.1/bin/go version > > go version go1.8.1 linux/amd64 > > Hope you'll be able to work this out! Finally managed to fix go-1.8.1 for me as well \o/. The culprit was a low thread limit for guix-daemon container: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26611 -- Sergei pgpnhhtL8nxQq.pgp Description: Цифровая подпись OpenPGP
Re: [PATCH] gnu: go: Update to 1.8.1
On Mon, 17 Apr 2017 14:16:06 +0200 Petter <pet...@mykolab.ch> wrote: > Hi, > > With this patch I'm not sure how to properly handle Copyright. I've > taken a guess and prepared a > patch anyway. > > Here's the situation. > > Updating to 1.8 was not trivial. A fix has been posted in a comment by > Sergei Trofimovich on > github[1]. It's a proper Guix patch, updating Go to 1.8, with the fix > and the trivial update stuff, > but as far as I can see not actually submitted to Guix. > > [1] https://github.com/golang/go/issues/19132#issuecomment-285897612 > > After this Go 1.8.1 has been released. The attached patch has the > trivial update stuff for 1.8.1 > and the fix by Sergei. I added Sergei to the Copyright section, but I'm > not sure if this is > correct, and if this is the way to do it. Also, I didn't find his e-mail > address, so I just added > his github page, in ()... > > A little messy, please let me know if I should do something differently. I consider the fix itself trivial thus I'm perfectly fine with not being attributed at all. Apologies for making it hard to track me down. I've added one of emails to github's front page. [ While the fix is trivial debugging was a bit more fun :) ] If you still like to add attribution (or have other reasons) feel free to add "Sergei Trofimovich <sly...@inbox.ru>" I didn't get to submitting something that works because some unrelated go-1.8.0 tests failed for me. go-1.8.1 fails in a similar way, but if it works for you it's very probable just my environment (x86_64-linux): guix-master $ ./pre-inst-env guix build go-1.8 # ../misc/cgo/test runtime/cgo: pthread_create failed: Resource temporarily unavailable scatter = 0x55ffc0 hello from C sqrt is: 0 SIGABRT: abort PC=0x771232c4 m=12 sigcode=18446744073709551610 Thanks for finishing go update! -- Sergei pgpkJjhmE5FdV.pgp Description: Цифровая подпись OpenPGP
Re: ld-wrapper is broken in core-updates due to guile-2.2 (host running guile-2.0)
On Fri, 14 Apr 2017 21:59:47 +0100 Sergei Trofimovich <sly...@inbox.ru> wrote: > Efraim noticed core-updates breakage on package libgpg-error. > > TL;DR: > > ld-wrapper package embeds guile-2.2 interpreter > to interpret ld.go bytecode built by guile-2.0. > I have no idea how to fix it but still decided to > share my findings so far. Confirmed guile-2.2 is triggering failure: reverting commit 34d624cef51f0e4eb4e888622b60fc2befe31fa7 ("gnu: Build derivations with Guile 2.2 by default.") fixes libgpg-error build. Another less obvious problem caused by guile-2.2 is triggered in bash-static: guix-core-updates $ ./pre-inst-env guix build bash-static The following derivation will be built: /gnu/store/hr3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv @ build-started /gnu/store/hr3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv - x86_64-linux /var/log/guix/drvs/hr//3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv.bz2 ice-9/psyntax.scm:1534:32: In procedure expand-macro: ice-9/psyntax.scm:1534:32: Syntax error: /gnu/store/bc7pyl426zaa2489qp97bqaycv2ir2v1-bash-static-4.4.12-guile-builder:1:2300: source expression failed to match any pattern in form (%modify-phases phases* (delete (quote move-development-files))) builder for `/gnu/store/hr3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv' failed with exit code 1 @ build-failed /gnu/store/hr3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv - 1 builder for `/gnu/store/hr3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv' failed with exit code 1 guix build: error: build failed: build of `/gnu/store/hr3g5avmb9fmgr047990r9mc6gmnq674-bash-static-4.4.12.drv' failed It looks like guile-2.2 has different syntax checking rules which is triggered by the following modify-phases call site: [ http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/bash.scm#n204 ] ... ((#:phases phases) `(modify-phases ,phases ;; No loadable modules. (delete 'move-development-files [ http://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/utils.scm#n550 ] ... (define-syntax-rule (modify-phases phases mod-spec ...) "Modify PHASES sequentially as per each MOD-SPEC, which may have one of the following forms: (delete ) (replace ) (add-before ) (add-after ) Where every <*-phase-name> is an expression evaluating to a symbol, and an expression evaluating to a procedure." (let* ((phases* phases) (phases* (%modify-phases phases* mod-spec)) ...) phases*)) (define-syntax %modify-phases (syntax-rules (delete replace add-before add-after) ((_ phases (delete old-phase-name)) (alist-delete old-phase-name phases)) ((_ phases (replace old-phase-name new-phase)) (alist-replace old-phase-name new-phase phases)) ((_ phases (add-before old-phase-name new-phase-name new-phase)) (alist-cons-before old-phase-name new-phase-name new-phase phases)) ((_ phases (add-after old-phase-name new-phase-name new-phase)) (alist-cons-after old-phase-name new-phase-name new-phase phases CCed Andy in case it's an obvious bug in guix or guile syntax rewriter. Reverting commit 34d624cef51f0e4eb4e888622b60fc2befe31fa7 ("gnu: Build derivations with Guile 2.2 by default.") fixes bash-static as well. -- Sergei pgpHeBSzGTiOX.pgp Description: Цифровая подпись OpenPGP
ld-wrapper is broken in core-updates due to guile-2.2 (host running guile-2.0)
Efraim noticed core-updates breakage on package libgpg-error. TL;DR: ld-wrapper package embeds guile-2.2 interpreter to interpret ld.go bytecode built by guile-2.0. I have no idea how to fix it but still decided to share my findings so far. Longer story: The sympthon is broken ld: $ ./pre-inst-env guix build libgpg-error ... checking whether the C compiler works... no configure: error: in `/tmp/guix-build-libgpg-error-1.26.drv-0/libgpg-error-1.26': configure: error: C compiler cannot create executables See `config.log' for more details Namely minimal linking (from config.log) fails as: configure:3724: checking whether the C compiler works configure:3746: gccconftest.c >&5 Backtrace: 5 (apply-smob/1 #) In ice-9/boot-9.scm: 710:2 4 (call-with-prompt ("prompt") # ?) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/command-line.scm: 181:18 2 (_ #) In unknown file: 1 (eval (load-compiled "/gnu/store/qv0w20gdi57ybganx82?") #) 0 (load-compiled/vm "/gnu/store/qv0w20gdi57ybganx82w8ymk1?") ERROR: In procedure load-compiled/vm: ERROR: In procedure load-thunk-from-memory: No such file or directory collect2: error: ld returned 1 exit status configure:3750: $? = 1 configure:3788: result: no configure: failed program was: | /* confdefs.h */ | int | main () | { | return 0; | } configure:3793: error: in `/tmp/guix-build-libgpg-error-1.26.drv-0/libgpg-error-1.26': configure:3795: error: C compiler cannot create executables See `config.log' for more details That's right: it's the guile's backtrace from gcc invocation. /tmp/guix-build-libgpg-error-1.26.drv-0/libgpg-error-1.26 $ ld Backtrace: 5 (apply-smob/1 #) In ice-9/boot-9.scm: 710:2 4 (call-with-prompt ("prompt") # …) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/command-line.scm: 181:18 2 (_ #) In unknown file: 1 (eval (load-compiled "/gnu/store/qv0w20gdi57ybganx82…") #) 0 (load-compiled/vm "/gnu/store/qv0w20gdi57ybganx82w8ymk1…") ERROR: In procedure load-compiled/vm: ERROR: In procedure load-thunk-from-memory: Backtrace tries to tell us that guile-2.2 cannot load ld.go file. Snippet from `which ld`: """ exec /gnu/store/kri8a2dy6dy0cdg0z41djn0pnn08515z-guile-2.2.0/bin/guile -c "(load-compiled \"/gnu/store/qv0w20gdi57ybganx82w8ymk1cwv7n2c-ld-wrapper-0/bin/ld.go\") (apply $main (cdr (command-line)))" "$@" """ File confirms bytecode is from incompatible 2.0 version: $ file /gnu/store/qv0w20gdi57ybganx82w8ymk1cwv7n2c-ld-wrapper-0/bin/ld.go /gnu/store/qv0w20gdi57ybganx82w8ymk1cwv7n2c-ld-wrapper-0/bin/ld.go: Guile Object, little endian, 64bit, bytecode v2.0 I think the problem comes from 'gnu/packages/base.scm:make-ld-wrapper' function which uses host's guile to compile ld.go, not bootstrapped guile: http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/base.scm#n458 (define* (make-ld-wrapper name #:key (target (const #f)) binutils (guile (canonical-package guile-2.0)) (bash (canonical-package bash)) (guile-for-build guile)) ... (arguments (let ((target (target (%current-system `(#:guile ,guile-for-build #:modules ((guix build utils)) #:builder (begin ... (chmod ld #o555) (compile-file ld #:output-file go)) Which guile is being used here for compile-file? 'build-for-build' or current host's guile? Looks like the requirement here is that both mush be of the same version. If it really is a requirement to run guile-2.2 perhaps adding early assertion would be nicer? I don't know how to add it either :) Thanks! -- Sergei pgpRfYhXl1VCX.pgp Description: Цифровая подпись OpenPGP
Re: [PATCH] gnu: Add LDFLAGS=-lpthread to configure-flags where needed.
On Tue, 21 Mar 2017 22:42:49 + Sergei Trofimovich <sly...@inbox.ru> wrote: > The behaviour was introduced in > https://sourceware.org/bugzilla/show_bug.cgi?id=20019 > > I'll try to write minimal reproducer with setjmp/longjmp and report it > upstream. Found existing one: https://sourceware.org/bugzilla/show_bug.cgi?id=21041 -- Sergei pgpbjBaDAJ97l.pgp Description: Цифровая подпись OpenPGP
Re: [PATCH] gnu: Add LDFLAGS=-lpthread to configure-flags where needed.
On Tue, 21 Mar 2017 10:17:26 +0100 John Darrington <j...@darrington.wattle.id.au> wrote: > On Tue, Mar 21, 2017 at 09:09:28AM +0000, Sergei Trofimovich wrote: > On Tue, 21 Mar 2017 02:22:11 +0100 > John Darrington <j...@darrington.wattle.id.au> wrote: > > > --- a/gnu/packages/image.scm > > +++ b/gnu/packages/image.scm > > @@ -80,6 +80,8 @@ > > (sha256 > > (base32 > "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq" > > (build-system gnu-build-system) > > + (arguments > > +`(#:configure-flags '("LDFLAGS=-lpthread"))) > > That's libpng-1.6.28, right? I've tried to reproduce the failure on > current > 'core-updates' master (x86_64-linux). It builds just fine: > > $ git describe > v0.12.0-2306-gf826c8c7e > > $ ./pre-inst-env guix build libpng --check --no-grafts -K > /gnu/store/vis7x2j2lsmwbl5m5w794c23ysqah8xh-libpng-1.6.28 > > At a glance source code of libpng and it's tests does not contain any > pthread calls. > > Do you have a build log with the failure? I wonder where missing symbols > come from. > > > Yes *IT* builds fine. It's just the thing that depend upon it that don't. > For example look at the most recent build attempt for pspp. Aha. I was not sure where to look at. Assuming hydra build at: https://hydra.gnu.org/jobset/gnu/core-updates#tabs-jobs I've filtered on 'pspp' in there. amd64 and i686 fail roughly the same at test phase. Linking phase looks OK. https://hydra.gnu.org/build/1927214/nixlog/1/raw https://hydra.gnu.org/build/1930649/nixlog/1/raw Looks exactly as local build failure on master for me. To get an error text you are fixing I looked at test failures. For example /tmp/guix-build-pspp-0.10.2.drv-0/pspp-0.10.2/tests/testsuite.dir/0001/testsuite.log That runs something like ../../../src/ui/terminal/pspp --testing-mode --error-file=- --no-output epoch.sps # -*- compilation -*- 1. calendar.at:3: testing epoch ... ./calendar.at:89: pspp --testing-mode --error-file=- --no-output epoch.sps --- /dev/null 2017-02-25 15:55:49.60431 + +++ /tmp/guix-build-pspp-0.10.2.drv-0/pspp-0.10.2/tests/testsuite.dir/at-groups/1/stderr 2017-03-21 22:02:35.240095562 + @@ -0,0 +1,2 @@ +/tmp/guix-build-pspp-0.10.2.drv-0/pspp-0.10.2/src/ui/terminal/.libs/pspp: Relink `/gnu/store/vis7x2j2lsmwbl5m5w794c23ysqah8xh-libpng-1.6.28/lib/libpng16.so.16' with `/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libpthread.so.0' for IFUNC symbol `longjmp' +/tmp/guix-build-pspp-0.10.2.drv-0/pspp-0.10.2/src/ui/terminal/.libs/pspp: Relink `/gnu/store/b837wr8ffw2ppbx1744a2xll70bh8h4c-freetype-2.7.1/lib/libfreetype.so.6' with `/gnu/store/rmjlycdgiq8pfy5hfi42qhw3k7p6kdav-glibc-2.25/lib/libpthread.so.0' for IFUNC symbol `longjmp' 1. calendar.at:3: 1. epoch (calendar.at:3): FAILED (calendar.at:89) It's a glibc-2.25 change that added runtime checking of IFUNC functions. (Functions that choose their implementation at application load time) Looks like a glibc bug. The behaviour was introduced in https://sourceware.org/bugzilla/show_bug.cgi?id=20019 I'll try to write minimal reproducer with setjmp/longjmp and report it upstream. -- Sergei pgp7CfslHspuh.pgp Description: Цифровая подпись OpenPGP
Re: [PATCH] gnu: Add LDFLAGS=-lpthread to configure-flags where needed.
On Tue, 21 Mar 2017 02:22:11 +0100 John Darringtonwrote: > --- a/gnu/packages/image.scm > +++ b/gnu/packages/image.scm > @@ -80,6 +80,8 @@ > (sha256 > (base32 > "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq" > (build-system gnu-build-system) > + (arguments > +`(#:configure-flags '("LDFLAGS=-lpthread"))) That's libpng-1.6.28, right? I've tried to reproduce the failure on current 'core-updates' master (x86_64-linux). It builds just fine: $ git describe v0.12.0-2306-gf826c8c7e $ ./pre-inst-env guix build libpng --check --no-grafts -K /gnu/store/vis7x2j2lsmwbl5m5w794c23ysqah8xh-libpng-1.6.28 At a glance source code of libpng and it's tests does not contain any pthread calls. Do you have a build log with the failure? I wonder where missing symbols come from. -- Sergei pgpRcDjFU9ETT.pgp Description: Цифровая подпись OpenPGP
Re: 'guix build --target=' handling questions
On Mon, 06 Mar 2017 17:04:18 +0100 l...@gnu.org (Ludovic Courtès) wrote: > Sergei Trofimovich <sly...@inbox.ru> skribis: > > >> Question time: > >> > >> - Is there a way to run 'guix environment --target=' in the same way as > >> 'guix build --target=' > >> sets it up? I'd like to see how both compilers are supposed to be > >> present in there. > >> > >> - Why default g++ in PATH is the host g++ and not target g++? > >> Target seems to make most sense if no explicit compiler is specified. > >> > >> - How to actually set CXX to point to target g++? > >> It looks like implicitly there already both host (through native-inputs) > >> and target (through build-inputs) compilers available. > >> I would expect something like > >> #:make-flags (list (string-append "CXX=" <.?.>)) > >> What should be in place of that "<.?.>" to refer to target g++? > > > > I think I've found a workaround at least for my third question. > > > > Both host and target compilers are available as g++ and ${target}-g++. > > > > Thus the following workaround seems to work: > > > > diff --git a/gnu/packages/regex.scm b/gnu/packages/regex.scm > > index f04cba706..a8fa689ab 100644 > > --- a/gnu/packages/regex.scm > > +++ b/gnu/packages/regex.scm > > @@ -20,11 +20,13 @@ > > > > (define-module (gnu packages regex) > >#:use-module ((guix licenses) #:prefix license:) > >#:use-module (guix packages) > >#:use-module (guix download) > > - #:use-module (guix build-system gnu)) > > + #:use-module (guix build-system gnu) > > + #:use-module (guix utils) ; for %current-target-system > > + ) > > > > (define-public re2 > > (package > > (name "re2") > > (version "2017-01-01") > > @@ -40,11 +42,15 @@ > > "0yij1ajh66h3pj3kfz7y0ldrsww8rlpjzaavyr5lchl98as1jq74" > > (build-system gnu-build-system) > > (arguments > >`(#:test-target "test" > > ;; There is no configure step, but the Makefile respects a prefix. > > -#:make-flags (list (string-append "prefix=" %output)) > > +#:make-flags (list (string-append "prefix=" %output) > > + (string-append "CXX=" ,(string-append (if > > (%current-target-system) > > + > > (string-append (%current-target-system) "-") > > + "") > > + "g++"))) > > As John wrote, this is the right fix for this package. Aha! > If you can send it with ‘git send-email’ (see > <https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>), Sent as: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26004 About the 'guix environment --target=' / 'guix build --target=' part or question: Would it make sense to have '--target=' support in 'guix environment' tool or is it too tricky? Thanks! -- Sergei pgphhaqvbAs20.pgp Description: Цифровая подпись OpenPGP
Re: 'guix build --target=' handling questions
> Question time: > > - Is there a way to run 'guix environment --target=' in the same way as 'guix > build --target=' > sets it up? I'd like to see how both compilers are supposed to be present > in there. > > - Why default g++ in PATH is the host g++ and not target g++? > Target seems to make most sense if no explicit compiler is specified. > > - How to actually set CXX to point to target g++? > It looks like implicitly there already both host (through native-inputs) > and target (through build-inputs) compilers available. > I would expect something like > #:make-flags (list (string-append "CXX=" <.?.>)) > What should be in place of that "<.?.>" to refer to target g++? I think I've found a workaround at least for my third question. Both host and target compilers are available as g++ and ${target}-g++. Thus the following workaround seems to work: diff --git a/gnu/packages/regex.scm b/gnu/packages/regex.scm index f04cba706..a8fa689ab 100644 --- a/gnu/packages/regex.scm +++ b/gnu/packages/regex.scm @@ -20,11 +20,13 @@ (define-module (gnu packages regex) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix utils) ; for %current-target-system + ) (define-public re2 (package (name "re2") (version "2017-01-01") @@ -40,11 +42,15 @@ "0yij1ajh66h3pj3kfz7y0ldrsww8rlpjzaavyr5lchl98as1jq74" (build-system gnu-build-system) (arguments `(#:test-target "test" ;; There is no configure step, but the Makefile respects a prefix. -#:make-flags (list (string-append "prefix=" %output)) +#:make-flags (list (string-append "prefix=" %output) + (string-append "CXX=" ,(string-append (if (%current-target-system) + (string-append (%current-target-system) "-") + "") + "g++"))) #:phases (modify-phases %standard-phases (delete 'configure) (add-after 'install 'delete-static-library (lambda* (#:key outputs #:allow-other-keys) It looks clumsy and potentially requires more tools to be wrapped like that. At least 'ar' for this package. Perhaps there is a function that already adds a "${target}-" and I've missed it? -- Sergei pgpaAoEdth0Gv.pgp Description: Цифровая подпись OpenPGP
'guix build --target=' handling questions
Hia! Before asking my questions I'll setup the scene first. The scene: I'm playing with cross-compiler support in guix. [ x86_64 -> alpha target as an example with this tiny patch: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25799 ] I've stumbled upon the two cases: working[1] and non-working[2]. [1] working: $ ./pre-inst-env guix build --check re2c --target=alpha-unknown-linux-gnu --no-grafts ... /gnu/store/15ibxf5xzcqzfx0xgb5s6qa5z2ah3avg-re2c-0.16 $ file /gnu/store/15ibxf5xzcqzfx0xgb5s6qa5z2ah3avg-re2c-0.16/bin/re2c /gnu/store/15ibxf5xzcqzfx0xgb5s6qa5z2ah3avg-re2c-0.16/bin/re2c: ELF 64-bit LSB executable, Works as expected. [2] non-working: $ ./pre-inst-env guix build --check re2 --target=alpha-unknown-linux-gnu --no-grafts ... /gnu/store/mg474j0gx56fdl6wrpaxxxwsdknl7k2i-re2-2017-01-01 $ file /gnu/store/mg474j0gx56fdl6wrpaxxxwsdknl7k2i-re2-2017-01-01/lib/libre2.so.0.0.0 /gnu/store/mg474j0gx56fdl6wrpaxxxwsdknl7k2i-re2-2017-01-01/lib/libre2.so.0.0.0: ELF 64-bit LSB shared object, x86-64 It seems that re2 derivation ignores --target and builds it's library with host compiler, not target compiler. Relevant re2 package snippet from http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/regex.scm#n27 (build-system gnu-build-system) (arguments `(#:test-target "test" ;; There is no configure step, but the Makefile respects a prefix. #:make-flags (list (string-append "prefix=" %output)) #:phases (modify-phases %standard-phases (delete 'configure) As we see here definition skips ./configure step (that's ok) and does not pass CXX=${target}-g++ to make flag. I wonder what are the possible options to override CXX here? Makefile for re2 is very straightforward: CXX?=g++ ... obj/%.o: %.cc $(HFILES) @mkdir -p $$(dirname $@) $(CXX) -c -o $@ $(CPPFLAGS) $(RE2_CXXFLAGS) $(CXXFLAGS) -DNDEBUG $*.cc ... obj/so/libre2.$(SOEXT): $(SOFILES) @mkdir -p obj/so $(MAKE_SHARED_LIBRARY) -o obj/so/libre2.$(SOEXTVER) $(SOFILES) ln -sf libre2.$(SOEXTVER) $@ Question time: - Is there a way to run 'guix environment --target=' in the same way as 'guix build --target=' sets it up? I'd like to see how both compilers are supposed to be present in there. - Why default g++ in PATH is the host g++ and not target g++? Target seems to make most sense if no explicit compiler is specified. - How to actually set CXX to point to target g++? It looks like implicitly there already both host (through native-inputs) and target (through build-inputs) compilers available. I would expect something like #:make-flags (list (string-append "CXX=" <.?.>)) What should be in place of that "<.?.>" to refer to target g++? Thank you! -- Sergei pgpvC797eBwEl.pgp Description: Цифровая подпись OpenPGP
[PATCH] gnu: ghc: remove unused 'libedit' input
ghc stopped using libedit (via editline) in 2009: https://git.haskell.org/ghc.git/commitdiff/46aed8a4a084add708bbd119d19905105d5f0d72 * gnu/packages/haskell.scm (ghc, ghc-8): remove 'libedit' input Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- gnu/packages/haskell.scm | 3 --- 1 file changed, 3 deletions(-) diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 37e35c45f..f9534b327 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -33,7 +33,6 @@ #:use-module (gnu packages gcc) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) - #:use-module (gnu packages libedit) #:use-module (gnu packages libffi) #:use-module (gnu packages lua) #:use-module (gnu packages maths) @@ -107,7 +106,6 @@ `(("gmp" ,gmp) ("ncurses" ,ncurses) ("libffi" ,libffi) - ("libedit" ,libedit) ("ghc-testsuite" ,(origin (method url-fetch) @@ -286,7 +284,6 @@ interactive environment for the functional language Haskell.") `(("gmp" ,gmp) ("ncurses" ,ncurses) ("libffi" ,libffi) - ("libedit" ,libedit) ("ghc-testsuite" ,(origin (method url-fetch) -- 2.11.1
Re: [PATCH] gnu: new re2c package, version 0.16
On Sun, 5 Feb 2017 00:47:30 + ng0 <contact@cryptolab.net> wrote: > On 17-02-04 17:43:23, Sergei Trofimovich wrote: > > Tested on x86_64-linux and i686-linux. > > > > * gnu/local.mk: add re2c.scm to dist > > * gnu/packages/re2c.scm: new file > > Cool! I had the same package somewhere, thanks for publishing yours :) > I think there's already a module this could go into. If there isn't (I > will check tomorrow), what about a more generic name which could hold a > class of applications? Just an idea. I mimicked flex which resides in standalone flex.scm. > I haven't run the code, these are just my initial remarks. Overall it > looks good, so the only criticism is really in the (description). > I think the beginning should be "Re2c (...)" or "@code{re2c} (...)" > > > +full-featured table-based lexers). Flexible API allows generated code to > > +be wired into virtually any environment. Instead of exposing traditional > > +yylex() style API, re2c exposes its internals. Be sure to take a look at Fixed in v2 patch. > I'm not sure, but I think the "yylex()" will have to be written as > @code{yylex()} or something similar. > > > +examples, they cover a lot of real-world cases and shed some light on dark > > +corners of re2c API.") Fixed in v2 patch. > I think "corners of the re2c API." would be correct? Author's spelling: https://raw.githubusercontent.com/skvadrik/re2c/gh-pages-gen/src/index.rst I'm not sure which is right: http://english.stackexchange.com/questions/10020/definite-article-before-schools-colleges-and-universities -- Sergei pgpafyA0UxvaF.pgp Description: Цифровая подпись OpenPGP
[PATCH v2] gnu: new re2c package, version 0.16
Tested on x86_64-linux and i686-linux. * gnu/local.mk: add re2c.scm to dist * gnu/packages/re2c.scm: new file CC: ng0 <contact@cryptolab.net> Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- Change since v1: texinfo-ified descriotion as suggested by ng0 gnu/local.mk | 1 + gnu/packages/re2c.scm | 47 +++ 2 files changed, 48 insertions(+) create mode 100644 gnu/packages/re2c.scm diff --git a/gnu/local.mk b/gnu/local.mk index 0948321c9..5c1634e02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =\ %D%/packages/ratpoison.scm \ %D%/packages/rdesktop.scm\ %D%/packages/rdf.scm \ + %D%/packages/re2c.scm\ %D%/packages/readline.scm\ %D%/packages/regex.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm new file mode 100644 index 0..c7f296638 --- /dev/null +++ b/gnu/packages/re2c.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Sergei Trofimovich <sly...@inbox.ru> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages re2c) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public re2c + (package +(name "re2c") +(version "0.16") +(source (origin + (method url-fetch) + (uri (string-append "https://github.com/skvadrik/; name + "/releases/download/" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8" +(build-system gnu-build-system) +(home-page "http://re2c.org/;) +(synopsis "Lexer generator for C/C++") +(description + "@code{re2c} generates minimalistic hard-coded state machine (as opposed +to full-featured table-based lexers). Flexible API allows generated code +to be wired into virtually any environment. Instead of exposing traditional +@code{yylex()} style API, re2c exposes its internals. Be sure to take a look +at examples, they cover a lot of real-world cases and shed some light on dark +corners of re2c API.") +(license public-domain))) -- 2.11.1
[PATCH] gnu: new re2c package, version 0.16
Tested on x86_64-linux and i686-linux. * gnu/local.mk: add re2c.scm to dist * gnu/packages/re2c.scm: new file Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- gnu/local.mk | 1 + gnu/packages/re2c.scm | 47 +++ 2 files changed, 48 insertions(+) create mode 100644 gnu/packages/re2c.scm diff --git a/gnu/local.mk b/gnu/local.mk index 0948321c9..5c1634e02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =\ %D%/packages/ratpoison.scm \ %D%/packages/rdesktop.scm\ %D%/packages/rdf.scm \ + %D%/packages/re2c.scm\ %D%/packages/readline.scm\ %D%/packages/regex.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm new file mode 100644 index 0..7c5698a82 --- /dev/null +++ b/gnu/packages/re2c.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Sergei Trofimovich <sly...@inbox.ru> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages re2c) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public re2c + (package +(name "re2c") +(version "0.16") +(source (origin + (method url-fetch) + (uri (string-append "https://github.com/skvadrik/; name + "/releases/download/" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8" +(build-system gnu-build-system) +(home-page "http://re2c.org/;) +(synopsis "Lexer generator for C/C++") +(description + "re2c generates minimalistic hard-coded state machine (as opposed to +full-featured table-based lexers). Flexible API allows generated code to +be wired into virtually any environment. Instead of exposing traditional +yylex() style API, re2c exposes its internals. Be sure to take a look at +examples, they cover a lot of real-world cases and shed some light on dark +corners of re2c API.") +(license public-domain))) -- 2.11.1
[PATCH] config-daemon.ac: detect host AR
The problem is seen when we try to use explicit host: ./configure --prefix=/usr --localstatedir=/var/lib --host=x86_64-pc-linux-gnu make V=1 Before the change: ar cru libstore.a nix/libstore/libstore_a-gc.o After the change: x86_64-pc-linux-gnu-ar cru libstore.a * config-daemon.ac: use AM_PROG_AR to detect host AR Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- config-daemon.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/config-daemon.ac b/config-daemon.ac index 056c939e3..42b59819d 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -5,6 +5,7 @@ AC_MSG_RESULT([$guix_build_daemon]) dnl C++ environment. This macro must be used unconditionnaly. AC_PROG_CXX +AM_PROG_AR AC_LANG([C++]) if test "x$guix_build_daemon" = "xyes"; then -- 2.11.1
[PATCH] gnu: new re2c package, version 0.16
Tested on x86_64-linux and i686-linux. * gnu/local.mk: add re2c.scm to dist * gnu/packages/re2c.scm: new file Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- gnu/local.mk | 1 + gnu/packages/re2c.scm | 47 +++ 2 files changed, 48 insertions(+) create mode 100644 gnu/packages/re2c.scm diff --git a/gnu/local.mk b/gnu/local.mk index 0948321c9..5c1634e02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =\ %D%/packages/ratpoison.scm \ %D%/packages/rdesktop.scm\ %D%/packages/rdf.scm \ + %D%/packages/re2c.scm\ %D%/packages/readline.scm\ %D%/packages/regex.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm new file mode 100644 index 0..7c5698a82 --- /dev/null +++ b/gnu/packages/re2c.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Sergei Trofimovich <sly...@inbox.ru> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages re2c) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public re2c + (package +(name "re2c") +(version "0.16") +(source (origin + (method url-fetch) + (uri (string-append "https://github.com/skvadrik/; name + "/releases/download/" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8" +(build-system gnu-build-system) +(home-page "http://re2c.org/;) +(synopsis "Lexer generator for C/C++") +(description + "re2c generates minimalistic hard-coded state machine (as opposed to +full-featured table-based lexers). Flexible API allows generated code to +be wired into virtually any environment. Instead of exposing traditional +yylex() style API, re2c exposes its internals. Be sure to take a look at +examples, they cover a lot of real-world cases and shed some light on dark +corners of re2c API.") +(license public-domain))) -- 2.11.1
[PATCH] config-daemon.ac: detect host AR
The problem is seen when we try to use explicit host: ./configure --prefix=/usr --localstatedir=/var/lib --host=x86_64-pc-linux-gnu make V=1 Before the change: ar cru libstore.a nix/libstore/libstore_a-gc.o After the change: x86_64-pc-linux-gnu-ar cru libstore.a * config-daemon.ac: use AM_PROG_AR to detect host AR Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- config-daemon.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/config-daemon.ac b/config-daemon.ac index 056c939e3..42b59819d 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -5,6 +5,7 @@ AC_MSG_RESULT([$guix_build_daemon]) dnl C++ environment. This macro must be used unconditionnaly. AC_PROG_CXX +AM_PROG_AR AC_LANG([C++]) if test "x$guix_build_daemon" = "xyes"; then -- 2.11.1
[PATCH] gnu: new re2c package, version 0.16
Tested on x86_64-linux and i686-linux. * gnu/local.mk: add re2c.scm to dist * gnu/packages/re2c.scm: new file Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- gnu/local.mk | 1 + gnu/packages/re2c.scm | 47 +++ 2 files changed, 48 insertions(+) create mode 100644 gnu/packages/re2c.scm diff --git a/gnu/local.mk b/gnu/local.mk index 0948321c9..5c1634e02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES =\ %D%/packages/ratpoison.scm \ %D%/packages/rdesktop.scm\ %D%/packages/rdf.scm \ + %D%/packages/re2c.scm\ %D%/packages/readline.scm\ %D%/packages/regex.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm new file mode 100644 index 0..7c5698a82 --- /dev/null +++ b/gnu/packages/re2c.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Sergei Trofimovich <sly...@inbox.ru> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages re2c) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public re2c + (package +(name "re2c") +(version "0.16") +(source (origin + (method url-fetch) + (uri (string-append "https://github.com/skvadrik/; name + "/releases/download/" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8" +(build-system gnu-build-system) +(home-page "http://re2c.org/;) +(synopsis "Lexer generator for C/C++") +(description + "re2c generates minimalistic hard-coded state machine (as opposed to +full-featured table-based lexers). Flexible API allows generated code to +be wired into virtually any environment. Instead of exposing traditional +yylex() style API, re2c exposes its internals. Be sure to take a look at +examples, they cover a lot of real-world cases and shed some light on dark +corners of re2c API.") +(license public-domain))) -- 2.11.1
[PATCH] config-daemon.ac: detect host AR
The problem is seen when we try to use explicit host: ./configure --prefix=/usr --localstatedir=/var/lib --host=x86_64-pc-linux-gnu make V=1 Before the change: ar cru libstore.a nix/libstore/libstore_a-gc.o After the change: x86_64-pc-linux-gnu-ar cru libstore.a * config-daemon.ac: use AM_PROG_AR to detect host AR Signed-off-by: Sergei Trofimovich <sly...@inbox.ru> --- config-daemon.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/config-daemon.ac b/config-daemon.ac index 056c939e3..42b59819d 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -5,6 +5,7 @@ AC_MSG_RESULT([$guix_build_daemon]) dnl C++ environment. This macro must be used unconditionnaly. AC_PROG_CXX +AM_PROG_AR AC_LANG([C++]) if test "x$guix_build_daemon" = "xyes"; then -- 2.11.1