I am trying to run an application (concretely, the quabs QBF solver: https://github.com/ltentrup/quabs), following all of its paths.
git clone https://github.com/ltentrup/quabs.git
cd quabs
git submodule init
git submodule update
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
But receive the following error in the last part, the make
:
xcrun: error: unable to load libxcrun (dlopen(/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib, 0x0005): tried: '/Applications/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).
Which I have no idea how to interpret.
I found several errors that are similar, but are not the same. For instance, Unable to run git on Mac OS Big Sur seems similar, but (1) I have had the problem with MacOS Monterey and, above all, (2) my problem is not when running git, but when running make
(however, I am doing make
in a Gitlab repository).
Anyway, using that post (and this other one: https://developer.apple.com/forums/thread/652377), I remember performed the following:
sudo rm -r /Library/Developer/CommandLineTools
That is, I uninstall the Command Line tools. However, when doing make
, it returns exactly the same error. Which is really strange.
So, I reinstall it, using:
xcode-select --install
And the received error is exactly the same one.
Long story short, whenever I do this xcode-select --install
, I can after it do sudo rm -r /Library/Developer/CommandLineTools
. However, when I check this path (before removing it), I realize there is no such path, i.e. cd /Library/Developer/
contains no CommandLineTools. It does contain an Xcode directory, though.
Thus, this sounds rare from the very beginning.
Can anyone help? My only solution is to try it in an Ubuntu system, but rather not to and understand what is going on..
Note that there is a response (in the second post) that I do not understand and may help:
The default arm64e architecture will run for any command that has it in the bundle, the problem is that the libraries don't have the desired architecture. If you look at git for example using file command see that there is an arm64e version, this is the one that is running by default, use the file command to look at the architectures...
PS: As for the machine, I am using a MacBook Air with the new M1 chip, just in case this information is key, since the M1 yields several problems.
PS2: In other posts (see, for instance, https://developer.apple.com/forums/thread/694283) the solution is, again, removing and reinstalling. What is wrong in my case, then?