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

Failed to install on macOS #547

Open
phuclv90 opened this issue May 6, 2024 · 8 comments
Open

Failed to install on macOS #547

phuclv90 opened this issue May 6, 2024 · 8 comments

Comments

@phuclv90
Copy link

phuclv90 commented May 6, 2024

I've followed the steps on the main readme file but it always failed at this point

Installed /opt/homebrew/lib/python3.12/site-packages/edlclient-3.62-py3.12.egg
Processing dependencies for edlclient==3.62
Searching for pylzma
Reading https://pypi.org/simple/pylzma/
Downloading https://files.pythonhosted.org/packages/03/d8/10ef072c3cd4301a65a1b762b09eefa02baf8da23b9ea77ebe9546499975/pylzma-0.5.0.tar.gz#sha256=b874172afbf37770e643bf2dc9d9b6b03eb95d8f8162e157145b3fe9e1b68a1c
Best match: pylzma 0.5.0
Processing pylzma-0.5.0.tar.gz
Writing /tmp/easy_install-fmj7cduw/pylzma-0.5.0/setup.cfg
Running pylzma-0.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-fmj7cduw/pylzma-0.5.0/egg-dist-tmp-76y3p9x_
no previously-included directories found matching 'src/sdk.orig'
/opt/homebrew/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/tmp/easy_install-fmj7cduw/pylzma-0.5.0/setup.py:105: UnsupportedPlatformWarning: Multithreading is not supported on the platform "darwin",
please contact mail@joachim-bauch.de for more informations.
  warn("""\
src/pylzma/pylzma.c:296:5: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
    PyEval_InitThreads();
    ^
/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/ceval.h:132:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
1 warning generated.
src/pylzma/pylzma_aes.c:158:5: error: incompatible pointer to integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of type 'void *' [-Wint-conversion]
    NULL,                                /* printfunc  tp_print;   */
    ^~~~
/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
1 error generated.

In fact the first error happened was the below. And I managed to passed that with brew install python-setuptools but in the end the above error occured

src/edl/setup.py", line 2, in <module>
    from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
@mrlambchop
Copy link

Same issue for me. Mac OS Sonoma 14.2 (23C64)

@rstremke
Copy link

rstremke commented May 8, 2024

Same here. Running 14.4 Beta (23E5205c).

@clarkewing
Copy link

Same issue here. maxOS 14.4.1 (23E224)

@fridaynext
Copy link

fridaynext commented May 15, 2024

Stack Overflow to the rescue!

https://stackoverflow.com/questions/78282287/why-am-i-getting-incompatible-pointer-to-integer-conversion-initializing-py-ssi

I had to also uninstall Xcode from my system, since it was already updated to 15.3.

tl;dr:

@phuclv90
Copy link
Author

I don't have Xcode as well as /Library/Devloper/CommandLineTools in my case so it probably uses the default /usr/bin/cc

@randolph-
Copy link

Alternatively, you can try downgrading clang temporarily without having to fuss with Xcode.

$ which clang
/usr/bin/clang

$ clang -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ brew install llvm@14
$ export PATH="/opt/homebrew/opt/llvm@14/bin:$PATH"

$ which clang
/opt/homebrew/opt/llvm@14/bin/clang

$ clang -v
Homebrew clang version 14.0.6
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm@14/bin

Afterwards, the build and install work as expected for me. Following the install, you can run brew uninstall llvm@14 to uninstall, or simply restart your terminal session to restore your PATH while keeping clang-14 available should you need it down the line.

@phuclv90
Copy link
Author

phuclv90 commented Jun 5, 2024

thanks @randolph- I was able to build. But now I'm seeing another issue #556

@rmohns
Copy link

rmohns commented Aug 2, 2024

Alternatively, you can try downgrading clang temporarily without having to fuss with Xcode.
(snip instructions)

Thank you! This is much faster than downgrading all of Xcode! You're a 🌟!

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