conda-forge / fontconfig-feedstock

A conda-smithy repository for fontconfig.
BSD 3-Clause "New" or "Revised" License
0 stars 16 forks source link

fontconfig 2.13.1 for Windows missing DLL after installation #49

Open agitter opened 2 years ago

agitter commented 2 years ago

Issue: When I install fontconfig on Windows 10, no DLL is included. This causes an error with the weasyprint package that has fontconfig as a dependency https://github.com/conda-forge/weasyprint-feedstock/issues/31.

I ran conda create -n fc-test -c conda-forge fontconfig to install only fontconfig and its dependencies. No DLL was installed in the new environment directory. I don't know the details of conda packaging, but I noticed the file conda-meta/fontconfig-2.13.1-h1989441_1005.json in the environment directory doesn't list any DLL:

``` "files": [ "Library/bin/fc-cache.exe", "Library/bin/fc-cat.exe", "Library/bin/fc-conflist.exe", "Library/bin/fc-list.exe", "Library/bin/fc-match.exe", "Library/bin/fc-pattern.exe", "Library/bin/fc-query.exe", "Library/bin/fc-scan.exe", "Library/bin/fc-validate.exe", "Library/etc/fonts/conf.d/10-hinting-slight.conf", "Library/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", "Library/etc/fonts/conf.d/20-unhint-small-vera.conf", "Library/etc/fonts/conf.d/30-metric-aliases.conf", "Library/etc/fonts/conf.d/40-nonlatin.conf", "Library/etc/fonts/conf.d/45-generic.conf", "Library/etc/fonts/conf.d/45-latin.conf", "Library/etc/fonts/conf.d/49-sansserif.conf", "Library/etc/fonts/conf.d/50-user.conf", "Library/etc/fonts/conf.d/51-local.conf", "Library/etc/fonts/conf.d/60-generic.conf", "Library/etc/fonts/conf.d/60-latin.conf", "Library/etc/fonts/conf.d/65-fonts-persian.conf", "Library/etc/fonts/conf.d/65-nonlatin.conf", "Library/etc/fonts/conf.d/69-unifont.conf", "Library/etc/fonts/conf.d/80-delicious.conf", "Library/etc/fonts/conf.d/90-synthetic.conf", "Library/etc/fonts/conf.d/README", "Library/etc/fonts/fonts.conf", "Library/include/fontconfig/fcfreetype.h", "Library/include/fontconfig/fcprivate.h", "Library/include/fontconfig/fontconfig.h", "Library/lib/fontconfig.lib", "Library/lib/pkgconfig/fontconfig.pc", "Library/share/fontconfig/conf.avail/10-autohint.conf", "Library/share/fontconfig/conf.avail/10-hinting-full.conf", "Library/share/fontconfig/conf.avail/10-hinting-medium.conf", "Library/share/fontconfig/conf.avail/10-hinting-none.conf", "Library/share/fontconfig/conf.avail/10-hinting-slight.conf", "Library/share/fontconfig/conf.avail/10-no-sub-pixel.conf", "Library/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf", "Library/share/fontconfig/conf.avail/10-sub-pixel-bgr.conf", "Library/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf", "Library/share/fontconfig/conf.avail/10-sub-pixel-vbgr.conf", "Library/share/fontconfig/conf.avail/10-sub-pixel-vrgb.conf", "Library/share/fontconfig/conf.avail/10-unhinted.conf", "Library/share/fontconfig/conf.avail/11-lcdfilter-default.conf", "Library/share/fontconfig/conf.avail/11-lcdfilter-legacy.conf", "Library/share/fontconfig/conf.avail/11-lcdfilter-light.conf", "Library/share/fontconfig/conf.avail/20-unhint-small-vera.conf", "Library/share/fontconfig/conf.avail/25-unhint-nonlatin.conf", "Library/share/fontconfig/conf.avail/30-metric-aliases.conf", "Library/share/fontconfig/conf.avail/40-nonlatin.conf", "Library/share/fontconfig/conf.avail/45-generic.conf", "Library/share/fontconfig/conf.avail/45-latin.conf", "Library/share/fontconfig/conf.avail/49-sansserif.conf", "Library/share/fontconfig/conf.avail/50-user.conf", "Library/share/fontconfig/conf.avail/51-local.conf", "Library/share/fontconfig/conf.avail/60-generic.conf", "Library/share/fontconfig/conf.avail/60-latin.conf", "Library/share/fontconfig/conf.avail/65-fonts-persian.conf", "Library/share/fontconfig/conf.avail/65-khmer.conf", "Library/share/fontconfig/conf.avail/65-nonlatin.conf", "Library/share/fontconfig/conf.avail/69-unifont.conf", "Library/share/fontconfig/conf.avail/70-no-bitmaps.conf", "Library/share/fontconfig/conf.avail/70-yes-bitmaps.conf", "Library/share/fontconfig/conf.avail/80-delicious.conf", "Library/share/fontconfig/conf.avail/90-synthetic.conf", "Library/share/gettext/its/fontconfig.its", "Library/share/gettext/its/fontconfig.loc", "Library/share/xml/fontconfig/fonts.dtd", "Library/var/cache/fontconfig/.leave" ], ```


Environment (conda list):

``` $ conda list # packages in environment at C:\Users\agitter\.conda\envs\fc-test: # # Name Version Build Channel fontconfig 2.13.1 h1989441_1005 conda-forge freetype 2.10.4 h546665d_1 conda-forge libiconv 1.16 he774522_0 conda-forge libpng 1.6.37 h1d00b33_2 conda-forge libxml2 2.9.12 hf5bbc77_1 conda-forge libzlib 1.2.11 h8ffe710_1013 conda-forge ucrt 10.0.20348.0 h57928b3_0 conda-forge vc 14.2 hb210afc_5 conda-forge vs2015_runtime 14.29.30037 h902a5da_5 conda-forge zlib 1.2.11 h8ffe710_1013 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : fc-test active env location : C:\Users\agitter\.conda\envs\fc-test shell level : 2 user config file : C:\Users\agitter\.condarc populated config files : conda version : 4.7.11 conda-build version : 3.17.8 python version : 3.7.3.final.0 virtual packages : base environment : C:\ProgramData\Anaconda3 (read only) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : C:\ProgramData\Anaconda3\pkgs C:\Users\agitter\.conda\pkgs C:\Users\agitter\AppData\Local\conda\conda\pkgs envs directories : C:\Users\agitter\.conda\envs C:\ProgramData\Anaconda3\envs C:\Users\agitter\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/4.7.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.19041 administrator : False netrc file : None offline mode : False ```
BasemElbarashy commented 2 years ago

Hi @agitter have u figured out a solution to this issue?

agitter commented 2 years ago

No, I still haven't found a solution. I am happy to help debug the problem if the maintainers have suggestions.

pkgw commented 2 years ago

We currently build fontconfig on Windows using its Autoconf scripts with --disable-shared as an argument, so only the static fontconfig.lib is provided. From my 2018 commit message:

Only a static library can be built, because the build system can't figure out how to link with freetype dynamically.

We recently upgraded to the fontconfig 2.13.9x series, which adds a Meson build system, so it's possible that we could address this issue more easily now.

pkgw commented 2 years ago

OK, the new Windows package currently in process should start providing a fontconfig-1.dll, so hopefully the weasyprint stuff should start working pretty soon!

agitter commented 2 years ago

That's great! I'm happy to help test on Windows if that would be useful.

pkgw commented 2 years ago

@agitter That would definitely be useful!