Opened 2 years ago

Closed 3 months ago

#52043 closed defect (fixed)

python27 @2.7.12_1 fails to build +universal on Sierra; prevents installation of wine

Reported by: kode54 (Christopher Snowhill) Owned by: larryv (Lawrence Velázquez)
Priority: High Milestone:
Component: ports Version: 2.3.4
Keywords: sierra haspatch Cc: mkae (Marko Käning), jeremyhu (Jeremy Huddleston Sequoia), ned-deily (Ned Deily), jyrkiwahlstedt, MaddTheSane (C.W. Betts), roberthuston@…, elventear (Pepe Barbe), ryandesign (Ryan Schmidt), mayocoko@…
Port: python27, wine, wine-devel, wine-crossover

Description

I am attempting to install wine, and this package fails to build due to the Mac glue attempting to import Quicktime headers, which no longer exist.

Attachments (1)

main.log (113.8 KB) - added by kode54 (Christopher Snowhill) 2 years ago.
Clean python27 build log

Download all attachments as: .zip

Change History (28)

Changed 2 years ago by kode54 (Christopher Snowhill)

Attachment: main.log added

Clean python27 build log

comment:1 Changed 2 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to jwa@…
Summary: Python27 @2.7.12_1 fails to build +universal on Sierrapython27 @2.7.12_1 fails to build +universal on Sierra

In future port-related tickets, please Cc the maintainers (e.g., port info --maintainers python27), if any.

comment:3 Changed 2 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:4 Changed 2 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

Cc Me!

comment:5 Changed 2 years ago by ryandesign (Ryan Schmidt)

Cc: jeremyhu@… added
Keywords: haspatch added
Port: wine wine-devel wine-crossover added
Priority: NormalHigh
Summary: python27 @2.7.12_1 fails to build +universal on Sierrapython27 @2.7.12_1 fails to build +universal on Sierra; prevents installation of wine

There is a patch attached to the upstream issue but I don't know if that's the best solution. Jeremy, what do you think?

comment:6 Changed 2 years ago by jeremyhu (Jeremy Huddleston Sequoia)

AvailabilityMacros.h is super deprecated and should not be used by anything current. Availability.h was added as replacement in 10.5.

__MAC_OS_X_VERSION_MAX_ALLOWED should be checked instead of defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER)

They should really have a central config and use that instead. Eg:

#include <Availability.h>
#define APPLE_SUPPORTS_QUICKTIME (__MAC_OS_X_VERSION_MAX_ALLOWED < 101200) && !__LP64__
Last edited 2 years ago by jeremyhu (Jeremy Huddleston Sequoia) (previous) (diff)

comment:7 Changed 2 years ago by larryv (Lawrence Velázquez)

Cc: nad@… added

comment:8 in reply to:  6 ; Changed 2 years ago by ryandesign (Ryan Schmidt)

Replying to jeremyhu@…:

AvailabilityMacros.h is super deprecated and should not be used by anything current. Availability.h was added as replacement in 10.5.

It would be nice to still be able to build on 10.4...

comment:9 Changed 2 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Ok, then:

#if __has_include(<Availability.h>)
#include <Availability.h>
#define APPLE_SUPPORTS_QUICKTIME (__MAC_OS_X_VERSION_MAX_ALLOWED < 101200) && !__LP64__
#else
#define APPLE_SUPPORTS_QUICKTIME !__LP64__
#endif
Last edited 2 years ago by jeremyhu (Jeremy Huddleston Sequoia) (previous) (diff)

comment:10 Changed 2 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Please use the v2 version of the upstream patch which incorporates my feedback:

http://bugs.python.org/file44693/issue27806_v2.patch

comment:11 in reply to:  8 Changed 2 years ago by ned-deily (Ned Deily)

Replying to ryandesign@…:

It would be nice to still be able to build on 10.4...

There is another, unrelated issue with building Python 3.6 on 10.4. As of 3.6.0b1, certain features of the C99 standard are used in C modules; as a result, 3.6 no longer compiles with gcc-4.0, the standard in Xcode 2.5 for 10.4. So you'll probably need to add a dependency on a MacPorts-supplied C compiler (gcc-4.2 is fine).

Last edited 2 years ago by ned-deily (Ned Deily) (previous) (diff)

comment:12 Changed 2 years ago by ryandesign (Ryan Schmidt)

We changed the default compiler on Tiger to Apple GCC 4.2 (provided by MacPorts) years ago. If there is another issue with Tiger please file a new ticket.

comment:13 Changed 2 years ago by ned-deily (Ned Deily)

Oh, good. I haven't actually yet tried to install the python36 port on 10.4. One more thing, the v2 patch referred to by Jeremy above needed to be tweaked for gcc-4.2 et al. The final version has been committed here: https://hg.python.org/cpython/rev/4030300fcb18

comment:14 Changed 2 years ago by larryv (Lawrence Velázquez)

Cc: jwa@… added
Owner: changed from jwa@… to larryv@…
Status: newassigned

r152947, maintainer timeout. I applied the upstream patch but don’t have Sierra available to test; can someone verify that +universal works on Sierra now?

comment:15 Changed 2 years ago by ryandesign (Ryan Schmidt)

comment:16 Changed 2 years ago by MaddTheSane (C.W. Betts)

Cc: computers57@… added

Cc Me!

comment:17 Changed 2 years ago by ryandesign (Ryan Schmidt)

That works. Can we apply the same patch to all the other python2x ports, please? (I tested python31 and python36 and they didn't have this problem.)

comment:18 Changed 2 years ago by roberthuston@…

Cc: roberthuston@… added

Cc Me!

comment:19 Changed 2 years ago by elventear (Pepe Barbe)

Cc: elventear@… added

Cc Me!

comment:20 Changed 2 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… removed

Cc Me!

comment:21 Changed 2 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

Cc Me!

comment:22 Changed 2 years ago by mayocoko@…

Cc: mayocoko@… added

Cc Me!

comment:23 Changed 2 years ago by mf2k (Frank Schima)

This works for me now. Can we close this ticket?

$ port -v installed python27
The following ports are currently installed:
  python27 @2.7.12_1+universal (active) platform='darwin 16' archs='i386 x86_64' date='2016-09-21T20:57:53-0600'

comment:24 in reply to:  23 Changed 2 years ago by larryv (Lawrence Velázquez)

I would like to keep this open to remind myself to fix the other Python 2 ports also, once I actually upgrade my machine to Sierra.

comment:25 Changed 2 years ago by larryv (Lawrence Velázquez)

In 03f6ca7c/macports-ports:

python26: Improve check for QuickTime/QuickTime.h

This fixes 32-bit builds on Sierra, which removed that header.

See: #52043

comment:26 Changed 8 months ago by pmetzger (Perry E. Metzger)

larryv:

"I would like to keep this open to remind myself to fix the other Python 2 ports also, once I actually upgrade my machine to Sierra."

Can we close this instead and have you open a fresh ticket to remind yourself of the other fixes? This is actually done, and having a high priority open at the top of the "haspatch" list that should really just be a fresh ticket makes it harder to find what actually needs fixing. If I don't hear objections, I'll be closing this in a day or two.

comment:27 Changed 3 months ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

Agreed, the High priority fix was committed long ago.

Note: See TracTickets for help on using tickets.