-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Installing python on MacBook Pro M2 - ensurepip "died with <Signals.SIGABRT: 6>." #2707
Comments
Please set the envvars that enable dyld diagnostic logging as per Logging Dynamic Loader Events -- Apple Documentation Archive and see if there'll be any details about that "missing symbol called" error. |
@native-api Thank you for responding. So, I was running the installation like that (LMK if something is wrong): export PYENV_DEBUG=1
export DYLD_PRINT_LIBRARIES=1
export DYLD_PRINT_LIBRARIES_POST_LAUNCH=1
export DYLD_PRINT_APIS=1
export DYLD_PRINT_STATISTICS=1
export DYLD_PRINT_INITIALIZERS=1
export DYLD_PRINT_SEGMENTS=1
export DYLD_PRINT_BINDINGS=1
pyenv install -v 3.10.11 2>&1 | tee trace.log I couldn't find more information about the Attaching the new trace.log file: |
https://stackoverflow.com/questions/39623829/dyld-print-libraries-not-working says that the reason is SIP. It strips all According to https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection, it can only be temporarily disabled via Recovery mode. |
@native-api I've managed to disable SIP and rerun the installation. I found the
I found this stackoverflow with similar issue: https://stackoverflow.com/questions/73583024/how-can-i-find-out-which-symbol-is-causing-dyld-missing-symbol-called that wasn't helpful for solving the problem. Attaching the log tail: |
Okay. Let's see what's wrong with this symbol. Please show the output of For me, it shows:
(The leading underscore is the result of compiler's mangling to indicate the C calling convention.) |
Running: nm -g "/private/var/folders/g7/g62ctbqd7r9_skkcy6122cp80000gq/T/python-build.20230611111718.7801/Python-3.10.11/build/lib.macosx-13.4-arm64-3.10/_csv.cpython-310-darwin.so" Output:
|
Joining this thread. I'm seeing the same error when building Python 3.10 (it gets the latest which is 3.10.12). My setup is:
Any idea why the error refers to an error when running |
@anton-petrov @joshfriend Could you take a look? I cannot reproduce the problem -- maybe you will be able to?
|
Neither can I find the source code that produces that "missing symbol called" at https://opensource.apple.com -- to find out what we can set to get more information about it. Searching with |
Okay... it's STRAIGHT-OUT IMPOSSIBLE to get any more info from MacOS: void _dyld_missing_symbol_abort()
{
// We don't know the name of the lazy symbol that is missing.
// dyld3 binds all such missing symbols to this one handler.
// We need the crash log to contain the backtrace so someone can
// figure out the symbol.
auto allImageInfos = gAllImages.oldAllImageInfo();
allImageInfos->errorKind = DYLD_EXIT_REASON_SYMBOL_MISSING;
allImageInfos->errorClientOfDylibPath = "<unknown>";
allImageInfos->errorTargetDylibPath = "<unknown>";
allImageInfos->errorSymbol = "<unknown>";
halt("missing lazy symbol called");
} |
So one has to run the build under a debugger (including child processes) and set a breakpoint to this function.
Once the breakpoin is hit, see up the call stack where it has been called from. |
The source code references making a "crash log" that might have the backtrace we need. |
According to https://www.stata.com/support/faqs/mac/finding-mac-crash-log/, crash logs are placed into |
" |
@orlevii @zachmoshe In any case, googling for the "missing symbol called", as a workaround, they suggest reinstalling Homebrew and rebuilding everything that uses it. |
Just tested on my laptop with m1 pro and macOS 13.4, everything is ok! ❯ brew install pyenv
❯ pyenv install 3.10.12
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.12.tar.xz...
-> https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tar.xz
Installing Python-3.10.12...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.10.12 to /Users/anton/.pyenv/versions/3.10.12
❯ pyenv --version
pyenv 2.3.20
❯ which pyenv
/opt/homebrew/bin/pyenv |
i think the solution is removing brew and re-installing it + pyenv from scratch. i carried my old ~/.pyenv env from an x86 laptop (macos transfer) to my M2 max, everything "just worked" (didn't think about this) until i tried to install a new version of python via pyenv.. after doing that, was able to install 3.9.17, 3.10.12 and 3.11.4 no problem. ymmv (make sure you have the correct CPP/LDFLAGS, readline, openssl, etc.. in place too) |
Update: It should be noted that uninstalling I'm still unsure which library caused the problem in my case and whether there are more effective ways to handle this problem in the future. Thanks @native-api for helping me out |
Another possible option would be to reinstall all the Homebrew formulae. It's likely that Apple have bumped some library that some Homebrew packages were using -- so if you've migrated the Homebrew installation from an older MacOS version, they no longer match that dependency. |
Thanks, reinstall brew helped. |
I found this thread after seeing
while running a setup script on a MacBook Pro M1. I resolved the issue with just |
On my M1 MacBook Air, for which I had started with the x86 Rosetta Homebrew back in 2020, reinstalling peen fixed the dyld[74020]: missing symbol called error for me:
|
On my M2, the solution was to run the command with |
My old Homebrew installation was stubborn, so simply uninstalling and reinstalling it didn't solve the problem. I ended up needing to take the nuclear approach to fully remove the old Homebrew:
Once this was done, the uninstall/reinstall suggestions above seemed to do the trick. If you're seeing this error on an M1 or M2, I suggest migrating your Homebrew installation (here's one guide) before trying anything else. |
I had this after a migration from intel to mac m2. Removing both the old pyenv and brew, then
worked as expected |
That's what solved it. |
Too many issues will kill our team's development velocity, drastically.
Make sure you have checked all steps below.
Prerequisite
pyenv
and the defaultpython-build
plugin only. Please refrain from reporting issues of other plugins here.Description
env PYENV_DEBUG=1 <faulty command> 2>&1 | tee trace.log
and attachtrace.log
. E.g. if you have a problem with installing Python, runenv PYENV_DEBUG=1 pyenv install -v <version> 2>&1 | tee trace.log
(note the-v
option topyenv install
).config.log
from the build directory/tmp
.env PYENV_DEBUG=1 pyenv install -f -k -v <version> 2>&1 | tee trace.log
config.log
from the build directory. When usingpyenv install
with-k
as per above, the build directory will be under$PYENV_ROOT/sources
.I'm trying to install pytnon 3.10.11
I've previously installed python
3.7.16
3.8.16
and3.9.16
with no problem.When I try to reinstall one of those versions, I get the same error.
So something was broken, I just can't tell what...
I've seen this issue - #2705 - I'm running on my ARM based
brew
, so it was not helpful.(Also checked the
trace.log
to see if there's anything related to that, couldn't find anything)Things I tried to do:
brew update
&brew upgrade
- Didn't change the outcomexcode-select --install
) - Didn't change the outcomeLogs
trace.log
config.log
The text was updated successfully, but these errors were encountered: