Recent

Author Topic: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!  (Read 14541 times)

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Hello, everybody.

I have been working hard over the last few days to develop my first application for Mac using Lazarus 0.9.30.4 and Xcode 4.3.1.

In another thread in this Forum, I discussed compatibility problems trying to understand if my app could be compatible with OS X 10.4, 10.5 and 10.6. Unfortunately, I still don't know the answer.

Apple say that compiling with Xcode 4.3.1 guarantees backwards compatibility on condition that the application does not contain any references to new libraries. On the contrary, other developers believe that under no circumstances can you run an application under OS X 4.0, 5.0 and 6.0 if it was compiled with Xcode 4.3.1.

Now, I have just finished to develop my first Mac application and put it on my Italian Web site.

I decided not to use the following reference to macosx_version_min:

Code: [Select]

-k-macosx_version_min -k10.6
-XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk

in the Project Option because I was afraid this code could prevent my app from working under Mac OS X 10.4, 10.5, provided that what Apple say is true.

The reason for this post of mine is to ask those of you who are willing to help me and have access to Mac machines running under OS X 10.4, 10.5 and 10.6 to test my app under those versions of OS X.

I am aware I am probably asking too much but I am desperate because where I live nobody can help me. The few Mac users I know have already upgraded to Lion.

Please consider that I have not used an installation package. All you should do is download the zip file, explode it and double click on the app to see whether it runs or not.

This is the link that you can use to download my app:

http://www.espositosoftware.it/programmi/gestione_inventario_officina_meccanica_macosx.zip

Thanks in advance for your help.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1121
    • formatio reticularis
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #1 on: March 25, 2012, 11:05:02 pm »
I would like to check your application with Mac OS X 10.4 and 10.5 if it could run on PPC based Macs. Please create a version for PPC processors (Project Options : Code generation : Target CPU family : powerpc) and leave a note where the binary can be loaded from.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 746
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #2 on: March 25, 2012, 11:07:03 pm »
If you don't use any options at all, the program is only guaranteed to work on the Mac OS X version under which it was compiled. Even without testing, I can guarantee that it will not work on Mac OS X 10.5 or 10.4 if it's compiled under 10.6 without any special options.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #3 on: March 25, 2012, 11:09:17 pm »
If you don't use any options at all, the program is only guaranteed to work on the Mac OS X version under which it was compiled. Even without testing, I can guarantee that it will not work on Mac OS X 10.5 or 10.4 if it's compiled under 10.6 without any special options.

Then when Apple guarantee backwards compatibility, they are just kidding us!

Actually, I compiled it under 10.7 (Lion) and I didn't even put the "-k-macosx_version_min -k10.6" code, which I could and should have done! Who knows if compiling under Lion guarantees compatibility at least under Snow Leopard without specifying the macosx_version_min?
« Last Edit: March 25, 2012, 11:14:45 pm by pasquale »
I'm beginning to love the Mac and hate Apple's money-hungry policy.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 746
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #4 on: March 25, 2012, 11:14:40 pm »
If you don't use any options at all, the program is only guaranteed to work on the Mac OS X version under which it was compiled. Even without testing, I can guarantee that it will not work on Mac OS X 10.5 or 10.4 if it's compiled under 10.6 without any special options.

Then when Apple guarantee backwards compatibility, they are just kidding us!
Where you have seen any guarantees by Apple for backwards compatibility? That said, in general, programs compiled for older OS releases will work fine on newer OS releases (up to a point). That is what backwards compatibility means. It does not mean that if you compile a program for Mac OS X 10.6, it is guaranteed to run on 10.5 and 10.4 (that would be something like "future compatibility", which is almost impossible).

To make sure that your application runs on older Mac OS X releases, you must compile it *for* that Mac OS X release. This means that you have to compile it using the appropriate -k-macosx_version_min switch, and link it against the appropriate Mac OS X SDK.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #5 on: March 25, 2012, 11:24:43 pm »
Quote
Where you have seen any guarantees by Apple for backwards compatibility?

I think I read it here:

http://lists.apple.com/archives/xcode-users/2011/Jul/msg00223.html

Quote
(Backwards compatibility) does not mean that if you compile a program for Mac OS X 10.6, it is guaranteed to run on 10.5 and 10.4 (that would be something like "future compatibility", which is almost impossible).

Sorry, I don't understand your reasoning. If you compile a program for Mac OS X 10.6 and want it to run on 10.5, you want it to be compatible with previous versions. Hence, you should talk about "backwards compatibility".

I didn't use any options in my app which was compiled with Xcode 4.3.1 under Lion. If you had Snow Leopard handy and downloaded my app, you could solve the mistery with a simple double-click.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #6 on: March 25, 2012, 11:26:01 pm »
I would like to check your application with Mac OS X 10.4 and 10.5 if it could run on PPC based Macs. Please create a version for PPC processors (Project Options : Code generation : Target CPU family : powerpc) and leave a note where the binary can be loaded from.

Sure. I'll do it tomorrow, when I can use my iMac again. Right now I am using my Windows PC.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 746
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #7 on: March 25, 2012, 11:44:21 pm »
Quote
Where you have seen any guarantees by Apple for backwards compatibility?

I think I read it here:

http://lists.apple.com/archives/xcode-users/2011/Jul/msg00223.html
What Christiaan Hofman says in that post about libraries is correct. That is why you should always compile against the SDK corresponding to the earliest Mac OS X version you want to support.

Quote
Quote
(Backwards compatibility) does not mean that if you compile a program for Mac OS X 10.6, it is guaranteed to run on 10.5 and 10.4 (that would be something like "future compatibility", which is almost impossible).

Sorry, I don't understand your reasoning. If you compile a program for Mac OS X 10.6 and want it to run on 10.5, you want it to be compatible with previous versions. Hence, you should talk about "backwards compatibility".
As mentioned: if you do *not* use any special options, the system tools will always only guarantee compatibility with the current Mac OS X version. That is why you have to use special options. In your original message you said that you did not want to use the "-macosx_version_min" parameter (at least that is how I understood it; if you simply meant that you would use 10.5 instead of 10.6, then I don't understand what you are asking), so in that case all you can count on is that the program will run on Mac OS X versions equal or greater than your own system version.

Quote
I didn't use any options in my app which was compiled with Xcode 4.3.1 under Lion. If you had Snow Leopard handy and downloaded my app, you could solve the mistery with a simple double-click.
I have Mac OS X 10.6. And your program may or may not run on my system (I won't test it, because it's useless to test -- read on why). All I'm saying is that it's not guaranteed to run. And as soon as you add a single unit to your program, or call an extra routine from a unit you already use, it may stop working on previous Mac OS X versions even if it works today.

Again, and for the last time: the only way to make sure that programs run on previous Mac OS X versions, is to use the appropriate -kmacosx_version_min switch and to link against the appropriate Mac OS X SDK.

Now, Apple does not like to spend money on keeping supporting old systems (they don't earn any money from it), so with almost every new Xcode version they remove support for yet another older Mac OS X version (Xcode 2.5 was the last one with 10.4 support, Xcode 3.2.x the last with 10.5 support, ...). This is a pain, makes it hard to support systems older than Apple deems worthy (especially since older Xcode versions don't necessarily run on newer Mac OS X versions -- one place where Apple does not maintain backward compatibility is in low level debugger interfaces and the like), but it does not change anything about the fact that you have to follow the instructions in the previous paragraph to guarantee that a program will run on an older Mac OS X version.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1121
    • formatio reticularis
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #8 on: March 26, 2012, 12:26:47 am »
I tested your application, and it worked on an Intel-based Mac with Mac OS 10.6.

However, I am quite sure that Jonas Maebe is right and that even if it runs on my machine, it is not guaranteed that it runs with another one, and it is also not sure that the next revision of your application would run.

As already posted in one of the other threads you opened, I would recommend to buy a used G4 Mac and to install OS 10.4 with the appropriate Xcode version there. Even the newest versions of Lazarus and Free Pascal run on PPC macs with Mac OS Tiger. Given the low prices for e.g. used Mac Minis G4 now, this may pay-off with the first application you sell.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #9 on: March 26, 2012, 07:45:15 am »
Quote
I tested your application, and it worked on an Intel-based Mac with Mac OS 10.6.

This is good news. So, I have to say Apple are right -- so far -- about backwards compatibility. I didn't use any option parameters addressing a lower version (I developed my app under Lion) and, in spite of that, it ran on your Snow Leopard Mac.

Now I know that the statement "under no circumstances can you run an application under OS X 4.0, 5.0 and 6.0 if it was compiled with Xcode 4.3.1" is wrong.

I can't see why my app, which works on your Mac OS 10.6, might  not work on somebody else's Mac OS 10.6. What differences could there be between the two Macs?
« Last Edit: March 26, 2012, 07:50:10 am by pasquale »
I'm beginning to love the Mac and hate Apple's money-hungry policy.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1121
    • formatio reticularis
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #10 on: March 26, 2012, 08:52:10 am »
OK, but your question as a software developer should not be "does the application run under some circumstances?" (the complement of the statement "under no circumstances can you run an application under OS X 4.0, 5.0 and 6.0 if it was compiled with Xcode 4.3.1"), the question should be "does it run under all circumstances?".

Although the operating system version is identical, there may be differences in the subversion (I used 10.6.8 ), in additional installed libraries and system-extensions, in the hardware and in global user preferences affecting the whole system.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #11 on: March 26, 2012, 04:53:38 pm »
I would like to check your application with Mac OS X 10.4 and 10.5 if it could run on PPC based Macs. Please create a version for PPC processors (Project Options : Code generation : Target CPU family : powerpc) and leave a note where the binary can be loaded from.

When I try to compile against the powerpc CPU, I get an error message concerning the PowerPDF package, which works just fine when I compile in the default mode.

Any idea why this happens?

See attached file.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #12 on: March 26, 2012, 05:02:04 pm »
OK, but your question as a software developer should not be "does the application run under some circumstances?" (the complement of the statement "under no circumstances can you run an application under OS X 4.0, 5.0 and 6.0 if it was compiled with Xcode 4.3.1"), the question should be "does it run under all circumstances?".

Although the operating system version is identical, there may be differences in the subversion (I used 10.6.8 ), in additional installed libraries and system-extensions, in the hardware and in global user preferences affecting the whole system.

I have a sneaky suspicion that, if I specify the -macosx_version_min, then the resulting application will check if the system runs under that version or above and, if it doesn't, it will shut down without even trying to run.

I would love to receive further feedback about any compatibility issues that my first Mac application may originate. I'm aware that fewer and fewer people in this Forum are using Tiger or Leopard, so I'm afraid the first negative feedback will come directly from my potential Italian customers who will try to install my app on their old Mac versions.

Let's wait and see...
« Last Edit: March 26, 2012, 05:38:00 pm by pasquale »
I'm beginning to love the Mac and hate Apple's money-hungry policy.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8555
  • FPC developer.
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #13 on: March 26, 2012, 06:02:06 pm »
I would like to check your application with Mac OS X 10.4 and 10.5 if it could run on PPC based Macs. Please create a version for PPC processors (Project Options : Code generation : Target CPU family : powerpc) and leave a note where the binary can be loaded from.

When I try to compile against the powerpc CPU, I get an error message concerning the PowerPDF package, which works just fine when I compile in the default mode.

Any idea why this happens?

To me this looks like you have powerpc FPC installed, but not a LCL/lazarus compiled for the PPC target.
 

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Re: I wish I could test my first app under OS X 10.4, 10.5 and 10.6!
« Reply #14 on: March 26, 2012, 06:33:42 pm »
After reading this:

Quote
Amongst Macs, OS X 10.7, aka Lion, again boosted its share; in February, the mid-2011 edition accounted for 38.9% of all Apple desktop operating systems in use. Snow Leopard, or OS X 10.6, retained its lead over Lion, however. The 2009 version powered 43.4% of all Mac desktops and notebooks.”

I wonder if it still makes sense to worry about backwards compatibility issues.

If the statistics above are true, it means that more than 80% of Mac users have either Snow Leopard or Lion.

Considering that my first Mac application seems to work on Snow Leopard without setting any macosx_version_min parameters, probably I should just forget about OSX 10.4 and 10.5 and only use the Xcode 4.3.1 default settings.
« Last Edit: March 26, 2012, 06:42:15 pm by pasquale »
I'm beginning to love the Mac and hate Apple's money-hungry policy.

 

TinyPortal © 2005-2018