Opened 13 months ago

Last modified 13 months ago

#59135 assigned defect

legacy-support: functions properly only if os.version = deployment target

Reported by: kencu (Ken) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cjones051073 (Chris Jones)
Port: legacy-support, legacy-support-devel

Description (last modified by kencu (Ken))

while debugging some unexpected behavior recently, I realized the build system was setting the mmacosx-version-min to a value of 10.7 on a host os of 10.11. What this did was enable a bunch of replacement definitions in the legacy support headers that collided with definitions in the SDK.

This can be fixed by making the legacy support definitions exactly match the newer SDK's definitions (eg getattrlistat)' or by removing the deployment target change...

But it brought forth the idea that the exact way the legacysupport library is built depends on both the host os version but also the setting of the deployment target.

It may or may not be possible to build legacy support for an older system - that idea would have to be explored and tested -- but for now, at least, making sure the host os version matches the deployment target (and the sdk version?) is the only reliable way of using the legacy support library and PG...

Change History (4)

comment:1 Changed 13 months ago by kencu (Ken)

Description: modified (diff)

comment:2 Changed 13 months ago by kencu (Ken)

Description: modified (diff)

comment:3 Changed 13 months ago by jmroot (Joshua Root)

Sounds like the legacysupport header definitions should change based on MAC_OS_X_VERSION_MAX_ALLOWED instead of MAC_OS_X_VERSION_MIN_REQUIRED.

comment:4 Changed 13 months ago by kencu (Ken)

Yes, for the headers/SDK definitions.

But then the library function replacements should still hinge on MIN_REQUIRED as that is what’s in the system library...

I think the library may have to be unique to each os.version and so setting for a deployment target less than the os won’t reliably work,

Unless do something like static linking, etc.

Luckily it’s not a common use case on MacPorts...

Note: See TracTickets for help on using tickets.