IRC channel logs

2014-07-07.log

back to list of logs

<civodul>Hello Guix!
<jmd>Sometimes I find that guix build just sits for ages apparently doing nothing.
<jmd>Top indicates no significant CPU or IO usage
<jmd`>I don't understand why guix build sits for so long, apparently doing nothing. Is there some way to speed it up?
<sneek>Welcome back jmd`, you have 5 messages.
<sneek>jmd`, mark_weaver says: 'concatenate' in srfi-1 takes a list of lists and appends them, e.g. (concatenate '((a b c) (1 2 3) (x y z))) => (a b c 1 2 3 x y z)
<sneek>jmd`, mark_weaver says: if the string literals use the same syntax as Guile's string literals, and if the commas always immediately follow the close quotes, then you could do something as simple as this: http://paste.lisp.org/display/139018
<sneek>jmd`, mark_weaver says: if you want to implement a more general state machine to parse the string, then I'd still recommend 'with-input-from-string', and remember that state machines can be implemented very nicely in Scheme using a set of mutually-recursive procedures (one for each state) that tail-call each other.
<sneek>jmd`, mark_weaver says: here's an example of how to do a similar job using a state machine: http://paste.lisp.org/+2Z9M/1
<sneek>jmd`, mark_weaver says: note that the syntax recognized by that state machine is a bit different, but you could adapt to whatever syntax you want.
<civodul>jmd`: try --no-substitutes
<civodul>hydra.gnu.org is overloaded these days
<jmd`>Oh. I will try that.
<jmd`>civodul: That seems to be the problem thanks.
<jmd`>
<jmd`>Although I don't understand it, because in this case it shouldn't have needed any substitutes
<civodul>i've noticed in the past cases where it checks for substitutes even though it shouldn't
<civodul>could you file a bug for that?
<civodul>the thing was already built, right?
<jmd`>I think so. Yes.
<civodul>ok, so definitely a bug
<jmd`>Is there no --verbose flag or something to make it announce that it is checking for substitutes.
<civodul>not currently
<civodul>that's fixed in wip-http-pipelining
<civodul>however, that requires server-side caching
<civodul>and nobody has offered help on setting up Apache httpd and all that correctly
<civodul>yet :-)
<jmd`>I need to get the destdir of another package. How can I do that?
<jmd>I need to put the installdir of another package into #:configure-flags
<jmd>How can I do that?
<sirius>jmd: use %build-inputs. It's bound to a alist containing the paths to the inputs.
<jmd>sirius: I will try it. Thanks.
<jmd>sirius: gnu/packages/telephony.scm:162:64: In procedure arguments:
<jmd>gnu/packages/telephony.scm:162:64: In procedure module-lookup: Unbound variable: %build-inputs
<jmd>
<sirius>jmd: did you quote it the right way? For me this example works: (arguments '(#:configure-flags `(,(assoc-ref %build-inputs "gcc"))))
<jmd>sirius: You were right. I had quoted it wrong.
<jmd>I think that pkg-config is not working properly in cross-builds
*davexunit is comparing Guix with Vagrant
<davexunit>it seems to me that Guix can eat Vagrant's lunch with no problem.
<Steap>How can you compare Vagrant and Guix ?
<davexunit>looks like Vagrant is used mostly to generate VM images that contain a dev environment for a specific application.
<Steap>They're two really different pieces of software, if I'm nost mistaken
<Steap>not*
<jmd>Steap: (cmp Guix Vagrant)
<davexunit>Steap: they have at least some feature overlap
<davexunit>I'm trying to find out how much
<Steap>davexunit: I use it at work to quickly fire up a VM
<Steap>and not care about how it's configured
<davexunit>the docs I've read about vagrant so far have shown me nothing that guix can't do.
<jmd>I think there are a lot of principles which guix shares with aegis.
<davexunit>`guix system` can generate a new VM image with everything you need to develop something
<jmd>Although so far as I am aware the code is completely separate.
<Steap>davexunit: looks cool
<Steap>davexunit: Vagrant can also import a VM of another OS, such as Ubuntu or Fedora
<davexunit>sure, if you don't want to use GNU, vagrant would be what you want to use.
<jmd>Maybe Guix was made for Vagrant
<Steap>well, don't really have a choice at work :)
<davexunit>I'm approaching this from the perspective of wanting to run the GNU system.
<Steap>ok
<jmd>... it even has a homeless-shelter
<davexunit>Steap: yeah, my last job was a Ruby shop and I was stuck with OS X.
<jmd>What is the #:builder argument for?
<davexunit>for packages?
<Steap>davexunit: better than Windows :) At least you have a Unix shell
<davexunit>from what I can tell, builder is an argument to the trivial-build-system
<davexunit>Steap: now I use Trisquel at work :)
<Steap>davexunit: nice job you got there
<Steap>may I ask what you do for a living ?
<davexunit>Steap: web development for the FSF
<davexunit>(new employee)
<Steap>Working for the FSF, cool
<Steap>Web dev, not so cool :)
<davexunit>that's what I did at my last job, too.
<davexunit>seems to be all the jobs out there these days
<Steap>Sadly enough, yes.
<davexunit>I'm a bit worried about getting coralled into the "web dev" group for my entire career because it just so happens that my professional work has been in web dev.
<davexunit>I'm perfectly capable of programming all types of software :)
<davexunit>web dev just happens to be what pays right now.
<Steap>You could get another job and do something else, but working with the FSF is a big plus :)
<davexunit>yeah, I am happy to be working at the FSF.
<davexunit>though, since it's a charity I work for less than market salary.
<Steap>do they employ a lot of programmers ?
<davexunit>no.
<Steap>yes, you've got a really special job
<davexunit>we have ~12 employees, and right now only myself and our sysadmin are programmers.
<jmd>So now I know who to blame for the things that don't work!
<davexunit>only for some things!!! :P
<davexunit>dinner time. bbl
<jmd>civodul: Hey ludo.
<jmd>I think the logic in pkg-config.scm is wrong
<civodul>how so?
<civodul>is there any logic in there? :-)
<jmd>Well there is a hack which does this: ;; Create a `TARGET-pkg-config' -> `pkg-config' symlink.
<jmd> ;; This satisfies the pkg.m4 macros, which use
<jmd> ;; AC_PROG_TOOL to determine the `pkg-config' program
<jmd> ;; name.
<jmd> (symlink native (string-append bin "/" prog))))))
<jmd>
<civodul>yes, and so what?
<civodul>it's a Smart Hackā„¢
<jmd>But it only does it for builds where the target is not native.
<jmd>It should be the other way araound.
<civodul>hm?
<civodul>oooh, i see
<jmd>Better still, it should not do it at all. Instead it should set the variable PKG_CONFIG to the point to the binary.
<civodul>actually no, i'm a bit lost
<civodul>do you have an example where it doesn't work as you'd expect?
<jmd>Well packages which use pkg-config have (native-inputs `(("pkg-config" ,pkg-config)))
<jmd>So, if I am cross building ...
<civodul>you're mistaken
<civodul>even if it's in 'native-inputs', %current-target-system points to the target
<civodul>so it does work as expected
<jmd>Now I'm lost...
<civodul>for instance we're able to cross-compile guile-2.0, tec.
<civodul>*etc.
<civodul>the thing is, %current-target-system is set whenever you're cross-compiling
<civodul>so when cross-compiling something that has pkg-config as an input or native-input, you automatically get the cross-pkg-config
<civodul>regardless of whether it's an input or a native-input
<civodul>however, if it's a native-input, the cross-pkg-config is not cross-compiled itself
<civodul>long story short: don't think about it, it works
<civodul>:-)
<jmd>Well I am cross compiling a package, and I have declared pkg-config as a native input, and am surprised to see that PATH contains /gnu/store/...-target/bin
<civodul>that's the intented outcome
<civodul>*intended, even
<jmd>and that contains a binary "TARGET-pkg-config"
<jmd>which is a native binary.
<civodul>yes, that's the goal of this hack
<civodul>what's wrong with that?
<jmd>But there is no "pkg-config" in PATH
<civodul>yes, and so, is one needed?
<jmd>Of course. ./configure fails because it cannot find pkg-config
<civodul>what package is that?
<jmd>One that I haven't submitted yet.
<civodul>(reminds me that gdb does it the wrong way)
<civodul>anyway, any package that uses pkg.m4 will just work
<civodul>however, if the package uses AC_PROG_PATH or similar, then that'll fail
<civodul>but for those packages, there's probably an ac_cv_ variable that can be set to work around the problem
<civodul>though it's painful
<jmd>it would be ok if we setenv "PKG_CONFIG" to the path of that binary.
<civodul>ok
<jmd>Ah you're right. This package has some nastyness in configure.ac
<davexunit>civodul: so I made an operating system definition and generated a VM image from it. when I update the OS definition, should I run `guix system init` or build a new VM image?
<civodul>davexunit: build a new VM image
<jmd>ERROR: In procedure memoize-variable-access!:
<jmd>ERROR: Unbound variable: %current-target-system
<jmd>
<jmd>Seems to work for other packages. Why doesn't it work for me?
<civodul>davexunit: from that image, you could run 'guix system reconfigure', which is how you'd update a running system
<civodul>jmd: (use-modules (guix packages))
<jmd>I have #:use-module (guix packages)
<jmd>
<civodul>then could you send more details?
<jmd>#:phases (alist-cons-before
<jmd> 'configure 'pre-conf
<jmd> (lambda* (#:key inputs outputs #:allow-other-keys)
<jmd> (let ((pkg-config (assoc-ref %build-inputs "pkg-config")))
<jmd> (setenv "PKG_CONFIG" (string-append pkg-config "/bin/" (%current-target-system) "-pkg-config"))))
<jmd> %standard-phases)
<civodul>jmd: that's because (%current-target-system) is a host-side variable, not a build-side variable
<davexunit>civodul: thanks!
<civodul>jmd: so you need to unquote here: ,(%current-target-system)
<civodul>but that's not so simple
<civodul>because it can be #f
<civodul>so you need to check that
<jmd>Right, thanks
*civodul prepares dmd 0.2
<davexunit>woo! interested in seeing what the big changes are.
<davexunit>I haven't yet dared to dig into the code.
<civodul>mostly small changes, but it fixes various annoyances
<civodul>davexunit: BTW, how far did you manage to go with the image on USB?
<davexunit>civodul: I got it to boot, but I don't have a spare machine to install to right now, so I'm blocked.
<davexunit>I'm thinking of asking the FSF if I can borrow an x60, but I don't know if it's possible.
<civodul>ok
<davexunit>I can't sacrifice from x220 right now.
<davexunit>and my desktop machine has a complicated setup with multiple operating systems that I'm afraid of screwing up.
<davexunit>sorry I can't test the install further, I *really* want to get it installed onsomething.
<civodul>np!
<civodul>it's always a bit tricky to go to the next step
<civodul>same for me ;-)