FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: It is recommended for you to run autogen before configuring freetype · Issue #22754 · matplotlib/matplotlib · GitHub

Repository navigation

[Bug]: It is recommended for you to run autogen before configuring freetype #22754

Description

Bug summary

If i build matplotlib with the source code of freetype which is cloned by git, it will fail.

Code for reproduction

1. git clone freetype tag 2.10.4
2. mkdir `build` in matplotlib
3. copy freetype-2.10.4 to `build`
4. python setup.py bdist_wheel

Actual outcome

FreeType build system -- automatic system detection

The following settings are used:

  platform                    unix
  compiler                    gcc -pthread
  configuration directory     ./builds/unix
  configuration rules         ./builds/unix/unix.mk

If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.

Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (this needs Python >= 3.5).

cd builds/unix; \
        ./configure  '--with-zlib=no' '--with-bzip2=no' '--with-png=no' '--with-harfbuzz=no' '--enable-static' '--disable-shared' '--host=x86_64-pc-linux-gnu'
/bin/sh: line 1: ./configure: No such file or directory
make: *** [setup] Error 127

Expected outcome

build successfully.

Additional information

i modify the setupext.py with run sh autogen.sh before configure , it worked.

Operating system

Linux

Matplotlib Version

3.5.1

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

from source (.tar.gz)

Activity

  1. added this to the v3.6.0 milestone on Apr 1, 2022
  2. tacaswell commented on Apr 1, 2022

    Member

    @wqh17101 Can you open up a PR with that change? We may need to put in some logic to only run auttools if configure is missing. The release tarballs do include it, currently I do not think you need autotools to build Matplotlib and it would be shame to pick up a dependency that is not needed in the default (you let us download freetype) case.

  3. wqh17101 commented on Apr 1, 2022

    ContributorAuthor

    @tacaswell Because the freetype may contain some components which have vulnerabilities, that matplotlib will include them when building. So in my case, i will fix this from source code. So i need to use my own code to build.

    I am very happy to use your whl for that no more work is needed for me.

    But thinking of this scene, matplotlib contains freetype.so, freetype.so contains zlib, for now zlib has vulnerabilities. So i have to replace the zlib with a safe version.

  4. QuLogic commented on Apr 1, 2022

    Member

    Our FreeType does not contain zlib, and all vulnerabilities that were reported in the version in our wheel are not relevant for us.

  5. wqh17101 commented on Apr 1, 2022

    ContributorAuthor

    @QuLogic Nope. You can analyse the source code of Freetype. https://gitlab.freedesktop.org/freetype/freetype/-/tree/master/src/gzip
    All the freetype contain zlib by source code in its gzip module.

  6. tacaswell commented on Apr 1, 2022

    Member

    We disable it at build time:

    matplotlib/setupext.py

    Lines 631 to 635 in d8ede1a

    configure = [
    "./configure", "--with-zlib=no", "--with-bzip2=no",
    "--with-png=no", "--with-harfbuzz=no", "--enable-static",
    "--disable-shared"
    ]

    so while we do have the source, it is not used

  7. wqh17101 commented on Apr 1, 2022

    ContributorAuthor

    @tacaswell Nope , this --with-zlib=no means that do not use system zlib instead of internal library. It does not mean your freetype does not contain zlib.
    You can see the detail by ./configure -h in freetype.

    Optional Packages:
      --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
      --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
      --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                              both]
      --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
      --with-sysroot=DIR Search for dependent libraries within DIR
                            (or the compiler's sysroot if not specified).
      --with-zlib=[yes|no|auto]
                              use system zlib instead of internal library
                              [default=auto]
      --with-bzip2=[yes|no|auto]
                              support bzip2 compressed fonts [default=auto]
      --with-png=[yes|no|auto]
                              support png compressed OpenType embedded bitmaps
                              [default=auto]
      --with-harfbuzz=[yes|no|auto]
                              improve auto-hinting of OpenType fonts
                              [default=auto]
      --with-brotli=[yes|no|auto]
                              support decompression of WOFF2 streams
                              [default=auto]
      --with-old-mac-fonts    allow Mac resource-based fonts to be used
      --with-fsspec           use obsolete FSSpec API of MacOS, if available
                              (default=yes)
      --with-fsref            use Carbon FSRef API of MacOS, if available
                              (default=yes)
      --with-quickdraw-toolbox
                              use MacOS QuickDraw in ToolBox, if available
                              (default=yes)
      --with-quickdraw-carbon use MacOS QuickDraw in Carbon, if available
                              (default=yes)
      --with-ats              use AppleTypeService, if available (default=yes)
    
  8. modified the milestones: v3.6.0, v3.7.0 on Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL