public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Error with infinality font while emerging sane-backends
@ 2018-03-28  3:17 Danny YUE
  2018-03-28  4:34 ` Floyd Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Danny YUE @ 2018-03-28  3:17 UTC (permalink / raw
  To: Gentoo User

Hi folks,

I am trying to emerge xsane, which requires sane-backends.
However, the sane-backends package fails forever with error message like
below:
--- BEGIN ---
Fontconfig error: Cannot load config file "infinality/conf.d"
Error: /invalidfont in /findfont
--- END ---

I have only "52-infinality.conf" enabled in "eselect fontconfig".
I suppose this is a problem related to infinality fontconfig I am using.
But how am I supposed to fix this?
I googled a lot but no result. :-(

The full build log is here: https://pastebin.com/8fjnqmHw
emerge --info: https://pastebin.com/aharCut1

Thanks in advance for any potential help. :-)

Danny


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Error with infinality font while emerging sane-backends
  2018-03-28  3:17 [gentoo-user] Error with infinality font while emerging sane-backends Danny YUE
@ 2018-03-28  4:34 ` Floyd Anderson
  2018-03-28  5:58   ` Danny YUE
  0 siblings, 1 reply; 5+ messages in thread
From: Floyd Anderson @ 2018-03-28  4:34 UTC (permalink / raw
  To: gentoo-user

On Wed, 28 Mar 2018 11:17:59 +0800
Danny YUE <sheepduke@gmail.com> wrote:
>Hi folks,
>
>I am trying to emerge xsane, which requires sane-backends.
>However, the sane-backends package fails forever with error message like
>below:
>--- BEGIN ---
>Fontconfig error: Cannot load config file "infinality/conf.d"
>Error: /invalidfont in /findfont
>--- END ---
>
>I have only "52-infinality.conf" enabled in "eselect fontconfig".
>I suppose this is a problem related to infinality fontconfig I am using.
>But how am I supposed to fix this?

That is probably because media-libs/fontconfig seems not to canonicalise 
relative target path for symlinks.

As a quick, but volatile, solution you can re-create symlink:

    ln -s /etc/fonts/infinality/styles.conf.avail/linux \
          /etc/fonts/infinality/conf.d

or you have to patch the module:

    /usr/share/eselect/modules/infinality.eselect

of app-eselect/eselect-infinality-1 to use full qualified paths.

Test configuration loading afterwards, e.g. with `fc-match monospace`.
---
 infinality.eselect | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/infinality.eselect b/infinality.eselect
index 8f397dc..8b069ae 100644
--- a/infinality.eselect
+++ b/infinality.eselect
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 2005-2012 Gentoo Foundation
+# Copyright 2005-2018 Gentoo Foundation
 # Distributed under the terms of the GNU GPL version 2 or later
 #
 # Original author: MeisterP <poncho@spahan.ch>
@@ -34,7 +34,8 @@ set_symlink() {
     [[ -z ${target} || ! -d ${EROOT}/etc/fonts/infinality/styles.conf.avail/${target} ]] \
         && die -q "Target \"$1\" doesn't appear to be valid!"

-    ln -s "styles.conf.avail/${target}" "${EROOT}/etc/fonts/infinality/conf.d"
+    ln -s "${EROOT}/etc/fonts/infinality/styles.conf.avail/${target}" \
+        "${EROOT}/etc/fonts/infinality/conf.d"
     echo "Selected style: ${target}"
     echo "You should set eselect lcdfilter to match your current style"
 }
-- 
2.16.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Error with infinality font while emerging sane-backends
  2018-03-28  4:34 ` Floyd Anderson
@ 2018-03-28  5:58   ` Danny YUE
  2018-03-28 14:55     ` Floyd Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Danny YUE @ 2018-03-28  5:58 UTC (permalink / raw
  To: gentoo-user


On 2018-03-28 04:34, Floyd Anderson <f.a@31c0.net> wrote:
> On Wed, 28 Mar 2018 11:17:59 +0800
> Danny YUE <sheepduke@gmail.com> wrote:
>>Hi folks,
>>
>>I am trying to emerge xsane, which requires sane-backends.
>>However, the sane-backends package fails forever with error message like
>>below:
>>--- BEGIN ---
>>Fontconfig error: Cannot load config file "infinality/conf.d"
>>Error: /invalidfont in /findfont
>>--- END ---
>>
>>I have only "52-infinality.conf" enabled in "eselect fontconfig".
>>I suppose this is a problem related to infinality fontconfig I am using.
>>But how am I supposed to fix this?
>
> That is probably because media-libs/fontconfig seems not to canonicalise
> relative target path for symlinks.
>
> As a quick, but volatile, solution you can re-create symlink:
>
>    ln -s /etc/fonts/infinality/styles.conf.avail/linux \
>          /etc/fonts/infinality/conf.d
>
> or you have to patch the module:
>
>    /usr/share/eselect/modules/infinality.eselect
>
> of app-eselect/eselect-infinality-1 to use full qualified paths.
>
> Test configuration loading afterwards, e.g. with `fc-match monospace`.
> ---
> infinality.eselect | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/infinality.eselect b/infinality.eselect
> index 8f397dc..8b069ae 100644
> --- a/infinality.eselect
> +++ b/infinality.eselect
> @@ -1,5 +1,5 @@
> # -*-eselect-*-  vim: ft=eselect
> -# Copyright 2005-2012 Gentoo Foundation
> +# Copyright 2005-2018 Gentoo Foundation
> # Distributed under the terms of the GNU GPL version 2 or later
> #
> # Original author: MeisterP <poncho@spahan.ch>
> @@ -34,7 +34,8 @@ set_symlink() {
>     [[ -z ${target} || ! -d ${EROOT}/etc/fonts/infinality/styles.conf.avail/${target} ]] \
>         && die -q "Target \"$1\" doesn't appear to be valid!"
>
> -    ln -s "styles.conf.avail/${target}" "${EROOT}/etc/fonts/infinality/conf.d"
> +    ln -s "${EROOT}/etc/fonts/infinality/styles.conf.avail/${target}" \
> +        "${EROOT}/etc/fonts/infinality/conf.d"
>     echo "Selected style: ${target}"
>     echo "You should set eselect lcdfilter to match your current style"
> }

Thanks for your quick reply :-)

