Re: libelf uri broken?

2019-05-25 Thread John Soo
Excellent, thanks T G-R!

> On May 25, 2019, at 6:40 PM, Tobias Geerinckx-Rice  wrote:
> 
> John,
> 
> John Soo wrote:
>> I was wondering if the url we use for the origin of libelf is still valid. I 
>> tried curl and it redirected to an unresolved address.  Looks like we have 
>> some substitutes on hydra, so it wasn’t such a problem. Just checking 
> 
> To complement the Hydra substitute, I've replaced the original source URL 
> with two third-party mirrors, and the home-page field with a web.archive.org 
> link, in commit f3addff21c074e3f655d2108be6a21b93f598498.  Thanks for the 
> report!
> 
> Kind regards,
> 
> T G-R



Re: libelf uri broken?

2019-05-25 Thread Tobias Geerinckx-Rice

John,

John Soo wrote:
I was wondering if the url we use for the origin of libelf is 
still valid. I tried curl and it redirected to an unresolved 
address.  Looks like we have some substitutes on hydra, so it 
wasn’t such a problem. Just checking 


To complement the Hydra substitute, I've replaced the original 
source URL with two third-party mirrors, and the home-page field 
with a web.archive.org link, in commit 
f3addff21c074e3f655d2108be6a21b93f598498.  Thanks for the report!


Kind regards,

T G-R


signature.asc
Description: PGP signature


libelf uri broken?

2019-05-25 Thread John Soo
Hi guix,

I was wondering if the url we use for the origin of libelf is still valid. I 
tried curl and it redirected to an unresolved address.  Looks like we have some 
substitutes on hydra, so it wasn’t such a problem. Just checking. 

- John


Re: X/GDM fails on linux 5.0.7 AMD Radeon RX 580 after system reconfigure

2019-05-25 Thread ison
Are you using GuixSD or Guix on top of another distro?

It seemed to me that when my caches were empty the first application I'd run
would cause the shaders to be rebuilt with whatever version of llvm that
application was built with.
And it also seems that the issue goes both ways, so if you run an application
that builds the shaders with llvm6 then all applications which expect 7 will
show artifacts, and vice versa, if you clear your cache and then immediately run
a program which builds the shaders with llvm7 then any programs which expect
llvm6 will see artifacts.

So it sounds to me like you have a combination of programs built with these
conflicting versions.
In my case, since I'm running GuixSD, I just did a full upgrade, cleared both
caches, and then restarted my machine. Haven't had an issue since.

However, if you're using just Guix on another distro, then perhaps the host
distro software uses llvm6 while your Guix applications use llvm7?
If that's the case then I'm not sure what the best solution to that would be.
Perhaps you could just consider re-installing the affected Guix applications
with:
guix package -i your_program --with-input=llvm=llvm@6.0.1
until your host distro updates to llvm7.



Re: gold linker and collect2: fatal error: cannot find 'ld'

2019-05-25 Thread Pjotr Prins
The tests are looking for gold. That *is* the problem. You can build
ldc with ld, but the ldc compiler is looking for gold. When you make
gold available at test time it will work.

Pj.

On Sat, May 25, 2019 at 06:35:37PM +0200, Pierre Neidhardt wrote:
> Alright, this works now.
> 
> I'm using Pjotr's patch
> https://gitlab.com/genenetwork/guix/commits/ldc-1.14-20190222/gnu/packages/dlang.scm
> to build ldc 1.14, but I hit the opposite issue of what was initially
> described in this post:
> 
> - It does not seem to build against gold, it seems to use the regular
>   binutils.
> - Tests fail because they can't find 'ld'.
> 
> The first failing test is:
> --8<---cut here---start->8---
>  1552/1587 Test #1552: druntime-test-aa 
> ...***Failed  
>   0.49 sec
>  make[1]: Entering directory 
> '/tmp/guix-build-ldc-1.14.0.drv-0/ldc-1.14.0/runtime/druntime/test/aa'
>  /tmp/guix-build-ldc-1.14.0.drv-0/build/bin/ldmd2   -w -I../../src 
> -I../../import -Isrc -defaultlib= -debuglib= -dip1000 
> -L/tmp/guix-build-ldc-1.14.0.drv-0/build/lib/libdruntime-ldc.a -O -release 
> -of/tmp/guix-build-ldc-1.14.0.drv-0/build/runtime/druntime-test-aa/test_aa 
> src/test_aa.d
>  collect2: fatal error: cannot find 'ld'
>  compilation terminated.
> --8<---cut here---end--->8---
> 
> I don't really understand how it can fail to find 'ld' considering it's
> supposed to be building with binutils.
> 
> Am I missing something?  Pjotr?
> 
> -- 
> Pierre Neidhardt
> https://ambrevar.xyz/





