Recent

Author Topic: After upgrading to the latest version of XCode, Lazarus does not compile anymore  (Read 11030 times)

pasquale

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

A few days ago I upgraded to Mavericks and XCode was upgraded as well.

After that, I installed the latest stable version of Lazarus for OS X and its IDE runs just fine.

Unfortunately, I have realized that Lazarus does not compile anymore. When I click on the execution button, it tells me it cannot find some files with an *.so extension and the compilation does not take place.

Do you know what I must do to make Lazarus work?

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

havezet

  • New Member
  • *
  • Posts: 26
You need to reinstall the command line tools.

In a Terminal session; type in:

Code: [Select]
xcode-select --install
See also: http://www.computersnyou.com/2025/
« Last Edit: October 30, 2013, 09:50:30 am by havezet »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 674

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Hi,

Thanks for your replies.

I have executed the code:

Code: [Select]
xcode-select --install
in the Terminal. The installation of the XCode tools was completed successfully.

Unfortunately, I still cannot compile with Lazarus, but the error message has changed. Now I get the following:

Id: Framework not found Carbon

Do you know what I am missing?

Thanks in advance.

« Last Edit: October 30, 2013, 05:25:17 pm by pasquale »
I'm beginning to love the Mac and hate Apple's money-hungry policy.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 674
Are you compiling a 32 bit (i386) program? The Carbon framework does not exist for 64 bit, and Lazarus does not yet fully support Cocoa (which does exist for 64 bit).

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
I would like to compile a 32 bit (i386) program so it can be used by both 32 and 64 bit Macs. I don't know how to set it in the Lazarus environment. Could you please tell me how to do it?

All I know is, I was more than happy with the previous version of lazarus and XCode. OS X updated XCode without informing me, otherwise I would have stopped it, and now I can't use lazarus anymore.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 674
Older Xcode versions are never supported on newer OS X versions, that's why they are removed by the installer. I seldom use Lazarus myself to actually compile code (I only use it as an editor), so I'll let someone else answer this. It seems unlikely that this second issue you have is related to Xcode though. I haven't seen anyone else with this problem yet either.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
After upgrading to Mavericks, I could use the old version of Lazarus and compile with it without any problems.

The day after, Mavericks upgraded the other applications that were on my Mac, among which there was XCode.

After XCode was updated, I found Lazarus could not compile anymore. So I installed the latest version of Lazarus hoping that it would be compatible with the newest version of XCode, but, as I said, I'm still unable to compile and right now the problem seems to be related to the Carbon Framework. I don't even know what this Carbon Framework is, I just would like Lazarus to be able to compile as it was able to do before XCode was upgraded.

Thanks in advance for any help you may want to give me.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
Hi,

I've managed to solve my problem. I just needed to set the following parameter:

Project>Project Options>Compiler Options>Other>Custom Options...

-XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
I'm beginning to love the Mac and hate Apple's money-hungry policy.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 674
That should not be required for the linker to find the Carbon framework, as it also exists in /System/Library/Frameworks, which is searched by default. I just checked and this compiles fine on the command line:

Code: [Select]
{$linkframework Carbon}

begin
end.

pasquale

  • Full Member
  • ***
  • Posts: 183
    • Esposito Software
That should not be required for the linker to find the Carbon framework, as it also exists in /System/Library/Frameworks, which is searched by default. I just checked and this compiles fine on the command line:

Code: [Select]
{$linkframework Carbon}

begin
end.

The problem was due to the fact that in the Options I had a reference to MacOSX10.6.sdk which needed to be changed to MacOSX10.8.sdk because version 6 is not present on my Mac anymore.
I'm beginning to love the Mac and hate Apple's money-hungry policy.

Brian Coleman

  • New Member
  • *
  • Posts: 34
Hi,

A very simple solution has been posted by rale:

http://forum.lazarus.freepascal.org/index.php/topic,22529.msg133081.html#msg133081

Brian Coleman

Shebuka

  • Sr. Member
  • ****
  • Posts: 422
Hi,

I've managed to solve my problem. I just needed to set the following parameter:

Project>Project Options>Compiler Options>Other>Custom Options...

-XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

The problem was due to the fact that in the Options I had a reference to MacOSX10.6.sdk which needed to be changed to MacOSX10.8.sdk because version 6 is not present on my Mac anymore.

I've also had this problem, but in my case if i reference to 10.8 then the linker fails to link to dlybs that are referenced to 10.6, so i've copied my 10.6 sdk backup into /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ and now it works.

vonskie

  • Full Member
  • ***
  • Posts: 138
Hi,

I've managed to solve my problem. I just needed to set the following parameter:

Project>Project Options>Compiler Options>Other>Custom Options...

-XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk



The problem was due to the fact that in the Options I had a reference to MacOSX10.6.sdk which needed to be changed to MacOSX10.8.sdk because version 6 is not present on my Mac anymore.

I've also had this problem, but in my case if i reference to 10.8 then the linker fails to link to dlybs that are referenced to 10.6, so i've copied my 10.6 sdk backup into /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ and now it works.

[/i][/u]

What version of xcode had the 10.6 sdk?



vonskie

  • Full Member
  • ***
  • Posts: 138
I also upgraded to the lastest xcode and 1.0.14 stopped compiling.

I had to do the restore of 4.6.3 and use that dbg

but even with that it will still not compile.

So I tried 1.2 and fpc 2.6.2 no luck

So I tried 1.2 and fpc 2.6.4 no luck as I can not rebuild the ide.

Question is how did you come to the conclusion that that directory was missing? What errors did you turn on in the compiler options?

My guess is I have the same problem because when I do a show all it says many carbon things are missing from various directories.

Is someone working on these issues or will we just have to keep restoring older directories to keep laz working?