-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] 3005 onedir package broken on M1 Macs #62664
Comments
I don't think we support M1 macs yet, neither in classic packaging nor onedir packaging. |
@twangboy would the SaltStack project be open to supporting a Configuration Option or Environment Variable to allow a user to explicitly specify the path to their preferred It will look for
Another interesting problem, is I like to have multiple installations of Salt on my machine at a given time - I usually monkeypatch my Salt Python files just for me because I like to live dangerously while I'm hacking, but others can't or don't want to do that. Right now Salt is distributed on macOS with amd64/x86_64 architecture binaries, including all the binaries in $ lipo -info /opt/salt/lib/libcrypto.1.1.dylib
Non-fat file: /opt/salt/lib/libcrypto.1.1.dylib is architecture: x86_64 If I then try to $ /usr/bin/python3 -c import salt.client
/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/client/__init__.py", line 28, in <module>
import salt.cache
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/cache/__init__.py", line 12, in <module>
import salt.loader
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/loader/__init__.py", line 23, in <module>
import salt.utils.event
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/event.py", line 63, in <module>
import salt.channel.client
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/channel/client.py", line 13, in <module>
import salt.crypt
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/crypt.py", line 31, in <module>
import salt.utils.rsax931
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/rsax931.py", line 142, in <module>
libcrypto = _init_libcrypto()
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/rsax931.py", line 95, in _init_libcrypto
libcrypto = _load_libcrypto()
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/rsax931.py", line 88, in _load_libcrypto
return cdll.LoadLibrary(_find_libcrypto())
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 444, in LoadLibrary
return self._dlltype(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/salt/lib/libcrypto.dylib, 0x0006): tried: '/opt/salt/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/opt/salt/.pyenv/versions/3.9.12/openssl/lib/libcrypto.1.1.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
[ERROR ] An un-handled exception was caught by Salt's global exception handler:
OSError: dlopen(/opt/salt/lib/libcrypto.dylib, 0x0006): tried: '/opt/salt/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/opt/salt/.pyenv/versions/3.9.12/openssl/lib/libcrypto.1.1.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/client/__init__.py", line 28, in <module>
import salt.cache
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/cache/__init__.py", line 12, in <module>
import salt.loader
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/loader/__init__.py", line 23, in <module>
import salt.utils.event
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/event.py", line 63, in <module>
import salt.channel.client
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/channel/client.py", line 13, in <module>
import salt.crypt
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/crypt.py", line 31, in <module>
import salt.utils.rsax931
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/rsax931.py", line 142, in <module>
libcrypto = _init_libcrypto()
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/rsax931.py", line 95, in _init_libcrypto
libcrypto = _load_libcrypto()
File "/Users/rrrix/git/corpeng/salt-bootstrap/.venv/lib/python3.9/site-packages/salt/utils/rsax931.py", line 88, in _load_libcrypto
return cdll.LoadLibrary(_find_libcrypto())
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 444, in LoadLibrary
return self._dlltype(name)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/salt/lib/libcrypto.dylib, 0x0006): tried: '/opt/salt/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/opt/salt/.pyenv/versions/3.9.12/openssl/lib/libcrypto.1.1.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))) Incidentially, here are all of the
Currently Salt is basically broken for anyone using Apple Silicon that isn't comfortable hacking in the internals of it. Perhaps something along the lines of:
Also related: #61340 Seems like any of the above options would be fairly easy and let people have at least some kind of configuration-based workaround instead of forcing their filesystem to the structure that Salt currently expects. I would love to make this my first PR :) (I've been working on a few patches for other issues, but haven't submitted PR's yet) |
@rrrix nice to have someone else in on the Mac party here. I'm just getting started on trying to build 3005 on my M1 to see where things break and start chipping away at this. Looks like you have a way to fix the dylib issue above? I'm not above hacking if you want to give me a nudge in the right direction. |
In case it assists other people searching for this issue, my error ends with:
Edit: If I put
That said, maybe someone else wouldn't get this second error. Edit: Alright, well I had been importing salt.clients.ssh, which in newer versions seems to do more work (on |
Noting that 3006 fixes the issue for me (on M1 Mac). |
@jpmckinney Do you mean that the x86 package works correctly or something else? |
Description
/opt/salt/bin/run
and any commands which call it (e.g. /opt/salt/bin/salt-call.sh` on the Salt 3005 onedir installer (https://repo.saltproject.io/salt/py3/macos/latest/salt-3005-1-macos-x86_64.pkg) result in a lengthy traceback due to openssl architecture issues.Setup
M1 Mac, download and install https://repo.saltproject.io/salt/py3/macos/latest/salt-3005-1-macos-x86_64.pkg
Steps to Reproduce the behavior
/opt/salt/bin/salt-call.sh
Expected behavior
Salt operates as expected.
Versions Report
Unable to run due to total salt command failure.
Additional context
This has worked (running the x86_64 pkg on M1/arm Macs) up through the last 3004 release.
The text was updated successfully, but these errors were encountered: