conda-forge / matplotlib-feedstock

A conda-smithy repository for matplotlib.
BSD 3-Clause "New" or "Revised" License
22 stars 58 forks source link

Matplotlib needs a better pinning on libpng #41

Closed 183amir closed 8 years ago

183amir commented 8 years ago

So I am trying this build: https://travis-ci.org/conda-forge/bob.ip.facedetect-feedstock/jobs/143671846 but it exists with an error from matplotlib:

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/bob/ip/facedetect/script/plot_froc.py", line 26, in <module>

    import matplotlib.pyplot as mpl

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in <module>

    import matplotlib.colorbar

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/colorbar.py", line 34, in <module>

    import matplotlib.collections as collections

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/collections.py", line 27, in <module>

    import matplotlib.backend_bases as backend_bases

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 62, in <module>

    import matplotlib.textpath as textpath

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/textpath.py", line 18, in <module>

    from matplotlib.mathtext import MathTextParser

  File "/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/mathtext.py", line 60, in <module>

    import matplotlib._png as _png

ImportError: dlopen(/Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/_png.so, 2): Library not loaded: @rpath/libpng16.16.dylib

  Referenced from: /Users/travis/miniconda3/envs/_test/lib/python2.7/site-packages/matplotlib/_png.so

  Reason: Incompatible library version: _png.so requires version 40.0.0 or later, but libpng16.16.dylib provides version 38.0.0
183amir commented 8 years ago

matplotlib has been built with libpng: 1.6.23-0 conda-forge according to the logs here: https://travis-ci.org/conda-forge/matplotlib-feedstock/jobs/143041840#L427 but it does not work with libpng: 1.6.21-1 conda-forge according to the logs here: https://travis-ci.org/conda-forge/bob.ip.facedetect-feedstock/jobs/143671846#L784 In my experience aslo, I have had to pin libpng on a patch version in bob.io.image because it gives the same error if I do otherwise.

ocefpaf commented 8 years ago

Indeed out pinning for libpng is too optimistic (>=1.6.21,<1.7). But we need to change that everywhere and not only matplotlib.

@pelson if you don't want to update the pinnings now I can pull libpng 1.6.23 and re-build matplotlib. What do you think?

@183amir can you try to find out why you are not getting libpng 1.6.23 in your solution for bob.ip.facedetect? What software is forcing the downgrade?

pelson commented 8 years ago

if you don't want to update the pinnings now I can pull libpng 1.6.23 and re-build matplotlib. What do you think?

I would love to find a statement about libpng's intended compatibility. The only reason for not pinning to a patch version is simply so that we don't need to rebuild everything whenever we update it, but looks like we don't have much choice 😢

ocefpaf commented 8 years ago

I would love to find a statement about libpng's intended compatibility.

I googled that before and I only got this page, which does not have anything about >=1.6.21,<1.7!

I don't like the idea of re-building everything either, but libpng seems to have a different definition of patch version :smile:

183amir commented 8 years ago

@183amir can you try to find out why you are not getting libpng 1.6.23 in your solution for bob.ip.facedetect? What software is forcing the downgrade?

bob.io.image was and I fixed it.

we need to change that everywhere and not only matplotlib.

I agree. I already have pinned bob.io.image on a patch version. We should do the same for the rest.

By the way, @pelson I am not getting these pinning updates (especially for boost 1.61.* ) in my feedstocks and I had to do it by hand for 4 or 5 of them. Like these: https://github.com/conda-forge/bob.ip.facedetect-feedstock/commit/200a325460aa35c0e731bc2a7ae8dc8f464729be https://github.com/conda-forge/bob.ip.color-feedstock/commit/7c6f527d131ef49368e20b7264fbbbe2348a437f https://github.com/conda-forge/bob.ip.base-feedstock/commit/2c6ba4499141301a273697e0e6be755c3e70e952 while I asked for them a while ago here: https://github.com/conda-forge/bob.io.base-feedstock/issues/9

ocefpaf commented 8 years ago

matplotlib has been built with libpng: 1.6.23-0 conda-forge according to the logs here: https://travis-ci.org/conda-forge/matplotlib-feedstock/jobs/143041840#L427 but it does not work with libpng: 1.6.21-1 conda-forge according to the logs here: https://travis-ci.org/conda-forge/bob.ip.facedetect-feedstock/jobs/143671846#L784

