Recent

Author Topic: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error  (Read 14312 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« on: September 25, 2018, 01:54:12 pm »

Just switched to Mojave (10.14) and thought I'd share an issue I ran into.


I found that the XCode commandline tools no longer seems to include crt1.x.y.o, triggering the "Id:file not found: /usr/lib/crt1.10.5.o error" when trying to compile Lazarus (SVN, from command line).


To compile my Lazarus from SVN, I then manually re-installed the (wrong) command-line tools of 10.13. You can download it from the Apple Developers website. You'll need to login with your AppleID first, after that use this link if you can't find it.
Without it, Lazarus will not compile.


Even after re-installing the command-line tools for 10.14, I keep getting the "text-based stub ... and library file ... are out of sync" warning when compiling from the command line, like this example:


Code: Pascal  [Select][+][-]
  1. ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.


Lazarus IDE does compile now though and it does run - hope this is useful to anyone.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #1 on: September 25, 2018, 06:27:57 pm »
So on 2 different computers, I have found that we have 2 options;


1) Add the following line to fpc.cfg (/etc/fpc.cfg)


Code: Pascal  [Select][+][-]
  1. -XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk


2) Or install macOS 10.13 Command-line tools


This second option produces a bunch of "text-based stub ... and library file ... are out of sync" messages.


The end result is the same; issues with some of the controls.
For example; I cannot scroll through the property rows in Object inspector (nothing works; scroll wheel, moving the scrollbar, or by using cursor keys). After some testing this seems StringGrid related?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #2 on: September 25, 2018, 06:58:46 pm »
Can you scroll at TMemo?
What’s your system preferences for scoll bars? “Always show”?

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #3 on: September 26, 2018, 11:09:20 am »
Hi Skalogryz,


The problem already occurs with the Object Inspector.
If a property is not in the visible area, then there is no way I can reach it - not with wheel mouse, scrollbar or arrow keys  :'(
Based on your suggestion I did test the 3 option (restarting the IDE every single time after changing a setting), but the effect remains the same for all 3 options (Automatic, When scrolling, Always).


TMemo, TListbox, and TTreeview seem to scroll correctly.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #4 on: September 26, 2018, 02:09:03 pm »
Can you scroll TTreeView?

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #5 on: September 26, 2018, 07:19:18 pm »
Yes I can.
But TStringGrid goes goofy.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #6 on: September 28, 2018, 02:59:20 pm »
Other observation, and I tested this on a machine with Command Line tools for 10.13 and a machine with only Command Line tools 10.14;


When compiling an application under Mojave (10.14), the application sometimes responds strange. Certain specific controls (seen it with standard TLabels and TBCButtons) simply do not get drawn or refreshed, or only after moving the mouse over it.


Compiling the exact same application under High Sierra (10.13.6) result in an application that functions correctly under Mojave. No strange behavior or refresh issues.

laguna

  • Sr. Member
  • ****
  • Posts: 323
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #7 on: October 24, 2018, 04:13:15 am »
use this
Code: Pascal  [Select][+][-]
  1. sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/crt1.10.5.o  /usr/lib/crt1.10.5.o
  2.  

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #8 on: October 24, 2018, 05:50:15 pm »
Awesome find! Unfortunately, without disabling SIP, this won't work ...  :(
(short version: boot in recover, Terminal: csrutil disable, reboot, make the link, reboot in recovery, Terminal: csrutil enable, reboot)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #9 on: October 27, 2018, 03:46:59 pm »
You don't need to do any of the above. Installing FPC 3.0.4a will update your /etc/fpc.cfg with the correct command line options for all platforms. The -XR option mentioned above will only work for x86-64 (64 bit), not for i386.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #10 on: October 28, 2018, 08:11:09 pm »



The problem with that, is that it will not work on a clean Mojave install (it may work when upgrading from High Sierra, if XCode used to be installed on it).


On a clean Mojave install, with XCode and command-line tools installed, FPC will refuse to install as it does not recognize the command-line tools. Additionally; The file /usr/lib/crt1.10.5.o remains missing.
The only option seems to be making a link ( as suggested by Laguna) or installing command-line tools from a previous version.
Any suggestions are most welcome ...


I stand corrected:
I found with one of the downloads (here under Lazarus 1.84 and 2.0 RC1) are still listing the 3.0.4 FPC version and NOT the FPC 3.0.4a version (found here).
« Last Edit: October 28, 2018, 08:20:19 pm by Hansaplast »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #11 on: October 28, 2018, 08:14:48 pm »

On a clean Mojave install, with XCode and command-line tools installed, FPC will refuse to install as it does not recognize the command-line tools.
FPC 3.0.4a installs successfully on a clean macOS 10.14 "Mojave" install with Xcode and the command line tools installs.

Quote
Additionally, the file /usr/lib/crt1.10.5.o remains missing.
You don't need this file with the default /etc/fpc.cfg file generated by the FPC 3.0.4a installer, so you don't need to make a symlink.
« Last Edit: October 28, 2018, 08:21:43 pm by Jonas Maebe »

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #12 on: October 28, 2018, 08:21:10 pm »
Thanks Jonas, you're correct - I found that with the Lazarus downloads (1.8.4 and 2.0RC1) the old FPC 3.0.4 is still listed instead of the new 3.0.4a version.  :o

kcandrews

  • Jr. Member
  • **
  • Posts: 50
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #13 on: February 08, 2019, 06:33:35 pm »
Just as info, I have been working with Martin_fr on the new lldb debugging setup to fix lldb exception name mangling, and stepping issues (f7/f8).  Had been working in High Sierra 10.13.6 and was unable to get debugging to work well in Mojave after first OSX upgrade attempt several days ago (pre Laz 2.0.0), but today succeeded with acceptable Lazarus/lldb debugging on a large multi-threaded project:

https://forum.lazarus.freepascal.org/index.php/topic,42869.msg310586.html#msg310586

Thanks, Hansaplast & Jonas for solving the crt object error IDE link problem!  With the lldb debugging working (avoiding gdb codesigning, csrutil modifications), and major Cocoa improvements (thanks Dmitry), Lazarus is working well for me in the OSX 64-bit environment and I no longer have the trepidation associated with Mojave being the last version to support 32-bit apps :-)

« Last Edit: February 10, 2019, 06:41:18 pm by kcandrews »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Mojave (10.14) - Id:file not found: /usr/lib/crt1.10.5.o error
« Reply #14 on: February 08, 2019, 08:05:18 pm »
After upgrading to macOS 10.14, you have to reinstall FPC 3.0.4 so it can generate a new fpc.cfg for that OS. There is unfortunately no way anymore to generate a config file that is appropriate for all macOS versions.

 

TinyPortal © 2005-2018