Re: Rust dependency on git

2019-05-25 Thread Ivan Petkov
Hi Marius

> On May 24, 2019, at 3:45 AM, Marius Bakke  wrote:
> 
> It seems odd to me that the release tarballs would run 'git ls-files'
> anyway.  Do they actually contain a git repository?  Would it work to
> simply replace the invokation with 'find’?

Managed to get a chance to dig into this a bit more. The tidy test as a pass
to ensure that no binary files have been accidentally committed into the
repository. It seems like a slight oversight in assuming that the test suite is
run directly on the source repo and not from a source tarball.

It only takes commenting out a single line to unblock things for building in 
Guix
(I'll be submitting a patch once I can verify it builds locally). I'll also try
to open an issue upstream.

Thanks,
--Ivan




Re: Documentation videos are being uploaded!

2019-05-25 Thread Laura Lazzati
Hey Hey!

Thanks for the compliments to everyone :)

Working with Paul during the last months has been great and Gábor,
Björn, Ricardo and Ludo had  played a very important role while I was
an intern too ;) . And also some Guix folks.
Ok, let's keep the 3 min constraint for future videos and maybe split
them into several, like we did with the ones that needed more time?
Like I said, I will answer back when all the videos are uploaded, but
if you take a look before that you will see some of them before that.

Regards :)
Laura



Re: Add helper for .desktop file creation?

2019-05-25 Thread Pierre Neidhardt
Just thought of maybe the best of both approaches:  use a #:rest
argument to iterate over all keys.  This way we don't allow unspecified
keys (no risk for typos) and the code of the function remains lean.

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature


Re: Video narration

2019-05-25 Thread Laura Lazzati
Hi Paul!


> The method I use to track packages is to search at
> https://guix-hpc.bordeaux.inria.fr/browse
Thanks! My bad, I knew about this site but I never tracked a package,
it is very useful. When I finish with the videos I will see if I can
shed some light at least.

> Perhaps your test has revealed a bug in the Guix packaging of totem.
Hope not :P

Regards :)
Laura



Re: Let's merge staging!

2019-05-25 Thread Arun Isaac

> Anything missing before the freeze?

I closed issue 32102 and pushed a patch to core-updates-next back in
November 2018, but it seems to have been lost somehow. It's still not in
master. Can we include it now in staging?

https://issues.guix.info/issue/32102


signature.asc
Description: PGP signature


Re: gold linker and collect2: fatal error: cannot find 'ld'

2019-05-25 Thread Pierre Neidhardt
Alright, this works now.

I'm using Pjotr's patch
https://gitlab.com/genenetwork/guix/commits/ldc-1.14-20190222/gnu/packages/dlang.scm
to build ldc 1.14, but I hit the opposite issue of what was initially
described in this post:

- It does not seem to build against gold, it seems to use the regular
  binutils.
- Tests fail because they can't find 'ld'.

The first failing test is:
--8<---cut here---start->8---
 1552/1587 Test #1552: druntime-test-aa 
...***Failed
0.49 sec
 make[1]: Entering directory 
'/tmp/guix-build-ldc-1.14.0.drv-0/ldc-1.14.0/runtime/druntime/test/aa'
 /tmp/guix-build-ldc-1.14.0.drv-0/build/bin/ldmd2   -w -I../../src 
-I../../import -Isrc -defaultlib= -debuglib= -dip1000 
-L/tmp/guix-build-ldc-1.14.0.drv-0/build/lib/libdruntime-ldc.a -O -release 
-of/tmp/guix-build-ldc-1.14.0.drv-0/build/runtime/druntime-test-aa/test_aa 
src/test_aa.d
 collect2: fatal error: cannot find 'ld'
 compilation terminated.
--8<---cut here---end--->8---

I don't really understand how it can fail to find 'ld' considering it's
supposed to be building with binutils.

Am I missing something?  Pjotr?

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature


