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

can't build from source on Arch #2966

Closed agzam closed 3 months ago

agzam commented 3 months ago

For some reason the build fails for me on Arch.

cmake -DCMAKE_BUILD_TYPE=Release .. seems to be working fine. But then, the next step fails. Something to do with gperf and MIME types. If anyone has clues what's missing, please let me know.

cmake -DCMAKE_BUILD_TYPE=Release .. output CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- The CXX compiler identification is GNU 14.1.1 -- The C compiler identification is GNU 14.1.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Could NOT find ccache (this is NOT an error) -- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.3.1") -- Found OpenSSL: /usr/include /usr/lib/libssl.so;/usr/lib/libcrypto.so -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Performing Test HAVE_STD14 -- Performing Test HAVE_STD14 - Success -- Performing Test HAVE_CXX_FLAG_WALL -- Performing Test HAVE_CXX_FLAG_WALL - Success -- Performing Test HAVE_CXX_FLAG_WEXTRA -- Performing Test HAVE_CXX_FLAG_WEXTRA - Success -- Performing Test HAVE_CXX_FLAG_WIMPLICIT_FALLTHROUGH_2 -- Performing Test HAVE_CXX_FLAG_WIMPLICIT_FALLTHROUGH_2 - Success -- Performing Test HAVE_CXX_FLAG_WPOINTER_ARITH -- Performing Test HAVE_CXX_FLAG_WPOINTER_ARITH - Success -- Performing Test HAVE_CXX_FLAG_WCAST_QUAL -- Performing Test HAVE_CXX_FLAG_WCAST_QUAL - Success -- Performing Test HAVE_CXX_FLAG_WSIGN_COMPARE -- Performing Test HAVE_CXX_FLAG_WSIGN_COMPARE - Success -- Performing Test HAVE_CXX_FLAG_WDUPLICATED_BRANCHES -- Performing Test HAVE_CXX_FLAG_WDUPLICATED_BRANCHES - Success -- Performing Test HAVE_CXX_FLAG_WDUPLICATED_COND -- Performing Test HAVE_CXX_FLAG_WDUPLICATED_COND - Success -- Performing Test HAVE_CXX_FLAG_WALLOC_ZERO -- Performing Test HAVE_CXX_FLAG_WALLOC_ZERO - Success -- Performing Test HAVE_CXX_FLAG_WLOGICAL_OP -- Performing Test HAVE_CXX_FLAG_WLOGICAL_OP - Success -- Performing Test HAVE_CXX_FLAG_WTAUTOLOGICAL_COMPARE -- Performing Test HAVE_CXX_FLAG_WTAUTOLOGICAL_COMPARE - Success -- Performing Test HAVE_CXX_FLAG_WVLA -- Performing Test HAVE_CXX_FLAG_WVLA - Success -- Performing Test HAVE_CXX_FLAG_WNON_VIRTUAL_DTOR -- Performing Test HAVE_CXX_FLAG_WNON_VIRTUAL_DTOR - Success -- Performing Test HAVE_CXX_FLAG_WUNUSED_PARAMETER -- Performing Test HAVE_CXX_FLAG_WUNUSED_PARAMETER - Success -- Performing Test HAVE_CXX_FLAG_WCONVERSION -- Performing Test HAVE_CXX_FLAG_WCONVERSION - Success -- Performing Test HAVE_CXX_FLAG_WSIGN_CONVERSION -- Performing Test HAVE_CXX_FLAG_WSIGN_CONVERSION - Success -- Performing Test HAVE_CXX_FLAG_WCXX14_COMPAT_PEDANTIC -- Performing Test HAVE_CXX_FLAG_WCXX14_COMPAT_PEDANTIC - Failed -- Performing Test HAVE_CXX_FLAG_WDEPRECATED -- Performing Test HAVE_CXX_FLAG_WDEPRECATED - Success -- Performing Test HAVE_CXX_FLAG_WUNUSED_COMMAND_LINE_ARGUMENT -- Performing Test HAVE_CXX_FLAG_WUNUSED_COMMAND_LINE_ARGUMENT - Failed -- Performing Test HAVE_CXX_FLAG_QUNUSED_ARGUMENTS -- Performing Test HAVE_CXX_FLAG_QUNUSED_ARGUMENTS - Failed -- Performing Test HAVE_CXX_FLAG_WUNKNOWN_WARNING_OPTION -- Performing Test HAVE_CXX_FLAG_WUNKNOWN_WARNING_OPTION - Failed -- Performing Test HAVE_CXX_FLAG_WODR -- Performing Test HAVE_CXX_FLAG_WODR - Success -- Performing Test HAVE_CXX_FLAG_FLTO_ODR_TYPE_MERGING -- Performing Test HAVE_CXX_FLAG_FLTO_ODR_TYPE_MERGING - Success -- Performing Test HAVE_CXX_FLAG_WPSABI -- Performing Test HAVE_CXX_FLAG_WPSABI - Success -- Performing Test HAVE_CXX_FLAG_WMAYBE_UNINITIALIZED -- Performing Test HAVE_CXX_FLAG_WMAYBE_UNINITIALIZED - Success -- Performing Test HAVE_CXX_FLAG_WREDUNDANT_MOVE -- Performing Test HAVE_CXX_FLAG_WREDUNDANT_MOVE - Success -- Performing Test HAVE_CXX_FLAG_WSTRINGOP_OVERFLOW -- Performing Test HAVE_CXX_FLAG_WSTRINGOP_OVERFLOW - Success -- Git state: 3cd93569871cad8b8f6d0639d462ea2140f99ad8 -- Found ZLIB: /usr/lib/libz.so (found version "1.3.1") -- Found ZLIB: /usr/include /usr/lib/libz.so -- Performing Test ATOMICS_FOUND -- Performing Test ATOMICS_FOUND - Success CMake Deprecation Warning at td/generate/tl-parser/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Performing Test GNU_READLINE_FOUND -- Performing Test GNU_READLINE_FOUND - Success -- Found Readline: /usr/include /usr/lib/libreadline.so -- Performing Test USABLE_READLINE_FOUND -- Performing Test USABLE_READLINE_FOUND - Success -- Configuring done (2.8s) -- Generating done (0.1s) -- Build files have been written to: /home/ag/sandbox/td/build

