After upgrading to the latest version of XCode, Lazarus does not compile anymore lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- pasquale · 2013-10-30 07:01 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 ---------------------------------------------------------------------- havezet · 2013-10-30 08:07 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/ ---------------------------------------------------------------------- Jonas Maebe · 2013-10-30 10:00 Or rather see http://www.freepascal.org/down/i386/macosx- netherlands.var, at the bottom of http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.6.2/ or http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X#Prerequisi tes:_Apple_Developer_Tools . Those will always be updated when new Xcode versions come out with different hoops to jump through. ---------------------------------------------------------------------- pasquale · 2013-10-30 16:23 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. ---------------------------------------------------------------------- Jonas Maebe · 2013-10-30 16:30 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 · 2013-10-30 16:36 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. ---------------------------------------------------------------------- Jonas Maebe · 2013-10-30 16:59 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 · 2013-10-30 17:09 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. ---------------------------------------------------------------------- pasquale · 2013-10-30 19:12 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.platfor m/Developer/SDKs/MacOSX10.8.sdk ---------------------------------------------------------------------- Jonas Maebe · 2013-10-30 19:18 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 · 2013-10-30 19:32 Quote from: Jonas Maebe on October 30, 2013, 08:18:34 pmThat 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. ---------------------------------------------------------------------- Brian Coleman · 2013-11-05 19:15 Hi, A very simple solution has been posted by rale: http://forum.lazarus.freepascal.org/index.php/topic,22529.msg133081.ht ml#msg133081 Brian Coleman ---------------------------------------------------------------------- Shebuka · 2014-01-23 10:06 Quote from: pasquale on October 30, 2013, 08:12:57 pmHi, 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.platfor m/Developer/SDKs/MacOSX10.8.sdk Quote from: pasquale on October 30, 2013, 08:32:21 pmThe 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/Develo per/Platforms/MacOSX.platform/Developer/SDKs/ and now it works. ---------------------------------------------------------------------- vonskie · 2014-03-17 16:02 Quote from: Shebuka on January 23, 2014, 11:06:40 amQuote from: pasquale on October 30, 2013, 08:12:57 pmHi, 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.platfor m/Developer/SDKs/MacOSX10.8.sdk Quote from: pasquale on October 30, 2013, 08:32:21 pmThe 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/Develo per/Platforms/MacOSX.platform/Developer/SDKs/ and now it works. [/i][/u] What version of xcode had the 10.6 sdk? ---------------------------------------------------------------------- vonskie · 2014-03-17 16:38 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? ---------------------------------------------------------------------- Jonas Maebe · 2014-03-17 17:11 Those issues do not exist after a clean installation. They only exist if you manually added a parameter that references this directory that no longer exists after the upgrade. There is little that FPC or Lazarus can do about this, since it's you that added that reference to the directory in the first place. Apple doesn't like spending time on testing support for older Mac OS X versions with newer toolchains, so they constantly delete SDKs for older Mac OS X versions. This problem is unrelated to FPC/Lazarus and also affects people that only use Xcode. The only solution is to make backup copies of the SDKs (or Xcode) before upgrading, or to always use the latest version of the SDK. ---------------------------------------------------------------------- vonskie · 2014-03-18 01:15 I finally got the older version of lazarus 1.0.14 with 2.6.2 working after installing gdb via the brew instructions and then signing the file and then setting the path. The gdb from the 4.6.3 Xcode did not work and caused compiling to fail.