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

Prebuilt binaries #326

Closed
KartikSoneji opened this issue Oct 25, 2022 · 5 comments
Closed

Prebuilt binaries #326

KartikSoneji opened this issue Oct 25, 2022 · 5 comments

Comments

@KartikSoneji
Copy link

Are prebuilt binaries for the common platforms (Windows/Mac/Linux) available anywhere?
If not, would a PR adding GitHub action workflows for automatically building them on each commit be welcome?

@levlam
Copy link
Contributor

levlam commented Oct 25, 2022

There are no prebuilt binaries even for common platforms.

Instead you can find ready-to-use third-party Docker images in the issue #7.

Otherwise, you would need to distribute all dependent shared libraries along with the binaries on Windows and macOS, and statically link OpenSSL, zlib, a standard С++ library, and libc (hence, glibc can't be used) on Linux. The latter approach is greately discouraged by most Linux distributions.

@KartikSoneji
Copy link
Author

KartikSoneji commented Oct 26, 2022

Hi, thanks for the quick reply.

Otherwise, you would need to distribute all dependent shared libraries along with the binaries on Windows and macOS, and statically link OpenSSL, zlib, a standard С++ library, and libc

Is that so bad?
The alternative is users would have to download and install those dependencies anyway.

(hence, glibc can't be used)

Sorry if I am missing something, but I see no reason why not?

Boost Software License
This is a lax, permissive non-copyleft free software license, compatible with the GNU GPL.

(source)
The project is licenced under the Boost Software License, which is compatible with GPL:

The latter approach is greately discouraged by most Linux distributions.

For the linux version, we can list the prerequisties for the binary like any other linux package and link them dynamically.

This would avoid having to compile the server from source which takes some time, and requires a fair bit of experience.

@levlam
Copy link
Contributor

levlam commented Oct 26, 2022

Sorry if I am missing something, but I see no reason why not?

Because glibc doesn't actually support static linking. You can only build dynamically against specific glibc version and the binary will work only on systems with compatible (usually, newer) glibc.

For the linux version, we can list the prerequisties for the binary like any other linux package and link them dynamically.

You will not be able to use distribution-provided dependencies, because they are different in different distributions.

This would avoid having to compile the server from source which takes some time, and requires a fair bit of experience.

I doubt that you need an experience to copy-paste build instructions from https://tdlib.github.io/telegram-bot-api/build.html.

@KartikSoneji
Copy link
Author

Because glibc doesn't actually support static linking. You can only build dynamically against specific glibc version and the binary will work only on systems with compatible (usually, newer) glibc.

Interesting, I'll read up on this.

You will not be able to use distribution-provided dependencies, because they are different in different distributions.

I think just ubuntu/debian would still be better than nothing.

I doubt that you need an experience to copy-paste build instructions from https://tdlib.github.io/telegram-bot-api/build.html

Of course, but that is only if nothing goes wrong :)
The whole reason I ask is because it took me some quite time to get it compiling.

@levlam
Copy link
Contributor

levlam commented Oct 26, 2022

I think just ubuntu/debian would still be better than nothing.

They are incompatible in different Ubuntu and Debian versions. You can't run software built for specififc Ubuntu version on any other Ubuntu version, even newer one, if it links dependencies dynamically.

Of course, but that is only if nothing goes wrong :)

Only Windows or non-covered Linux distributions are slightly hard to build, because you need to install some software manually. There should be no issues for all other operating systems.

@levlam levlam closed this as completed Feb 15, 2023
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

No branches or pull requests

2 participants