Opened 8 years ago

Closed 6 years ago

#51957 closed defect (fixed)

py27-matplotlib @1.5.2_0+cairo+tkinter fails to upgrade: cairo dependency

Reported by: p-bro Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: skymoo (Adam Mercer), mamoll (Mark Moll), petrrr
Port: py-matplotlib

Description

A recent run of port upgrade outdated failed at upgrading py27-matplotlib to @1.5.2_0+cairo+tkinter at the build stage.

I extracted a clean debug log from running the command sudo port -d upgrade py27-matplotlib (s. attached). The crucial bit seems to be

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.2]
                python: yes [2.7.12 (default, Jun 29 2016, 12:52:38)  [GCC
                        4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]]
              platform: yes [darwin]

[..]

OPTIONAL BACKEND EXTENSIONS
                macosx: yes [installing, darwin]
                qt5agg: no  [PyQt5 not found]
                qt4agg: no  [skipping due to configuration]
               gtk3agg: no  [skipping due to configuration]
             gtk3cairo: no  [skipping due to configuration]
                gtkagg: no  [skipping due to configuration]
                 tkagg: yes [installing; run-time loading from Python Tcl /
                        Tk]
                 wxagg: no  [skipping due to configuration]
                   gtk: no  [skipping due to configuration]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [skipping due to configuration]

[..]

============================================================================
                        * The following required packages can not be built:
                        * cairo
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-matplotlib/py27-matplotlib/work/matplotlib-1.5.2" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 

The following ports are installed:

  cairo @1.14.6_0+quartz (active)
  cairomm @1.10.0_3+quartz+x11 (active)
  py27-cairo @1.10.0_3 (active)
  py27-matplotlib @1.5.1_3+cairo+tkinter (active)

Any ideas?

Attachments (1)

py27-matplotlib.log (19.7 KB) - added by p-bro 8 years ago.
Log file

Download all attachments as: .zip

Change History (17)

Changed 8 years ago by p-bro

Attachment: py27-matplotlib.log added

Log file

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Cc: sean@… removed
Owner: changed from macports-tickets@… to sean@…
Port: py-matplotlib added; py27-matplotlib removed

comment:2 Changed 8 years ago by p-bro

This also affects the py34-matplotlib port (upgrading py34-matplotlib @1.5.1_3+cairo+tkinter to @1.5.2_0+cairo+tkinter). If need be, I can provide a log.

comment:3 Changed 8 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:4 Changed 8 years ago by skymoo (Adam Mercer)

Just got this error on updating to version 1.5.3_0, from 1.5.2_0, on Sierra.

comment:5 Changed 8 years ago by mamoll (Mark Moll)

Cc: mmoll@… added

Cc Me!

comment:6 Changed 8 years ago by mamoll (Mark Moll)

I was able to fix the problem by installing py*-cairo from source (sudo port install -s py35-cairo). I have cairo @1.14.6_0+quartz installed (i.e., a non-default variant), so the binary version of py*-cairo is linked against the wrong libraries that can't be found at runtime.

comment:7 Changed 8 years ago by p-bro

I can confirm the workaround from mmoll - works for py27 and py34 as well, once the respective py??-cairo packages are built from source.

comment:8 Changed 8 years ago by seanfarley (Sean Farley)

mmoll, are you able to push a fix? I'm in Paris for the next week with limited access to Internet.

comment:9 Changed 8 years ago by mamoll (Mark Moll)

I committed a partial fix in r153680 that at least tells people what is going wrong and how they should fix it. Not sure how to do this automatically.

comment:10 Changed 8 years ago by seanfarley (Sean Farley)

I also don't know how to do this automatically.

comment:11 Changed 8 years ago by p-bro

Perhaps somebody on the macports-devel mailing list might have an idea... Perhaps we need to create a py??-cairo +quartz variant? (edit: horrible typo)

Last edited 8 years ago by p-bro (previous) (diff)

comment:12 Changed 7 years ago by petrrr

Cc: petrrr added

comment:13 Changed 6 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

In dfa4442aa14c8febe88c1de5dce5ec4a3c7ee236/macports-ports:

py-cairo: update to 1.15.4

In this commit, we set archive_sites to nil so that the buildbots don't build
py-cairo against x11 automatically (many people build cairo with +quartz).
Since py-cairo is a fairly trivial library, let's just skip using the buildbot
for it.

Fixes: #51957
Closes: #54891

comment:14 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Sean, that's not the correct fix. If py-cairo builds itself differently depending on whether its dependency cairo is built with the +quartz or +x11 variant, then py-cairo itself also needs +quartz and +x11 variants, as p-bro said above, and needs to use the require_active_variants proc from the active_variants-1.1 portgroup in each of those variants to enforce that the variants selected for py-cairo match cairo's.

Note that the default for cairo, since many years, is to build with both +x11 and +quartz variants. The reasoning is that by providing both interfaces, ports that require X11 can use that, and ports that require Quartz can use that, and everybody is happy. Therefore I'm surprised that the py-cairo that the buildbots build would have problems on anybody's systems, regardless whether they used +x11 or +quartz or both. Perhaps there is a problem there that needs to be investigated.

Note that clearing archive_sites does not prevent the buildbots from building the ports, but it does prevent MacPorts clients from attempting to download the binaries that the buildbot built.

comment:15 Changed 6 years ago by seanfarley (Sean Farley)

Ah, yep, you're right about the variants, Ryan. I ran into the +x11 problem just last week (while I was trying to upgrade matplotlib) and was a bit surprised. I'll try to investigate that and see about adding the variants.

Also, how do you get buildbot to not distribute packages?

comment:16 Changed 6 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: reopenedclosed

In bf7b83422a120fbf2cd1c1b755ea048d27b03b8e/macports-ports:

py-cairo: add +x11 and +quartz variants

Hopefully, this will fix the linking error once and for all.

Fixes: #51957
Closes: #55497

Note: See TracTickets for help on using tickets.