Opened 3 years ago

Closed 3 years ago

#64540 closed defect (fixed)

py310-re2 @1.0.7_0: build failure on macos-10.6.8

Reported by: macportsraf Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: snowleopard lion Cc:
Port: py-re2 re2

Description (last modified by jmroot (Joshua Root))

Hi, a port update outdated on 10.6.8 resulted in this compile error for py310-re2:

:info:build In file included from _re2.cc:37:
:info:build /opt/local/include/re2/re2.h:974:29: error: 'TARGET_OS_OSX' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
:info:build #if (defined(__APPLE__) && !TARGET_OS_OSX) || defined(__MINGW32__)

Attachments (1)

main.log (98.2 KB) - added by macportsraf 3 years ago.
main.log

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by macportsraf

Attachment: main.log added

main.log

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: snowleopard lion added; 10.6 python310 re2 removed
Port: py-re2 added; py310-re2 removed

comment:2 Changed 3 years ago by jmroot (Joshua Root)

Port: re2 added

Not sure if this port is doing something wrong, or if it's an inherent problem in the re2 header.

comment:3 Changed 3 years ago by evanmiller (Evan Miller)

It looks like the 10.6 SDK defines TARGET_OS_MAC instead of TARGET_OS_OSX:

https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.6.sdk/usr/include/TargetConditionals.h#L88

legacysupport works around this:

https://github.com/macports/macports-legacy-support/blob/master/include/TargetConditionals.h

So I'd suggest adding

PortGroup legacysupport 1.1
legacysupport.newest_darwin_requires_legacy 11

to the Portfile.

comment:4 Changed 3 years ago by jmroot (Joshua Root)

Seems like it would be better to apply a fix to re2 than to require all its dependents to use legacysupport?

comment:5 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In f870b1e98d96ea69d66e1034e0dce052f1939a94/macports-ports (master):

re2: fix build failure on older OS with newer compiler

This also caused dependents to fail to build if re2 had already been
successfully installed using a different compiler.

Closes: #64540
Closes: https://github.com/macports/macports-ports/pull/13788

Note: See TracTickets for help on using tickets.