Hi,
I went back to some of my program in development after some time. The program compilation seems to work fine until after linking the object file (and before creating the executable). I get the following error:
xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (open() failed with errno=24), '/usr/lib/libxcrun.dylib' (no such file)).
collect2: fatal error: /usr/bin/dsymutil returned 1 exit status
compilation terminated.
make: *** [flash4] Error 1
I check rapidly the systems and libxcrun.dylib exists in .../CommandLineTools/... but not in /usr/lib.
I suppose the problem might linked to the update of macOS, as the compilation worked fine a month ago when I was on the previous OS. (but there might have been other change that I don't know about).
Do anyone have a suggestion to solve this error. (I tried to reset xcrun as suggest in other thread but without success: xcode-select --install
cannot work as xcrun is already install, and
xcode-select -r
works but the problem does not disappear)
current OS: mocOS Monterey - Version 12.0.1
I finally found the answer (thank to "brew doctor"). To make it simple one just need to suppress the tool and reinstall it. So
sudo rm -rf /Library/Developer/CommandLineTools
sudo Xcode-select --install
In other words, the problem come from a old / depreciated version of CommandLineTools, which is consider as up to date by the system (update doesn't work...)