I created the symbolic link as you told, but it still does not
work...same error message.

--- BEGIN ---
~ $ ll /etc/fonts/infinality/
total 20k
drwxr-xr-x   4 root           root     4.0k 2018-03-28 12:43 .
drwxr-xr-x   5 root           root     4.0k 2018-03-24 12:17 ..
lrwxrwxrwx   1 root           root       45 2018-03-28 12:43 conf.d -> /etc/fonts/infinality/styles.conf.avail/linux
drwxr-xr-x   3 root           root     4.0k 2017-11-11  2017 conf.src
-rw-r--r--   1 root           root     3.7k 2017-11-11  2017 infinality.conf
drwxr-xr-x  11 root           root     4.0k 2017-11-11  2017 styles.conf.avail
--- END ---

https://pastebin.com/DGuzvmNx



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Error with infinality font while emerging sane-backends
  2018-03-28  5:58   ` Danny YUE
@ 2018-03-28 14:55     ` Floyd Anderson
  2018-04-05  6:48       ` Danny YUE
  0 siblings, 1 reply; 5+ messages in thread
From: Floyd Anderson @ 2018-03-28 14:55 UTC (permalink / raw
  To: gentoo-user

On Wed, 28 Mar 2018 13:58:21 +0800
Danny YUE <sheepduke@gmail.com> wrote:
>
>
>Thanks for your quick reply :-)
>
>I created the symbolic link as you told,

That solves the:

	Fontconfig error: failed reading config file
	Fontconfig error: Cannot load config file "infinality/conf.d"

errors – they’re gone.

>but it still does not
>work...same error message.

Now you have to solve the:

	Error: /invalidfont in /findfont

	Last OS error: No such file or directory
	GPL Ghostscript 9.21: Error: /invalidfont in /findfont

errors. The culprit seems here the Type-1 font selection, see bug 
#620148 [1]. Commenting the mentioned section in:

    /etc/fonts/infinality/infinality.conf

works here, bumping Ghostscript to version 9.23 doesn’t.

Hope that helps. If not, you probably can temporarily rename:

    /usr/bin/fig2dev (package media-gfx/transfig)

to hide it from the media-gfx/sane-backends build process, so it wont 
build the PDF documentation. Previously sane-backends-1.0.27 compiles 
fine without media-gfx/xfig and therefore media-gfx/transfig.


Reference:
  [1] <https://bugs.gentoo.org/show_bug.cgi?id=620148>



-- 
Regards,
floyd



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Error with infinality font while emerging sane-backends
  2018-03-28 14:55     ` Floyd Anderson
@ 2018-04-05  6:48       ` Danny YUE
  0 siblings, 0 replies; 5+ messages in thread
From: Danny YUE @ 2018-04-05  6:48 UTC (permalink / raw
  To: gentoo-user


On 2018-03-28 14:55, Floyd Anderson <f.a@31c0.net> wrote:
> On Wed, 28 Mar 2018 13:58:21 +0800
> Danny YUE <sheepduke@gmail.com> wrote:
>>
>>
>>Thanks for your quick reply :-)
>>
>>I created the symbolic link as you told,
>
> That solves the:
>
> 	Fontconfig error: failed reading config file
> 	Fontconfig error: Cannot load config file "infinality/conf.d"
>
> errors – they’re gone.
>
>>but it still does not
>>work...same error message.
>
> Now you have to solve the:
>
> 	Error: /invalidfont in /findfont
>
> 	Last OS error: No such file or directory
> 	GPL Ghostscript 9.21: Error: /invalidfont in /findfont
>
> errors. The culprit seems here the Type-1 font selection, see bug
> #620148 [1]. Commenting the mentioned section in:
>
>    /etc/fonts/infinality/infinality.conf
>
> works here, bumping Ghostscript to version 9.23 doesn’t.
>
> Hope that helps. If not, you probably can temporarily rename:
>
>    /usr/bin/fig2dev (package media-gfx/transfig)
>
> to hide it from the media-gfx/sane-backends build process, so it wont build
> the PDF documentation. Previously sane-backends-1.0.27 compiles fine without
> media-gfx/xfig and therefore media-gfx/transfig.
>
>
> Reference:
>  [1] <https://bugs.gentoo.org/show_bug.cgi?id=620148>

Oops, I did not really see this email last week...my stupidity.

Thank you so much Floyd, you solved my problem perfectly.

After commenting out the section, the font problem never appeared any
more.

However the PDF file still refuses to build.
I knew the solution: disable parallel compilation feature.

After that it worked.

Thanks again!

Danny


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-05  6:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-28  3:17 [gentoo-user] Error with infinality font while emerging sane-backends Danny YUE
2018-03-28  4:34 ` Floyd Anderson
2018-03-28  5:58   ` Danny YUE
2018-03-28 14:55     ` Floyd Anderson
2018-04-05  6:48       ` Danny YUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox