Build failure during installation
$ cmake --build . --target install
....
[ 87%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/utf8.cpp.o
[ 88%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/MimeType.cpp.o
[ 90%] Linking CXX static library libtdutils.a
[ 90%] Built target tdutils
Scanning dependencies of target telegram-bot-api
[ 91%] Building CXX object CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o
In file included from /home/user/workspace/tutorial/telegram/telegram-bot-api/telegram-bot-api/Query.h:9,
from /home/user/workspace/tutorial/telegram/telegram-bot-api/telegram-bot-api/Client.h:9,
from /home/user/workspace/tutorial/telegram/telegram-bot-api/telegram-bot-api/ClientManager.h:9,
from /home/user/workspace/tutorial/telegram/telegram-bot-api/telegram-bot-api/telegram-bot-api.cpp:7:
/home/user/workspace/tutorial/telegram/telegram-bot-api/telegram-bot-api/ClientParameters.h:9:10: fatal error: td/db/KeyValueSyncInterface.h: No such file or directory
9 | #include "td/db/KeyValueSyncInterface.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/telegram-bot-api.dir/build.make:63: CMakeFiles/telegram-bot-api.dir/telegram-bot-api/telegram-bot-api.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:209: CMakeFiles/telegram-bot-api.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
You forget to init submodules after cloning the repository. You can use build instructions from https://tdlib.github.io/telegram-bot-api/build.html.
Same issue happened to me once I was running commands (https://tdlib.github.io/telegram-bot-api/build.html?os=macOS) that were meant for Apple silicon processor while my machine is Intel
@markokhman There are radio buttons to swtich between Apple Silicon and Intel in the build instructions for macOS. Anyway, this would produce a compltetely different error message, so isn't related to the issue.
Actually have quite the same issue. Trying to install it on my local machine (running on macOS) to test it first. Can't pass through the "cmake --build . --target install" step.
Receive the same mistake all the time:
td/sqlite/CMakeFiles/tdsqlite.dir/build.make:73: *** target pattern contains no `%'. Stop. make[1]: *** [td/sqlite/CMakeFiles/tdsqlite.dir/all] Error 2 make: *** [all] Error 2
Did anyone experience anything similar? Running on macOS Big Sur 11.5.2.
@Fedya-Mercuriev You have an unrelated issue. What's full path to the folder where you cloned the repository? Does it contain some special characters like spaces or punctuation characters?
@Fedya-Mercuriev You have an unrelated issue. What's full path to the folder where you cloned the repository? Does it contain some special characters like spaces or punctuation characters?
Cloned it to the project root folder. Here's the full path: /Users/
@Fedya-Mercuriev You have an unrelated issue. What's full path to the folder where you cloned the repository? Does it contain some special characters like spaces or punctuation characters?
Just renamed the folder and the issue is gone. Silly me. Thank you for asking the right question. I couldn't even think of the folder name being the issue :)