Re: Add helper for .desktop file creation?

2019-05-25 Thread Danny Milosavljevic
Hi,

I agree that it would be nice to have such a helper function.  But we should
also report a bug upstream for the affected packages.  Not having a desktop
file means that a normal user (TM) can't start the program.
I'd say that's a pretty bad bug.

As a stopgap, we can work around it, but it makes much more sense to fix it at
the source long term.


pgpG78JxOKGuL.pgp
Description: OpenPGP digital signature


Re: Add helper for .desktop file creation?

2019-05-25 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> - string, boolean, numeric : string, possibly with a check for boolean
>   (throw an error if not "true" or "false"),

or simply:

- boolean : #t, #f
- numeric : number
- string : string




Re: Add helper for .desktop file creation?

2019-05-25 Thread Nicolas Goaziou
Pierre Neidhardt  writes:

> You are absolutely right, my initial implementation is not ready for
> merge, but it's already useful as a proof of concept.

Certainly. Also, it is a step in the right direction.

> Would you happen to know where this is implemented in Nix?



It is very straightforward, actually. There is not much to borrow.

> Or... I'm thinking we could do even better: use #:allow-other-keys then
> generate the entry from the key symbol (e.g. #:categories would generate
> "Categories").  This way the function would not have to hard-code the
> keys.

Making typos would be easier, then. I'd rather have a more limited, yet
more robust, function. I.e., I think it is better to stick to standard
keys. Otherwise, it adds little over current solution.

> Regarding your point on the string vs. list values, I suggest we accept
> both for all arguments and we string-join the lists.

If we go the "limited" route, we should also pay attention to expected
value types, i.e., only accept list of strings for entries with
"string(s)" values. Semicolons would need to be escaped when a list of
strings is allowed, too. 

In a nutshell, my suggestion would be:

- string, boolean, numeric : string, possibly with a check for boolean
  (throw an error if not "true" or "false"),

- string(s) : string, or list of strings, semicolons are escaped
  automatically,

- localestring : alist with "lang" as keys and strings as values, with
  a default key (possibly #f), or a plain string if there is only the
  default key.

This is more work than on the #:allow-other-keys options, but I think it
would make for a better tool.

WDYT?



Re: Add helper for .desktop file creation?

2019-05-25 Thread Amin Bandali
Hi Pierre, Nicolas,

Pierre Neidhardt  writes:

[...]

> Would you happen to know where this is implemented in Nix?
> Otherwise I'll look at the doc you've linked.
>

It seems to be implemented here [1].  For examples of use, look for
“makeDesktopItem”.

[1]: 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/make-desktopitem/default.nix

Best,
amin



Re: Installer: GUIX_IMAGE as /dev/sda on some hardware?

2019-05-25 Thread Giovanni Biscuolo
Hi Tobias,

thanks for sharing your experience, I'm cross posting to guix-devel
since it's worth discussing a patch to the installer

Tobias Geerinckx-Rice  writes:

> Giovanni Biscuolo wrote:
>> This is **very** important when installing grub, in fact grub
>> installation failed when instantiating my config.scm on the HP 
>> ProLiant
>> simply because it was on /dev/sda pointing to the USB media;
>
> /dev/xdyN names have never been safe to use in this way

I'm not talking about partitions ;-)

According my faulty memory (I cannot reproduce it now)
/dev/sd is what the Installer writes in the bootloader
section of config.scm:

--8<---cut here---start->8---

  (bootloader
(bootloader-configuration
  (bootloader grub-bootloader)
  (target "/dev/sda")
  (keyboard-layout keyboard-layout)))

--8<---cut here---end--->8---

and that caused the Installer to fail on grub-install since /dev/sda was
my USB media, (fortunately it failed because there was no space for grub
:-) )

On the other hand, by setting "/dev/sdb" whould made grub-install
succeed when running from USB but fail when running from the system
itself

[...]

>> 3. how is the USB media "relocated" to the last /dev/sd? device 
>> by the installer?
>
> It's… not?

So it's pure coincidence that grub-install on /dev/sda succeedes on the
whole set of machines users are installing via USB media? :-O

> Dev nodes & names are doled out by the kernel.  As 
> you've discovered, they aren't to be relied on, and you should use 
> labels or UUIDs instead.

Labels and UUIDs are for volumes, not for the whole disk ;-)

