Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOFA is compatible with only x86_64, not arm64. #4690

Open
GoGoComputer opened this issue Apr 28, 2024 · 1 comment
Open

SOFA is compatible with only x86_64, not arm64. #4690

GoGoComputer opened this issue Apr 28, 2024 · 1 comment
Assignees
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework

Comments

@GoGoComputer
Copy link

Problem

Description
hello, I wanted to use Sofa 23.06.00 in M1 Mac Book Pro
But I can not use Sofa. This error message indicates:
(have 'x86_64', need 'arm64e' or 'arm64'))
I'd like to know the solution.
I want to use Sofa 23.06.00

Steps to reproduce
< LIST THE STEPS TO REPRODUCE YOUR PROBLEM HERE >

  1. install anaconda and make virtual environment
  2. install sofa framework
  3. define the environment variables
  4. import Sofa in python

Expected behavior
< DESCRIBE WHAT YOU THINK SHOULD HAVE HAPPEN INSTEAD >

Success importing Sofa in python without any error.


Environment

Context

  • System: Mac OS X 14.4.1 (23E224)
  • Version of SOFA:SOFA_v23.06.00_MacOS.zip
  • State: < BUILD OR INSTALL DIRECTORY - e.g: "Build directory", "Install directory" >

Command called

(sofarl) bemore@BeMores-MacBook-Pro site-packages % python 
Python 3.8.19 (default, Mar 20 2024, 15:27:52) 
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sofa
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Using environment variable SOFA_ROOT: /Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS
---------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/__init__.py", line 140, in <module>
    import Sofa.Helper
ImportError: dlopen(/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so, 0x0002): tried: '/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so' (no such file), '/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
>>> 

Env vars

python -c "exec( \"import os, sys\nprint('#################')\nprint('--- sys.version ---')\nprint(sys.version)\nprint('--- PATH ---')\ntry:\n  print(os.environ['PATH'])\nexcept Exception:\n  pass\nprint('--- SOFA_ROOT ---')\ntry:\n  print(os.environ['SOFA_ROOT'])\nexcept Exception:\n  pass\nprint('--- PYTHONPATH ---')\ntry:\n  print(os.environ['PYTHONPATH'])\nexcept Exception:\n  pass\nprint('--- sys.path ---')\ntry:\n   print(str(sys.path))\nexcept Exception:\n   pass\nprint('#################')\" )"
--- sys.version ---
3.8.19 (default, Mar 20 2024, 15:27:52) 
[Clang 14.0.6 ]
--- PATH ---
/usr/local/opt/python@3.8/bin/:/opt/anaconda3/envs/sofarl/bin:/opt/anaconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/share/dotnet:~/.dotnet/tools
--- SOFA_ROOT ---
/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS
--- PYTHONPATH ---
/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages:/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.12.01_MacOS/plugins/SofaPython3/lib/python3/site-packages:/path/to/SofaPython3/lib/python3/site-packages:
--- sys.path ---
['', '/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages', '/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.12.01_MacOS/plugins/SofaPython3/lib/python3/site-packages', '/path/to/SofaPython3/lib/python3/site-packages', '/opt/anaconda3/envs/sofarl/lib/python38.zip', '/opt/anaconda3/envs/sofarl/lib/python3.8', '/opt/anaconda3/envs/sofarl/lib/python3.8/lib-dynload', '/opt/anaconda3/envs/sofarl/lib/python3.8/site-packages']
#################


Logs

Full output

(sofarl) bemore@BeMores-MacBook-Pro site-packages % python 
Python 3.8.19 (default, Mar 20 2024, 15:27:52) 
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sofa
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Using environment variable SOFA_ROOT: /Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS
---------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/__init__.py", line 140, in <module>
    import Sofa.Helper
ImportError: dlopen(/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so, 0x0002): tried: '/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so' (no such file), '/Users/bemore/Library/CloudStorage/OneDrive-Personal/DEV/SOFA_study/SOFA_v23.06.00_MacOS/plugins/SofaPython3/lib/python3/site-packages/Sofa/Helper.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
>>> 

Content of build_dir/CMakeCache.txt

< DRAG AND DROP YOUR CMAKECACHE.TXT HERE >


Thank you for your report.

@GoGoComputer GoGoComputer added the issue: bug (minor) Bug affecting only some users or with no major impact on the framework label Apr 28, 2024
@hugtalbot hugtalbot changed the title Sofa is compatible with only x86_64, not arm64. SOFA is compatible with only x86_64, not arm64. Apr 28, 2024
@bakpaul
Copy link
Contributor

bakpaul commented Apr 29, 2024

Yes, the CI builder generating the binaries is an intel mac. This is a compatibility choice, to enable the use of our binaries by every one.
To use them on a arm64 you need to install Rosetta on your mac to run x86 libraries. But it will not run at full speed because of the compatibility layer. To have optimized binaries for your architecture, you'll need to compile them yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework
Projects
None yet
Development

No branches or pull requests

2 participants