unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Software running in a container fails when using fontconfig?
@ 2024-11-14 21:16 Simen Endsjø
  2024-11-15 10:17 ` Edouard Klein
  0 siblings, 1 reply; 4+ messages in thread
From: Simen Endsjø @ 2024-11-14 21:16 UTC (permalink / raw)
  To: help-guix


Hi, I'm packaging a piece of software which crashes when launching
chromium embedded framework.

The error is
  Fontconfig error: Cannot load default config file: No such file: (null)

I found a similar issue for Nix which suggests the error is caused by
fontconfig not being installed globally and suggests a patch:
https://github.com/NixOS/nixpkgs/issues/176081#issuecomment-1145903568

I tried creating a symlink at /etc/fonts/fonts.conf, but while I get
further, it still crashes.

  sudo ln -s ~/.config/fontconfig/fonts.conf /etc/fonts/fonts.conf

  Fontconfig warning: no <cachedir> elements found. Check configuration.
  Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
  Fontconfig warning: adding <cachedir prefix="xdg">fontconfig</cachedir>
  Trace/breakpoint trap

/var/cache/fontconfig is on a read-only filesystem, so I cannot
experiment with adding it there.

I tried adding all fonts and fontconfig to my system configuration, but
this didn't generate /etc/fonts/fonts.conf nor /var/cache/fontconfig/*.

Unfortunately, I haven't been able to test the Nix patch as my naive `-L
~/code/guix` fails to compile various modules.

Any input before I spent a lot of time trying to get this Nix patch working?


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

* Re: Software running in a container fails when using fontconfig?
  2024-11-14 21:16 Software running in a container fails when using fontconfig? Simen Endsjø
@ 2024-11-15 10:17 ` Edouard Klein
  2024-11-15 11:53   ` Simen Endsjø
  0 siblings, 1 reply; 4+ messages in thread
From: Edouard Klein @ 2024-11-15 10:17 UTC (permalink / raw)
  To: Simen Endsjø; +Cc: help-guix

Hi,

This may miss the mark wildly, but I remember having trouble with
fontconfig in a container a few months ago and solving it with
--emulate-fhs  maybe this is worth a try.

Cheers,

Edouard.
Simen Endsjø <contact@simendsjo.me> writes:

> Hi, I'm packaging a piece of software which crashes when launching
> chromium embedded framework.
>
> The error is
>   Fontconfig error: Cannot load default config file: No such file: (null)
>
> I found a similar issue for Nix which suggests the error is caused by
> fontconfig not being installed globally and suggests a patch:
> https://github.com/NixOS/nixpkgs/issues/176081#issuecomment-1145903568
>
> I tried creating a symlink at /etc/fonts/fonts.conf, but while I get
> further, it still crashes.
>
>   sudo ln -s ~/.config/fontconfig/fonts.conf /etc/fonts/fonts.conf
>
>   Fontconfig warning: no <cachedir> elements found. Check configuration.
>   Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
>   Fontconfig warning: adding <cachedir prefix="xdg">fontconfig</cachedir>
>   Trace/breakpoint trap
>
> /var/cache/fontconfig is on a read-only filesystem, so I cannot
> experiment with adding it there.
>
> I tried adding all fonts and fontconfig to my system configuration, but
> this didn't generate /etc/fonts/fonts.conf nor /var/cache/fontconfig/*.
>
> Unfortunately, I haven't been able to test the Nix patch as my naive `-L
> ~/code/guix` fails to compile various modules.
>
> Any input before I spent a lot of time trying to get this Nix patch working?


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

* Re: Software running in a container fails when using fontconfig?
  2024-11-15 10:17 ` Edouard Klein
@ 2024-11-15 11:53   ` Simen Endsjø
  2024-11-15 14:24     ` Edouard Klein
  0 siblings, 1 reply; 4+ messages in thread
From: Simen Endsjø @ 2024-11-15 11:53 UTC (permalink / raw)
  To: Edouard Klein; +Cc: help-guix

Thanks, but it didn't quite work. It did however trigger a state where I can avoid the bug.
Instead of the embedded html showing directly, I get a warning stating that it is disabled because of security. I can choose to disable the sandbox, and the application restarts, showing the html, crashing again. So I can just not disable the sandbox and avoid triggering the bug.

