[SOLVED] Missing cthreads on OS X Yosemite (Lazarus 1.4) lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- saml · 2015-06-19 19:01 I'm trying to get Lazarus 1.4 working on Mac OS X Yosemite (10.10.3) (running on macincloud.com), but keep getting problems. I have installed FPC, FPC Source, and Lazarus, in that order, from the downloads at SourceForge. Versions: Lazarus: 1.4.0 i386-darwin-carbon FPC: 2.6.4 OS X: Yosemite (10.10.3) When compiling, I get an error message, saying: "Semaphore init failed (possibly too many concurrent threads)". (See Screenshot 1) I got past this by including the cthreads unit as the first one among my uses. Then I can compile, but instead get problems when trying to run my compiled program: Compiling and running the empty default project, gives something like this, in the terminal (typed from a screenshot, since running RDP): Threading has been used before cthreads was initialized. Make cthreads one of the first units in your uses clause. Runtime error 211 at $002B45ED   $002B45ED  _CARBONCALENDARVIEW_finalize, line 1078 of /Users/mattias /tmp/buildlaz/Root/Developer/lazarus/lcl/interfaces/carbon/carboncalen darview.pas   $0002F036  PASCALMAIN, line 20 of ./include/headercontrol.inc   $00010F5D of ./include/applicatoin.inc   $00010E88 of ./include/wincontrol.inc   $00000001 (See screenshot 2) Any hints of things I could try? (Not sure I have access to all those LCL libs on this machine). ---------------------------------------------------------------------- skalogryz · 2015-06-19 19:37 what's your project source code? ---------------------------------------------------------------------- saml · 2015-06-19 19:41 Quote from: skalogryz on June 19, 2015, 09:37:00 pmwhat's your project source code? I tried both with the default "application" project that is started when Lazarus start, and with my little tool project, of which sources are here: https://github.com/BILS/MDCFileExportTool I get the same problem in both the Lazarus default application project, and my code above. ---------------------------------------------------------------------- saml · 2015-06-19 19:49 Quote from: saml on June 19, 2015, 09:41:08 pmI tried both with the default "application" project that is started when Lazarus start, and with my little tool project, of which sources are here: https://github.com/BILS/MDCFileExportTool Just committed ifdefs with the cthreads use clause I've been using. ---------------------------------------------------------------------- skalogryz · 2015-06-19 20:07 try to remove {$IFDEF UseCThreads} and see if it helps the problem. ---------------------------------------------------------------------- saml · 2015-06-19 20:27 Quote from: skalogryz on June 19, 2015, 10:07:08 pmtry to remove {$IFDEF UseCThreads} and see if it helps the problem. Yep, that did the trick! (Aaargh, didn't dawn upon me to check for uses clauses in the .lpr file!) A BIG thanks for the quick reply and help!