FROM : Christiaan Hofman
DATE : Sun Feb 24 18:16:18 2008
On Sun, Feb 24, 2008 at 12:38 AM, Christiaan Hofman <<email_removed>>
wrote:
> In our app we would like to cross develop using the 10.5 SDK, but with
> a 10.4 deployment target. We also use the basic Omni framework
> (OmniBase, OmniFoundation, and OmniAppKit). Unfortunately, the current
> release of these frameworks don't allow building with these settings,
> they only appear to build when the min and max deployment target are
> either both 10.4 or both 10.5, not when targeting a range.
>
> So my first request is to the Omni developers: please fix this and
> provide source code for the frameworks that support cross development.
>
> The second is a question to the community: did anyone encounter this
> and found a way to fix it?
>
> The compiler errors I get are all coming from the sections in the
> #if's that compare MAC_OS_X_VERSION_10_5, so actually the part that
> should allow cross development. It seems that something was done wrong
> there, because it actually prevents cross development for the settings
> we require. My educated guess is that this macro should be compared to
> MAC_OS_X_VERSION_MAX_ALLOWED rather than MAC_OS_X_VERSION_MIN_REQUIRED
> (which is done everywhere). Could someone confirm this? And would it
> work if I just replaced these macros everywhere in these frameworks,
> or should that only be done in some places?
>
> Thanks,
> Christiaan
>
>
Sorry to reply to my own question, but I looked more into the OmniBase
framework, and I got a bit worried. The solution I proposed above seems to
be wrong, unfortunately.
In fact, I think the current Omni frameworks currently are buggy when not
used for 10.5 only development. For example, take the 10.5-only runtime
function object_getClass, and how it apparently is defined with different
deployment compiler settings (same is true for some other 10.5 only runtime
functions):
SDK=10.5, deployment target=10.5:
object_getClass defined in SDK
SDK=10.5, deployment target=10.4:
object_getClass defined in SDK
object_getClass re-defined in OmniBase/objc.h (compiler error!)
SDK=10.4u, deployment target=10.4:
object_getClass not defined in SDK
object_getClass defined in OmniBase/objc.h
The 10.5-only case is A OK. The full compatibility settings are immediately
wrong, as they don't even compile. The 10.4 only setting (which is the
factory default setting!) seems OK at the first sight. However, if I run
this on 10.5, it redefines the system version of object_getClass. That
sounds like something you shouldn't do. It seems to me that a redefinition
of object_getClass should depend on a runtime condition, not a compile time
condition. Am I right? Also changing the compile time condition to depend on
MAC_OS_X_MAX_ALLOWED would not help, because whether these functions should
be defined depends on the run-time configuration.
So my question now is: is it actually safe to use the current Omni
frameworks when I want to target Tiger and Leopard?
Christiaan
DATE : Sun Feb 24 18:16:18 2008
On Sun, Feb 24, 2008 at 12:38 AM, Christiaan Hofman <<email_removed>>
wrote:
> In our app we would like to cross develop using the 10.5 SDK, but with
> a 10.4 deployment target. We also use the basic Omni framework
> (OmniBase, OmniFoundation, and OmniAppKit). Unfortunately, the current
> release of these frameworks don't allow building with these settings,
> they only appear to build when the min and max deployment target are
> either both 10.4 or both 10.5, not when targeting a range.
>
> So my first request is to the Omni developers: please fix this and
> provide source code for the frameworks that support cross development.
>
> The second is a question to the community: did anyone encounter this
> and found a way to fix it?
>
> The compiler errors I get are all coming from the sections in the
> #if's that compare MAC_OS_X_VERSION_10_5, so actually the part that
> should allow cross development. It seems that something was done wrong
> there, because it actually prevents cross development for the settings
> we require. My educated guess is that this macro should be compared to
> MAC_OS_X_VERSION_MAX_ALLOWED rather than MAC_OS_X_VERSION_MIN_REQUIRED
> (which is done everywhere). Could someone confirm this? And would it
> work if I just replaced these macros everywhere in these frameworks,
> or should that only be done in some places?
>
> Thanks,
> Christiaan
>
>
Sorry to reply to my own question, but I looked more into the OmniBase
framework, and I got a bit worried. The solution I proposed above seems to
be wrong, unfortunately.
In fact, I think the current Omni frameworks currently are buggy when not
used for 10.5 only development. For example, take the 10.5-only runtime
function object_getClass, and how it apparently is defined with different
deployment compiler settings (same is true for some other 10.5 only runtime
functions):
SDK=10.5, deployment target=10.5:
object_getClass defined in SDK
SDK=10.5, deployment target=10.4:
object_getClass defined in SDK
object_getClass re-defined in OmniBase/objc.h (compiler error!)
SDK=10.4u, deployment target=10.4:
object_getClass not defined in SDK
object_getClass defined in OmniBase/objc.h
The 10.5-only case is A OK. The full compatibility settings are immediately
wrong, as they don't even compile. The 10.4 only setting (which is the
factory default setting!) seems OK at the first sight. However, if I run
this on 10.5, it redefines the system version of object_getClass. That
sounds like something you shouldn't do. It seems to me that a redefinition
of object_getClass should depend on a runtime condition, not a compile time
condition. Am I right? Also changing the compile time condition to depend on
MAC_OS_X_MAX_ALLOWED would not help, because whether these functions should
be defined depends on the run-time configuration.
So my question now is: is it actually safe to use the current Omni
frameworks when I want to target Tiger and Leopard?
Christiaan
| Related mails | Author | Date |
|---|---|---|
| Christiaan Hofman | Feb 24, 00:38 | |
| Christiaan Hofman | Feb 24, 18:16 |






Cocoa mail archive