On Fri, Nov 15, 2024, at 11:17, Edouard Klein wrote:
> Hi,
> 
> This may miss the mark wildly, but I remember having trouble with
> fontconfig in a container a few months ago and solving it with
> --emulate-fhs  maybe this is worth a try.
> 
> Cheers,
> 
> Edouard.
> Simen Endsjø <contact@simendsjo.me> writes:
> 
> > Hi, I'm packaging a piece of software which crashes when launching
> > chromium embedded framework.
> >
> > The error is
> >   Fontconfig error: Cannot load default config file: No such file: (null)
> >
> > I found a similar issue for Nix which suggests the error is caused by
> > fontconfig not being installed globally and suggests a patch:
> > https://github.com/NixOS/nixpkgs/issues/176081#issuecomment-1145903568
> >
> > I tried creating a symlink at /etc/fonts/fonts.conf, but while I get
> > further, it still crashes.
> >
> >   sudo ln -s ~/.config/fontconfig/fonts.conf /etc/fonts/fonts.conf
> >
> >   Fontconfig warning: no <cachedir> elements found. Check configuration.
> >   Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
> >   Fontconfig warning: adding <cachedir prefix="xdg">fontconfig</cachedir>
> >   Trace/breakpoint trap
> >
> > /var/cache/fontconfig is on a read-only filesystem, so I cannot
> > experiment with adding it there.
> >
> > I tried adding all fonts and fontconfig to my system configuration, but
> > this didn't generate /etc/fonts/fonts.conf nor /var/cache/fontconfig/*.
> >
> > Unfortunately, I haven't been able to test the Nix patch as my naive `-L
> > ~/code/guix` fails to compile various modules.
> >
> > Any input before I spent a lot of time trying to get this Nix patch working?
> 

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

* Re: Software running in a container fails when using fontconfig?
  2024-11-15 11:53   ` Simen Endsjø
@ 2024-11-15 14:24     ` Edouard Klein
  0 siblings, 0 replies; 4+ messages in thread
From: Edouard Klein @ 2024-11-15 14:24 UTC (permalink / raw)
  To: Simen Endsjø; +Cc: help-guix


¯⁠\⁠_⁠ʘ⁠‿⁠ʘ⁠_⁠/⁠¯   https://xkcd.com/763/

If it works, it works ;o)


Simen Endsjø <contact@simendsjo.me> writes:

> Thanks, but it didn't quite work. It did however trigger a state where I can avoid the bug.
> Instead of the embedded html showing directly, I get a warning stating that it
> is disabled because of security. I can choose to disable the sandbox, and the
> application restarts, showing the html, crashing again. So I can just not
> disable the sandbox and avoid triggering the bug.
>
> On Fri, Nov 15, 2024, at 11:17, Edouard Klein wrote:
>> Hi,
>>
>> This may miss the mark wildly, but I remember having trouble with
>> fontconfig in a container a few months ago and solving it with
>> --emulate-fhs  maybe this is worth a try.
>>
>> Cheers,
>>
>> Edouard.
>> Simen Endsjø <contact@simendsjo.me> writes:
>>
>> > Hi, I'm packaging a piece of software which crashes when launching
>> > chromium embedded framework.
>> >
>> > The error is
>> >   Fontconfig error: Cannot load default config file: No such file: (null)
>> >
>> > I found a similar issue for Nix which suggests the error is caused by
>> > fontconfig not being installed globally and suggests a patch:
>> > https://github.com/NixOS/nixpkgs/issues/176081#issuecomment-1145903568
>> >
>> > I tried creating a symlink at /etc/fonts/fonts.conf, but while I get
>> > further, it still crashes.
>> >
>> >   sudo ln -s ~/.config/fontconfig/fonts.conf /etc/fonts/fonts.conf
>> >
>> >   Fontconfig warning: no <cachedir> elements found. Check configuration.
>> >   Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
>> >   Fontconfig warning: adding <cachedir prefix="xdg">fontconfig</cachedir>
>> >   Trace/breakpoint trap
>> >
>> > /var/cache/fontconfig is on a read-only filesystem, so I cannot
>> > experiment with adding it there.
>> >
>> > I tried adding all fonts and fontconfig to my system configuration, but
>> > this didn't generate /etc/fonts/fonts.conf nor /var/cache/fontconfig/*.
>> >
>> > Unfortunately, I haven't been able to test the Nix patch as my naive `-L
>> > ~/code/guix` fails to compile various modules.
>> >
>> > Any input before I spent a lot of time trying to get this Nix patch working?
>>


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

end of thread, other threads:[~2024-11-15 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 21:16 Software running in a container fails when using fontconfig? Simen Endsjø
2024-11-15 10:17 ` Edouard Klein
2024-11-15 11:53   ` Simen Endsjø
2024-11-15 14:24     ` Edouard Klein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).