tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Alpine 3.18 compile #2587

Closed Hentai closed 1 year ago

Hentai commented 1 year ago

Trying to compile tdlib on alpine-3.18.3

[ 32%] Building CXX object CMakeFiles/tdcore.dir/td/telegram/Application.cpp.o
[ 32%] Building CXX object CMakeFiles/tdcore.dir/td/telegram/AttachMenuManager.cpp.o
In file included from /root/td/td/telegram/MessagesManager.h:20,
                 from /root/td/td/telegram/AttachMenuManager.cpp:20:
/root/td/td/telegram/DialogListId.h: In constructor 'constexpr td::DialogListId::DialogListId(td::int64)':
/root/td/td/telegram/DialogListId.h:31:5: error: neither branch of 'if' is a constant expression
   31 |     if (is_folder() && get_folder_id() != FolderId::archive()) {
      |     ^~
make[2]: *** [CMakeFiles/tdcore.dir/build.make:384: CMakeFiles/tdcore.dir/td/telegram/AttachMenuManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:463: CMakeFiles/tdcore.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Also tried (same issue)

levlam commented 1 year ago

Thank you. I have pushed a fix.