Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aydin bundle fails to start on linux with fontconfig 2.13/2.14 #163

Open
anntzer opened this issue Apr 28, 2022 · 6 comments
Open

aydin bundle fails to start on linux with fontconfig 2.13/2.14 #163

anntzer opened this issue Apr 28, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@anntzer
Copy link

anntzer commented Apr 28, 2022

Describe the bug
Unpacking the aydin bundle and trying to run ./run_aydin.sh on a linux (fedora or arch) box with fontconfig 2.13 or fontconfig 2.14 installed at the OS level fails with

Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/48-spacing.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: FcPattern object weight does not accept value [40 210)

(even though these are listed as "warnings", they seem to break the process).
(@AhmetCanSolak You may remember that I communicated this issue to you privately as well.)

To Reproduce
See above.

Expected behavior
No error.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Fedora 35 or Arch Linux (rolling)
  • Version: N/A

Additional context
I believe this occurs because the aydin process from the bundle uses the bundled libfontconfig.so (which is 2.12.06), but the fontconfig config files that comes with the OS (at /etc/fonts/conf.d), which use elements ("description") that are only understood by newer versions of fontconfig. Forcing the use of OS-level fontconfig (and the corresponding dependencies freetype and harfbuzz) via LD_PRELOAD =/usr/lib/libfreetype.so:/usr/lib/libharfbuzz.so:/usr/lib/libfontconfig.so solves the issue, for example; perhaps it could work to just not vendor these shared objects and assume that the host OS has recent enough versions of them? (possibly pre-running a small check that this is indeed the case)

@anntzer anntzer added the bug Something isn't working label Apr 28, 2022
@AhmetCanSolak AhmetCanSolak self-assigned this Apr 28, 2022
@AhmetCanSolak
Copy link
Collaborator

Hi @anntzer ! Thank you for the bug report. Yes I remember we previously communicated about this issue.

I will check if we can ship the bundle without libfontconfig.so and make use of OS-level fontconfig files and let you know.

Meanwhile if you don't mind you can give the pypi version a chance with pip install aydin and let me know if you face the same/similar problem again?

@AhmetCanSolak
Copy link
Collaborator

Indeed I removed libfontconfig.so.1, libfreetype.so.6 and libfreetype-21ca3c10.so.6.18.2 from v0.1.13 linux bundle, and it seems to work that way on ubuntu20.04+. Could you do the same test on Fedora 35 @anntzer ?

I will also need to verify this on ubuntu18.04+ tomorrow, then if works for Fedora 35 too I can make a PR to address this for future bundles.

@anntzer
Copy link
Author

anntzer commented Apr 29, 2022

Unfortunately I don't have readily access to a fedora machine anymore these days.

@AhmetCanSolak
Copy link
Collaborator

no worries @anntzer ! I will get my hands on one Fedora 35 machine and test. I will keep you posted.

@AhmetCanSolak
Copy link
Collaborator

hello @anntzer ,

I finally got a Fedora machine and I have some good news and some bad news.

good news: pip install aydin on Fedora works great as far as I tested.
bad news: With Aydin bundle I am not, yet, able to reproduce the problem you shared. I faced multiple other gnome/qt/fontconfig/freetype related errors indeed. Solved some of them but not all. As we discussed before, I can basically remove the libfontconfig.so.1, libfreetype.so.6 and libfreetype-21ca3c10.so.6.18.2 files from our bundle but I am not convinced, that alone would help to make our bundle work on different Fedora installations. I might also try to make a fedora-specific build in a github-action with a fedora docker image if that helps. What do you think?

@anntzer
Copy link
Author

anntzer commented May 12, 2022

Perhaps trying a docker image on GHA would work indeed. Sorry, I (mostly) don't have access anymore to the old fedora machine of the original (private) bug reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants