Hi all, I’d like to share the solution: the issue was related to the filesystem type.
When I reinstalled MacOS on a brand new drive, I chose case-sensitive APFS (but it could have been case-sensitive HFS+ as well). The default choice is actually a case-insensitive file system.
Switching back to a case-insensitive APFS solved the issue, but it’s a quite tricky operation.
- First you have to find conflicts in file names: you can use the python tools from here https://github.com/cr/MacCaseSensitiveConversion; chances are that you have to copy-paste the content, make the file executable with a “chmod a+x casecheck.py”, and correct the “python2” first string to “python”.
- Naming conflicts can’t be automatically solved; manual intervention is required, so hope not to find too many conflicts and, in case, consider reinstalling MacOS from scratch.
- Then backup your disk with Carbon Copy Cloner to a case-insensitive APFS or HFS+ partition on an external drive; do not use Time Machine, or it will bring back the case-sensitive APFS.
- Reboot your Mac in the external back-up disk (either setting the startup disk from the Preferences, or by pressing the option key at the startup).
- Use Disk Utility to format the Mac internal drive as case-insensitive APFS or HFS+, do not encrypt the filesystem or FileVault won’t work anymore.
- Restore the backup with Carbon Copy Cloner, and when everything’s done, change the startup disk back to the internal drive.
- Reboot MacOS and restore FileVault (if you were using it before).
Hope it will help anyone with the same issue.
Thanks and Best Regards.