Skip to content

Make MTProxy compatible with non-glibc systems#443

Open
marshall-lee wants to merge 3 commits intoTelegramMessenger:masterfrom
marshall-lee:use-posix-wip
Open

Make MTProxy compatible with non-glibc systems#443
marshall-lee wants to merge 3 commits intoTelegramMessenger:masterfrom
marshall-lee:use-posix-wip

Conversation

@marshall-lee
Copy link

MTProxy relies on some specific glibc features that not every libc supports. So if one wants to compile it on Alpine Linux some tweaks are required. I successfully compiled MTProxy with musl libc by doing the following:

  • backtrace function is non-standard. Use libexecinfo port if it's available in the system.
  • Change lrand48_r, mrand48_r, drand48_r, rand48_r to their standard counterparts.
  • Add -fcommon option to fix the build on the latest GCC versions.

In the version 10 of GCC they changed the default from `-fcommon` to
`-fno-common`. The MTProxy object files share some global vars defined in
`common/*.c` so it's required to provide the option to the compiler.

https://www.gnu.org/software/gcc/gcc-10/changes.html
It makes it possible to compile MTProxy on Alpine Linux.
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 this pull request may close these issues.

2 participants