@183amir I just installed matplotlib compiled with libpng 1.6.23 and forced a downgrade of libpng to 1.6.21 and everything worked. I also looked into your logs and it seems that things are fine now using libpng 1.6.23, so maybe this is resolved?

Please re-open if you think we still need to do something.

183amir commented 8 years ago

Did you try it on a mac? For my case, I made sure everything was compiled with 1.6.23.

ocefpaf commented 8 years ago

Did you try it on a mac? For my case, I made sure everything was compiled with 1.6.23.

No but I would expect the same ABI breakage on Linux as well. Let me know if you can to the same test on a Mac.

183amir commented 8 years ago

It happens on mac, I just tested it:

$ conda create -n temp01 --override-channels -c conda-forge -c defaults python=2.7 matplotlib                       
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment /Users/amohammadi/miniconda/envs/temp01:

The following NEW packages will be INSTALLED:                                                                                       [80/142]

    ca-certificates: 2016.2.28-0       conda-forge
    certifi:         2016.2.28-py27_1  conda-forge
    cycler:          0.10.0-py27_0     conda-forge
    freetype:        2.6.3-1           conda-forge
    functools32:     3.2.3.2-py27_1    conda-forge
    libpng:          1.6.23-0          conda-forge
    matplotlib:      1.5.2-np111py27_4 conda-forge
    mkl:             11.3.3-0          defaults   
    ncurses:         5.9-8             conda-forge
    numpy:           1.11.1-py27_0     defaults   
    openssl:         1.0.2h-2          conda-forge
    pip:             8.1.2-py27_0      conda-forge
    pyparsing:       2.1.1-py27_0      conda-forge
    python:          2.7.12-1          defaults   
    python-dateutil: 2.5.2-py27_0      conda-forge
    pytz:            2016.4-py27_0     conda-forge
    readline:        6.2-0             conda-forge
    setuptools:      23.0.0-py27_1     conda-forge
    six:             1.10.0-py27_0     conda-forge
    sqlite:          3.13.0-1          conda-forge
    tk:              8.5.18-0          defaults   
    wheel:           0.29.0-py27_0     conda-forge
    zlib:            1.2.8-3           conda-forge

Proceed ([y]/n)? 

$ source activate temp01
$ python -c 'import matplotlib.pyplot'
/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the 
font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
$ conda install --no-update-deps libpng=1.6.21
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment /Users/amohammadi/miniconda/envs/temp01:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    libpng-1.6.21              |                1         287 KB  conda-forge

The following packages will be DOWNGRADED due to dependency conflicts:

    libpng: 1.6.23-0 conda-forge --> 1.6.21-1 conda-forge

Proceed ([y]/n)? 

Fetching packages ...
libpng-1.6.21- 100% |############################################################################################| Time: 0:00:00 545.61 kB/s
Extracting packages ...
[      COMPLETE      ]|###############################################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|###############################################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|###############################################################################################################| 100%

$ python -c 'import matplotlib.pyplot'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in <module>
    import matplotlib.colorbar
  File "/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/colorbar.py", line 34, in <module>
    import matplotlib.collections as collections
  File "/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/collections.py", line 27, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 62, in <module>
    import matplotlib.textpath as textpath
  File "/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/textpath.py", line 18, in <module>
    from matplotlib.mathtext import MathTextParser
  File "/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/mathtext.py", line 60, in <module>
    import matplotlib._png as _png
ImportError: dlopen(/Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/_png.so, 2): Library not loaded: @rpath/libpng16.16.dylib
  Referenced from: /Users/amohammadi/miniconda/envs/temp01/lib/python2.7/site-packages/matplotlib/_png.so
  Reason: Incompatible library version: _png.so requires version 40.0.0 or later, but libpng16.16.dylib provides version 38.0.0
183amir commented 8 years ago

Please re-open the issue, I am not able to do so.

ocefpaf commented 8 years ago

Please re-open the issue, I am not able to do so.

Weird you should.

I will investigate this further. It is quite strange that Linux is already and OS X not.

jakirkham commented 8 years ago

Please re-open the issue, I am not able to do so.

Weird you should.

Just as FYI, GitHub doesn't allow one to reopen an issue unless they have write permissions on the repo, are admin, or they closed it themselves. While this may have been different at some time, I don't recall when they changed it.