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

setupext.py needs more --prefix · Issue #3821 · matplotlib/matplotlib · GitHub

Repository navigation

setupext.py needs more --prefix #3821

Closed

Description

When using Anaconda, but installing matplotlib from source, using the tkagg backend can result in a segfault or sometimes just simply an exception with no figure shown. After some investigation, the root cause was that the build of _tkagg.so was being built and linked against the system's Tk/Tcl libraries and headers. However, when backend_tkagg.py imports Tkinter, it is importing Anaconda's build of the library, which conflicts with the compiled _tkagg.so, leading to errors.

It appears that the matplotlib conda recipe works around this issue by brute-forcing a replacement of every instance of "/usr/local/" with the Anaconda's prefix location in the setupext.py. I think we can do better than that, and make available a proper set of command-line options for various prefixes and such. And of course, to be uniform with the application of --prefix throughout setupext.py.

Activity

  1. jenshnielsen commented on Nov 21, 2014

    Member

    This is somewhat related to the issues with freetype on Mac when there is no package config avail.

    This is what #3713 tried to solve but fails

  2. WeatherGod commented on Nov 21, 2014

    MemberAuthor

    There is an important subtle difference, I think. Much of the existing code in setupext.py centers around auto-detecting the needed library and header paths. And it does a decent job at that. However, it seems to me that the ability to manually specify the paths is not available (either at the gross level with a single --prefix or at a finer-grained level with something like --prefix-include-tk). I don't think it is even possible with the setup.cfg, but I am not familiar enough with the build system.

  3. jenshnielsen commented on Nov 21, 2014

    Member

    Yes you are right that these are not identical issues. I just wanted to hookup the various issues with setupext.py

    The issue with freetype is two fold. There is on support in setupext for adding another subdir to the search path without loosing the top directory.
    There is also no support for overwriting the searchpath from setup.cfg afaik.

    BTW: I wanted to overwrite the include path to build the gtk2 backends on my mac where homebrew has the headers in an unusual place( to allow coexistence with gtk3. ) pkg-config was broken due to an issue in homebrew so it has to manually find the headers.

  4. modified the milestone: on Nov 25, 2014
  5. modified the milestones: , on Oct 3, 2017
  6. QuLogic commented on Mar 14, 2019

    Member

    @anntzer is this fixed now (other than removing any hacks in the conda recipe)?

  7. anntzer commented on Mar 14, 2019

    Contributor

    I would think so. Closing, but feel free to reopen if needed.

  8. removed this from the future releases milestone on Oct 6, 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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL