Recent

Author Topic: Trouble compiling on OS X 10.6 for 10.5  (Read 4184 times)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Trouble compiling on OS X 10.6 for 10.5
« on: January 21, 2012, 02:44:20 pm »
I am developing a cross platform application on OS X 10.6 using Lazarus 0.9.31. After a colleague reported it was not running on Intel 10.5, I found the info on linking for 10.5 and added the following Build Macro:

Code: [Select]
if TargetOS = 'darwin' then begin
  UsageCustomOptions += ' -k-macosx_version_min -k10.5';
  UsageCustomOptions += ' -XR/Developer/SDKs/MacOSX10.5.sdk/';
end; 

That didn't solve the problem though, it still would not run. I did check, and the SDK path is correct. I found an Intel box running 10.5, and compiled it there, but that is not a good solution.

Any suggestions as to what I am doing wrong?

Cheers,
Frederick
« Last Edit: January 21, 2012, 02:48:04 pm by Frederick »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #1 on: January 21, 2012, 02:48:44 pm »
Those options are correct. If it's not working, it means that the options are not passed to the compiler while linking your program or one of the libraries it uses.

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #2 on: January 21, 2012, 02:56:28 pm »
Thanks jmaebe,

Is there a way I can see what compiler options being passed by Lazarus?
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #3 on: January 21, 2012, 03:04:20 pm »
Project -> Project Options -> click on the "Show Options" or "Test" buttons at the bottom.

FWIW, I can't get any kind of build macro to add anything to UsageCustomOptions (conditional or not).

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #4 on: January 21, 2012, 03:16:27 pm »
As you say, the option switches do not appear to be added to the command line. Are the build macros broken?

Do you have a workaround?
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #5 on: January 21, 2012, 03:19:02 pm »
I can't help you. I'm not a Lazarus developer, and personally I use Lazarus almost exclusively as an editor.

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #6 on: January 21, 2012, 03:23:11 pm »
Thanks Jonas, it is helpful to know it is not just me.

I added switches to 'Other', and they do show up now. That probably will fix the issue, but don't have 10.5 handy to test at the moment.

I appreciate the input.
« Last Edit: January 21, 2012, 04:06:06 pm by Frederick »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Trouble compiling on OS X 10.6 for 10.5
« Reply #7 on: January 28, 2012, 08:37:39 pm »
Confirming, it did work. Thanks!
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

 

TinyPortal © 2005-2018