tdlib.native
tdlib.native copied to clipboard
provide M1 binary
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gperf cmake openssl
git clone https://github.com/tdlib/td.git
cd td
rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl/ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
cmake --build . --target install
cd ..
cd ..
ls -l /usr/local
If anyone here is aware of any public CI server supporting M1 Mac (or how to cross-compile the binaries onto M1 Mac from a "normal" one), I'd be happy to integrate that into our builds.
https://circleci.com/ seems to support M1 but registration didn't work for me
Here is an example of macOS cross-compilation Intel+M1 with GitHub Actions: https://github.com/up9cloud/ios-libtdjson
If anyone need just libtdjson.dylib
working for M1, go to Releases, download libtdjson.xcframework.tar.gz
, and use file from folder macos-arm64_x86_64
Finally, the runners are available on GitHub: https://github.com/actions/runner-images/issues/8439
Perhaps we can do something about this.
Finally, the runners are available on GitHub: actions/runner-images#8439
Perhaps we can do something about this.
What you have linked to is the beta version of the large runners. All large runners require payment and information on an upcoming free to use apple silicon runner has not yet been released.
Ugh.
Just to note, that I have prebuilt TDLib here, prebuilt-tdlib.yml, that crosscompiles the binary to M1 on a x86_64 runner (other differences from tdlib.native are: the dependencies except libc are linked statically, so the resulting library doesn't depend on random shared libraries available in the CI environment, and the Linux library is built on older system in docker to run with old versions of glibc), it is distributed on npm. On macOS, it isn't too difficult to cross-compile from x86_64 to arm64 or vice versa.
While the main concern here is compilation, there's also a secondary concern of testing. And it's impossible to test M1 binaries without M1 agent.
While the main concern here is compilation, there's also a secondary concern of testing. And it's impossible to test M1 binaries without M1 agent.
I'm facing an urgent issue as well.
Could I give you remote access to my M1 Mac mini?
Would that solve the problem?
I have M2 hardware myself. That doesn't solve any problems. If you want to help, please open a PR that builds the needed binaries.
While the main concern here is compilation, there's also a secondary concern of testing. And it's impossible to test M1 binaries without M1 agent.
@ForNeVeR You can try FlyCI's M1 and M2 runners. They are on average 2x faster and 2x cheaper than GitHub's AND we have a free tier for OSS projects (see below).
Install Instructions
- Install FlyCI app and
- Easily replace one line of code and start using FlyCI runners:
jobs:
ci:
- runs-on: macos-latest
+ runs-on: flyci-macos-large-latest-m1
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4
500 mins/month Free for Public Repos
Since your repo is public, FlyCI offers 500 mins/month of free M1 runner usage with the flyci-macos-large-latest-m1
runner for public projects.
Don't hesitate to contact us in case the free tier doesn't suit your needs or you experience any issues with the runners. Our team is here to support you!
Best Regards, Veselina Radeva Product Manager at FlyCI