cmake --build . output:

[  0%] Building CXX object tdutils/generate/CMakeFiles/generate_mime_types_gperf.dir/generate_mime_types_gpe
rf.cpp.o
[  0%] Linking CXX executable generate_mime_types_gperf
[  0%] Built target generate_mime_types_gperf
[  0%] Generating /home/ag/sandbox/td/tdutils/generate/auto/mime_type_to_extension.gperf, /home/ag/sandbox/t
d/tdutils/generate/auto/extension_to_mime_type.gperf
Extension "wmz" matches more than one type
Extension "sub" matches more than one type
Can't open output file "/home/ag/sandbox/td/tdutils/generate/auto/mime_type_to_extension.gperf
make[2]: *** [tdutils/generate/CMakeFiles/tdmime_auto.dir/build.make:83: /home/ag/sandbox/td/tdutils/generat
e/auto/mime_type_to_extension.gperf] Error 1
make[1]: *** [CMakeFiles/Makefile2:788: tdutils/generate/CMakeFiles/tdmime_auto.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
levlam commented 3 months ago

Can't open output file "/home/ag/sandbox/td/tdutils/generate/auto/mime_type_to_extension.gperf

You have issues with access to the specified file. Likely, you cloned the project from root or tried to build it from root first, and now trying to build it in the same directory from an unpriviledged user.

agzam commented 3 months ago

OMG... Of course... Closing it before anyone notices my embarrassment :). Thank you and sorry for the noise.

agzam commented 3 months ago

Hmm... I still can't figure it out. When I build it with sudo, it builds, but then telega.el (the reason why I need to td) fails to work. Something must have changed, because I never had this problems before.

levlam commented 3 months ago

There were no changes with TDLib installation. Check that you use compatible TDLib and telega.el versions, and that you provided telega.el with the correct path to TDLib.