[MacPorts] #49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found
#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found -----------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: policykit -----------------------------+-------------------------------- This is the failure: {{{ polkitagenthelperprivate.c:51:26: error: Availability.h: No such file or directory polkitagenthelperprivate.c: In function 'getdelim': }}} It is introduced by the patch file `patch-getline.diff`: {{{ +// getline() is only available on OS X Lion and newer + +#ifdef __APPLE__ +#include <Availability.h> +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 }}} This can be avoided by adding another guard: {{{ +#ifdef __APPLE__ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#include <Availability.h> +#endif +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 }}} -- Ticket URL: <https://trac.macports.org/ticket/49235> MacPorts <https://www.macports.org/> Ports system for OS X
#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found ------------------------------+---------------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: tiger haspatch Port: policykit | ------------------------------+---------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => devans@… * cc: devans@… (removed) * keywords: => tiger haspatch -- Ticket URL: <https://trac.macports.org/ticket/49235#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found ------------------------------+---------------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: tiger haspatch Port: policykit | ------------------------------+---------------------------- Changes (by devans@…): * status: new => assigned * version: 2.3.4 => Comment: Replying to [ticket:49235 Peter_Dyballa@…]:
This can be avoided by adding another guard:
{{{ +#ifdef __APPLE__ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#include <Availability.h> +#endif +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 }}}
Yes, thanks for reminding me of this issue. But, after looking things over to refresh my memory, I would suggest a slightly different modification as follows: {{{ +#ifdef __APPLE__ +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#include <Availability.h> +#else +#include <AvailabilityMacros.h> +#endif +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060 }}} The rationale is that __MAC_OS_X_VERSION_MIN_REQUIRED is defined in Availability.h, so using the built-in compiler preprocessor definition __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is probably the only part that works. AvailabilityMacros.h serves the same purpose as Availability.h on the older OS versions and should be available back to 10.2 if I remember correctly. Can you test this modification and see if it works? I'm thinking there are probably some other issues with this port on your platform as well. The pam configuration for instance. Is #45832 still an issue with 0.113? Also #45921. -- Ticket URL: <https://trac.macports.org/ticket/49235#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found ------------------------------+---------------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: tiger haspatch Port: policykit | ------------------------------+---------------------------- Comment (by devans@…): Actually if MAC_OS_X_VERSION_MIN_REQUIRED is already defined for some reason, there's no need for the includes at all. Attached is my new proposed patch-getline.diff that incorporates this concept. Works on newer systems. If it works for you I'll commit the change. -- Ticket URL: <https://trac.macports.org/ticket/49235#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found ------------------------------+---------------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: tiger haspatch Port: policykit | ------------------------------+---------------------------- Comment (by Peter_Dyballa@…): Replying to [comment:2 devans@…]:
[…] I would suggest a slightly different modification as follows:
Policykit @0.113_1 builds fine with the modified patch on PPC Tiger, Mac OS X 10.4.11.
I'm thinking there are probably some other issues with this port on your platform as well. The pam configuration for instance. Is #45832 still an issue with 0.113? Also #49521.
mozjs17 @17.0.0_3 builds fine meanwhile because GCC is used for building the package. The other issue, #49521, never hit me. I'd assume dbus is referencing an old or wrong UID. I think the tickets #49235 and #45832 can be closed now as being fixed. -- Ticket URL: <https://trac.macports.org/ticket/49235#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#49235: policykit 0.113 cannot be built on PPC Tiger, Mac OS X 10.4.11, because Availability.h not found ------------------------------+---------------------------- Reporter: Peter_Dyballa@… | Owner: devans@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: tiger haspatch Port: policykit | ------------------------------+---------------------------- Changes (by devans@…): * status: assigned => closed * resolution: => fixed Comment: Good. Updated patch-getline.diff committed in r142728. Thanks for reporting this issue and helping getting it fixed. -- Ticket URL: <https://trac.macports.org/ticket/49235#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts