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

pip install redislite fails on m1 mac #152

Closed
ecgreb opened this issue Oct 4, 2021 · 5 comments · Fixed by #153
Closed

pip install redislite fails on m1 mac #152

ecgreb opened this issue Oct 4, 2021 · 5 comments · Fixed by #153

Comments

@ecgreb
Copy link

ecgreb commented Oct 4, 2021

Overview

pip install redislite fails on m1 mac

Environment

  • Python version 3.8.2
  • Pip version 21.2.4
  • gcc version 12.0.5 (apple arm)
% gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Steps to reproduce

Run pip install redislite on m1 mac native terminal (not using Rosetta 2). Note that installing with terminal using Rosetta (x86 compatibility mode) succeeds.

    gcc -std=c99 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -O2 -g -ggdb   -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -c debug.c
    debug.c:750:42: error: no member named '__eip' in 'struct __darwin_arm_thread_state64'
        return (void*) uc->uc_mcontext->__ss.__eip;
                       ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:844:47: error: no member named '__eax' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__eax,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:845:47: error: no member named '__ebx' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__ebx,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:846:47: error: no member named '__ecx' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__ecx,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:847:47: error: no member named '__edx' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__edx,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:848:47: error: no member named '__edi' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__edi,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:849:47: error: no member named '__esi' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__esi,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:850:47: error: no member named '__ebp' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__ebp,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:851:47: error: no member named '__esp' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
            (unsigned long) uc->uc_mcontext->__ss.__esp,
                                                  ^~~~~
                                                  __sp
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:139:13: note: '__sp' declared here
            __uint64_t __sp;    /* Stack pointer x31 */
                       ^
    debug.c:852:47: error: no member named '__ss' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
            (unsigned long) uc->uc_mcontext->__ss.__ss,
                                                  ^~~~
                                                  __sp
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:139:13: note: '__sp' declared here
            __uint64_t __sp;    /* Stack pointer x31 */
                       ^
    debug.c:853:47: error: no member named '__eflags' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__eflags,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:854:47: error: no member named '__eip' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__eip,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:855:47: error: no member named '__cs' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__cs,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:856:47: error: no member named '__ds' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__ds,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:857:47: error: no member named '__es' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__es,
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:858:47: error: no member named '__fs' in 'struct __darwin_arm_thread_state64'; did you mean '__fp'?
            (unsigned long) uc->uc_mcontext->__ss.__fs,
                                                  ^~~~
                                                  __fp
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:137:13: note: '__fp' declared here
            __uint64_t __fp;    /* Frame pointer x29 */
                       ^
    debug.c:859:47: error: no member named '__gs' in 'struct __darwin_arm_thread_state64'
            (unsigned long) uc->uc_mcontext->__ss.__gs
                            ~~~~~~~~~~~~~~~~~~~~~ ^
    debug.c:861:51: error: no member named '__esp' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
        logStackContent((void**)uc->uc_mcontext->__ss.__esp);
                                                      ^~~~~
                                                      __sp
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:139:13: note: '__sp' declared here
            __uint64_t __sp;    /* Stack pointer x31 */
                       ^
    18 errors generated.
    make[1]: *** [debug.o] Error 1
    make: *** [install] Error 2
    ********************************************************************************
    creating build/scripts-3.8
    error: can't copy '/private/var/folders/ky/g05mfhfd4cg20s6tz1vzq4c00000gn/T/pip-install-9wzyr8yb/redislite_a8e4cb73fa444ddb8563f8864de2e505/redis.submodule/bin/redis-server': doesn't exist or not a regular file
    ----------------------------------------
@ogabrielsantos
Copy link

Here too, with the same error messages. brand new/clean mac mini m1

@ogabrielsantos
Copy link

ogabrielsantos commented Oct 6, 2021

Looks like updating redis.submodule to unstable redis version and rebuilding the project solve this issue. Need to wait a new stable redis version.

@nialdaly
Copy link

nialdaly commented Jun 14, 2022

This worked for me inside a fresh Python virtual environment with the following configuration:

  • Python 3.8.9
  • pip-22.1.2
  • 2021 M1 Pro, running macOS Monterey 12.4:
arch -x86_64 pip install redislite

@ogabrielsantos
Copy link

@nialdaly you are using Rosetta 2

Run pip install redislite on m1 mac native terminal (not using Rosetta 2). Note that installing with terminal using Rosetta (x86 compatibility mode) succeeds.

@nialdaly
Copy link

That's a good point! @ogabrielsantos This guide provides a good overview for setting up Rosetta 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants