Closed lminer closed 2 years ago
There's currently no support for M1 builds on GitHub Actions. If that changes, I'll update the build to use it. Poke me here if you notice support has been added or there's another way to create the builds. You should be able to build them locally pretty easily, which is beside the point of this project, but I don't see another option at the moment.
Why don't you also publish sdist releases?
Because the setup.py isn't able to build the lame library.
Can't I link against my OS'es libraries?
LAME is not distributed with macOS
It is available through homebrew (or your Linux package manager).
If you'd like to build it yourself it's very easy to just clone the repo and build the cmake.
Forgive my ignorance, but I've successfully cloned and built this, and now I'm trying to install using "python3 setup.py install ". However, I need to provide "--libdir=" and a "--incdir=". What is it exactly I should input here?
Once built you install the wheel by using python3 -m pip install *.whl
I get this error: "ERROR: lameenc-1.4.0-cp38-cp38-macosx_10_14_6_arm64.whl is not a supported wheel on this platform."
Do I need to provide some arguments to cmake to build for a Mac M1 running macOS 12?
Sounds like you didn't build it for your Python version. I don't have an M1 mac, so I can't debug it unfortunately. It sounds like you've got two versions of Python installed, one through Rosetta2 and another that isn't and the build is using one and your install is using the other.
That makes sense. I've got both the default Pyhton2.7 installation and 3.8.9. Thanks!
*Edit: Just in case other rookies using a M1 Mac are having the same issues as me: I think the issue was that Python 3.8.9 didn't support build for the M1 architecture. This was however added in 3.8.10. Updating to the latest 3.8 release, 3.8.12 fixed it for me.
So, seems like I wasn't really finished after all. The build is successful, but when trying to import it in a .py file containing only the line import lameenc
I get this error:
Traceback (most recent call last): File "/Users/USERNAME/lameenc/lameenctest.py", line 1, in <module> import lameenc ImportError: dlopen(/Users/USERNAME/.pyenv/versions/3.9.10/lib/python3.9/site-packages/lameenc.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_lame_close'
(I'm using Python 3.9.10 here, but this happens with 3.8.12 and 3.10.2 as well)
Sounds like you're dynamically linking to liblame rather than statically. Did libmp3lame.a build?
Managed to figure out how to cross-compile this evening, so builds are currently uploading to PyPi for Apple Silicon for Python 3.7-3.10 under the tag 1.4.1.
Are there any plans to release apple silicon builds to pypi? Would be nice to be able to pip install this!