telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

Build failure during installation

Open mouse-alpha opened this issue 3 years ago • 1 comments

 $ 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
 

mouse-alpha avatar Sep 30 '22 06:09 mouse-alpha

You forget to init submodules after cloning the repository. You can use build instructions from https://tdlib.github.io/telegram-bot-api/build.html.

levlam avatar Sep 30 '22 12:09 levlam

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 avatar Nov 04 '22 15:11 markokhman

@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.

levlam avatar Nov 04 '22 20:11 levlam

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 avatar Feb 15 '23 12:02 Fedya-Mercuriev

@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?

levlam avatar Feb 15 '23 12:02 levlam

@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//Documents/Coding :: Stuff//telegram-bot-api. Maybe it has something to do with the "Coding :: Stuff".

Fedya-Mercuriev avatar Feb 15 '23 12:02 Fedya-Mercuriev

@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 :)

Fedya-Mercuriev avatar Feb 15 '23 12:02 Fedya-Mercuriev