I'm not talking about filesystem config, where using labels or UUIDS is
strongly recommended (and used by the Installer), I'm talking about
grub-install config

But wait! There's the /dev/disk/by-id/ tree, I did not notice it until
now! :-)

That's the solution:

--8<---cut here---start->8---

  (bootloader
(bootloader-configuration
  (bootloader grub-bootloader)
  (target "/dev/disk/by-id/scsi-3600508b1001c75a3bebb04b23d19e249")
  (keyboard-layout keyboard-layout)))

--8<---cut here---end--->8---

I did not test this but it smells like running, if Guix devels agree I
think Installer should adopt /dev/disk/by-id by default, sorry I'm not
able to propose a patch for this

[...]

> Hoping to have scared you into using UUIDs,

Yes! You did it (albeit it is disk/by-id and not UUIDs) :-D

Thanks for your suggestions! Gio'.

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: Add helper for .desktop file creation?

2019-05-25 Thread Pierre Neidhardt
Thanks for the feedback!

You are absolutely right, my initial implementation is not ready for
merge, but it's already useful as a proof of concept.

Would you happen to know where this is implemented in Nix?
Otherwise I'll look at the doc you've linked.

Or... I'm thinking we could do even better: use #:allow-other-keys then
generate the entry from the key symbol (e.g. #:categories would generate
"Categories").  This way the function would not have to hard-code the keys.

Regarding your point on the string vs. list values, I suggest we accept
both for all arguments and we string-join the lists.

Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature


Re: Add helper for .desktop file creation?

2019-05-25 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

>> (display
>>  (string-append
>>   "[Desktop Entry]" "\n"
>>   "Encoding=" encoding "\n"

Also, "Encoding" is deprecated. It may be worth using `maybe-print' for
this one.




Re: Add helper for .desktop file creation?

2019-05-25 Thread Nicolas Goaziou
Hello,

Pierre Neidhardt  writes:

> Quite a bunch of packages need to provide their own .desktop since
> upstream does not provide them.  It's very evident in games.scm in
> particular.

Interestingly, I had the same itch recently.

> It seems to be a good opportunity to factor this out.  What about the
> following?
>
> --8<---cut here---start->8---
> (define* (make-desktop-file destination #:key
> (encoding "UTF-8")
> name
> (generic-name name)
> comment
> exec
> icon
> (startup-notify "true")
> (terminal "false")
> (type "Application")
> (categories "Application"))
>   "Create a desktop file at DESTINATION for executable EXEC with name NAME.
> Other arguments are optional."
>   (let ((maybe-print (lambda (key value)
>(if value
>(string-append key "=" value "\n")
>""
> (mkdir-p (dirname destination))
> (with-output-to-file destination
>   (lambda _
> (display
>  (string-append
>   "[Desktop Entry]" "\n"
>   "Encoding=" encoding "\n"
>   "Name=" name "\n"
>   "GenericName=" generic-name "\n"
>   (maybe-print "Comment" comment)
>   "Exec=" exec "\n"
>   (maybe-print "Icon" icon)
>   "StartupNotify=" startup-notify "\n"
>   "Terminal=" terminal "\n"
>   "Type=" type "\n"
>   "Categories=" categories "\n"))
> --8<---cut here---end--->8---

It looks interesting. I have a couple of suggestions, if you don't mind:
- some items are missing, e.g., "Keywords". 

  As you may know, you can have a look at
   for a full list.

- some items you use a list of strings instead of a string (e.g.,
  "Keywords", "Categories"),

- it would be nice to handle localized values for keys. For example
  `drascula' package uses "Comment[fr]". It could possibly be
  implemented with an alist as the value.

I know Nix provides such a function, but I haven't looked at its
implementation yet.

Regards,

-- 
Nicolas Goaziou



Let's merge staging!

2019-05-25 Thread Marius Bakke
Hello!

The staging branch has been accumulating updates for a while now.
We have Mesa 19, Sphinx 2.0, GStreamer 1.16, ALSA 1.1.9, as well as some
Python updates.  See `git shortlog -n master..staging` for the scoop.

I suggest we "freeze" (meaning no further updates, only bugfixes) this
branch tomorrow at midnight UTC, and then merge it once the CI lights
are green.

Anything missing before the freeze?


signature.asc
Description: PGP signature