Subject: Re: bug#47274: Linphone Packages

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 29 Mar 2021 00:03:16 -0400

Hi Raghav!

Raghav Gururajan <[email-masked]> writes:

> Hello Guix!
>
>> Fixed it in the attached patch-set. The app works now. \o/
>
> Spoke too soon. :/
>
> New error now.
>
>> Anyway, I think we can do something for the following, w.r.t
>> linphone-desktop:
>> [1] Warnings. Fixing them might prevent them to become errors.
>> [2] Better solution than symlinks in 'post-install phase. Because
>> linphone-desktop should be able to read files in /lib and /share of 
>> *all* of its dependencies. Not just for those we made symlinks for,
>> which is a temporary fix.
>> Regarding [1], for one of the warnings, I tried creating symlink 
>> "{linphone-desktop}/lib" --> "{liblinphone}/lib", which worked. But
>> is it the correct way?
>> Regarding [2], I tried wrapping the program with XDG_DATA_DIRS, but
>> didn't work.
>
> Looks like we need to do something about the [2]. The new error is
> because of that. I can fix this new error with another symlink, but
> new ones will keep happening.
>
> Context:
> The old error that I mentioned and fixed in my previous email is,
> "[Error]Core:linphone: Could not load grammar vcard_grammar because
> the file could not be located.".
> The new error I am mentioning in this email is, "[Error]Core:linphone:
> Could not load grammar identity_grammar because the file could not be 
> located."
>
> Regards,
> RG.

I think I've managed to fix the issue, with the following:

--8<---------------cut here---------------start------------->8---
 (let* ((out (assoc-ref outputs "out"))
                    (liblinphone (assoc-ref inputs "liblinphone"))
                    (grammar-dest (string-append out
                    "/share/belr/grammars")))
               [...]     
               (mkdir-p (dirname grammar-dest))
               (symlink (string-append liblinphone "/share/belr/grammars")
                        grammar-dest)
--8<---------------cut here---------------end--------------->8---

At least it launches now, and everything seems to work.

Will submit it soon!

Thank you :-)

Maxim