Opened 3 weeks ago

Last modified 13 days ago

#69867 assigned defect

legacy-support headers should work with later SDK versions

Reported by: fhgwright (Fred Wright) Owned by: fhgwright (Fred Wright)
Priority: Low Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), mascguy (Christopher Nielsen), barracuda156
Port: legacy-support

Description

It's ordinarily legal (with some limitations) to build for a given OS target while using an SDK for a later OS version. In some cases, the legacy-support headers may not work properly in this situation. One known case is #69838.

It would be desirable (though not high priority) to fix this.

Change History (5)

comment:1 Changed 13 days ago by fhgwright (Fred Wright)

In df195e0aea5b49d03c149970ddb303bcada0f7d7/macports-legacy-support (master):

stpncpy: Fix potential header collision with "later" SDK

This is one case of the general problem in:

#69867

This should fix the only known case specifically related to collisions
with "secure" wrappers. Whether there are other types of SDK
collisions is TBD.

TESTED:
Builds and passes tests on 10.4-10.5 ppc, 10.4-10.6 i386, 10.5-10.6
ppc (i386 Rosetta), 10.5-12.x x86_64, 11.x-14.x arm64.
Builds test_stpncpy successfully on 10.6 with 10.7 SDK.

comment:2 Changed 13 days ago by Christopher Nielsen <mascguy@…>

In badcd63f0127ac3034d9522fb7445f9a873f899b/macports-ports (master):

legacy-support-devel: update to latest master

  • stpncpy: Fix potential header collision with "later" SDK

See: https://github.com/macports/macports-legacy-support/pull/85
See: #69867

comment:3 Changed 13 days ago by fhgwright (Fred Wright)

One thing that would help in testing this issue would be to teach the build procedure to honor SDKROOT. Currently it doesn't.

comment:4 Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

The build procedure of what? If you mean you are setting the SDKROOT environment variable in your shell and MacPorts is not passing it through to the builds, that's intentional; most environment variables are deliberately not passed through. You can override configure.sdk_version or configure.sdkroot on the command line if you want to test a different SDK, e.g. sudo port configure configure.sdk_version=11 (this assumes you have the macOS 11 SDK in the standard location) or sudo port configure configure.sdkroot=/path/to/MacOSX11.sdk (for an SDK located anywhre).

comment:5 in reply to:  4 Changed 13 days ago by fhgwright (Fred Wright)

Replying to ryandesign:

The build procedure of what? If you mean you are setting the SDKROOT environment variable in your shell and MacPorts is not passing it through to the builds, that's intentional; most environment variables are deliberately not passed through. You can override configure.sdk_version or configure.sdkroot on the command line if you want to test a different SDK, e.g. sudo port configure configure.sdk_version=11 (this assumes you have the macOS 11 SDK in the standard location) or sudo port configure configure.sdkroot=/path/to/MacOSX11.sdk (for an SDK located anywhre).

No, I mean the project's build procedure. Testing it as a port would add unnecessary friction.

An example of why legacy-support should have its own ticket component, since this isn't a ports issue. :-)

Note: See TracTickets for help on using tickets.