all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fabien SK <fabsk@free.fr>
To: 41177@debbugs.gnu.org
Subject: bug#41177: Fontconfig issues in Java applications that use fonts
Date: Sun, 3 Jan 2021 15:48:17 +0100	[thread overview]
Message-ID: <11250641-ee7a-94e8-d3c4-ebdabc1c5036@free.fr> (raw)
In-Reply-To: <1589126137.10294.0@terracrypt.net>

I faced the issue when running josm (downloaded from 
josm.openstreetmap.de, not the guix package). Using "strace" showed me 
that it failed because it cannot load "libfontconfig.so" (it tries in 
several directories). If I add the directory of libfontconfig.so to 
LD_LIBRARY_PATH, then it starts.
I have limited knowledge about how shared libraries are found. I tried 
to understand how "geany" manages to load libfontconfig.so. It looks 
like it depends on libgeany, libgtk3 and libpango which depend on 
libfontconfig. When I do a "readelf -a" on these libraries, I can see in 
their "RUNPATH" the path of "libfontconfig.so":
0x000000000000001d (RUNPATH)            Bibliothèque 
runpath:[/gnu/store/avjxs6qgyginkiq6qpk9280zakkaj35h-graphite2-1.3.13/lib:/gnu/store/xwl0p4m34bcan0v9vkjkyzwi6znsv4dm-pixman-0.38.4/lib:/gnu/store/y9fdy234r6hqiacd7hgwlmbdsngbp8p1-fontconfig-2.13.1/lib:…

Regarding Java, I think (but I'm not sure) that it's loaded by 
"libawt_xawt.so". In fontpath.c [1], there is a dlopen of libfontconfig. 
But if I do a "ldd" on the shared library itself, it looks like it does 
not depend on libfontconfig.so.
[1] 
https://github.com/openjdk/jdk16/blob/37043b05576c8b81b43ac41a8f06de0d0bbb3f5b/src/java.desktop/unix/native/common/awt/fontpath.c#L566
Also libfontconfig is not on its RUNPATH:

0x000000000000001d (RUNPATH)            Bibliothèque 
runpath:[$ORIGIN:/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib:/gnu/store/w09mqfj1yy32r2fr02nndzs34m4f9ipp-libxext-1.3.4/lib:/gnu/store/4ildmh169dixyn05mlgjz07x4d2hcq2g-libx11-1.6.A/lib:/gnu/store/8m6368gv4z10n6i31ppbr8nxziwmlp3f-libxrender-0.9.10/lib:/gnu/store/cgsk20z1gcw78fdm7bwlb2l49xh7bmzk-libxtst-1.2.3/lib:/gnu/store/b4dk2y4vf98dhxnr0p6f5h4d86vqndkc-libxi-1.7.10/lib:/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.5.0/../../..]

I'm quite a beginner in term of Guix (I only played with it in a VM), 
and I hope this information will be useful to somebody. I don't 
understand how the dependencies between executable and libraries are 
supposed to be done in Guix. I can see that sometimes in /gnu/store 
there are symbolic links of shared libraries into other packages. I 
assume that sometimes this RUNPATH is used.





  reply	other threads:[~2021-01-03 20:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 15:55 bug#41177: Fontconfig issues in Java applications that use fonts Jonathan Frederickson
2021-01-03 14:48 ` Fabien SK [this message]
2021-01-06 11:05   ` Ludovic Courtès
2021-02-02  9:11     ` Björn Höfling
2021-02-11 23:23       ` Björn Höfling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11250641-ee7a-94e8-d3c4-ebdabc1c5036@free.fr \
    --to=fabsk@free.fr \
    --cc=41177@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.