Closed andreadelprete closed 2 months ago
I've just managed to fix it by adding the following lines in the setup.py script:
import skbuild
skbuild.constants.set_skbuild_plat_name('macosx-13.0-arm64')
It's ugly but it worked. No idea if there is a better way to do it though.
Hi Andrea,
Thanks for the message. My best guess is that maybe your Xcode Developer Tools are x86 running via Rosetta? I am using a M2 too and have not seen this problem before. Would you mind checking so we know if this was the underlying problem?
Glad you managed to fix it!
Best Tim
Hi Tim, thanks for the answer. That's a good guess. I've checked by running gcc -v
, but from the output I get it doesn't seem the Xcode Developer Tools are x86:
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Could you check the same with the installed cmake version?
Thanks
Not sure how to do that. Running cmake --version
does not give me any info. If I create an empty cmake project and check the default value of the CMAKE variables I don't see anything useful. I was expecting to see a value for CMAKE_OSX_ARCHITECTURES
, but by default it's empty. Any suggestion?
However, if I run make --version
I get the following:
make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
I guess this confirms your guess. The installed make
seems to be for x86 rather than for arm64.
I guess this confirms your guess. The installed make seems to be for x86 rather than for arm64.
I think this would explain it. Feel free to close the issue if you believe it is resolved.
Best Tim
Ok, thanks for the help!
Hi @Tim-Salzmann ,
I hope you're doing fine! I am trying to install l4casadi on an M2 MacBook, arm64 architecture. I have installed all the required dependencies via pip, but when I try to install l4casadi with
pip install . --no-build-isolation
I get the following error message:The error message keeps going, but I think the interesting part is the last few lines of what I have copied above. In particular, it complains about finding arm64 libraries, while it was expecting x86_64 ones. I think this is due to the compilation flag
-arch x86_64
. However, I cannot figure out how to change it by modifying the project configuration files. I guess the problem comes from the fact that skbuild thinks my machine has an x86 architecture, while instead it is arm. Any idea how to fix this?