Open infoparticle opened 3 years ago
I am having the same issue compiling on Arch Linux.
this seems to be a problem with the makefile / linking process. I'm having the same issue on Fedora 33.
Has this project been abandoned???
I did as it is written in this article https://github.com/vysheng/tg/blob/master/README-Cygwin.md Have error «dereferencing pointer to incomplete type ‘RSA {aka struct rsa_st}’» next I apply this path https://github.com/vysheng/tgl/issues/129 have error «multiple definition»:
gcc objs/main.o objs/loop.o objs/interface.o objs/lua-tg.o objs/json-tg.o objs/python-tg.o objs/python-types.o libs/libtgl.a -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -rdynamic -ggdb -levent -ljansson -lconfig -lz -levent -lreadline -llua5.3 -lssl -lcrypto -ldl -lpthread -lutil -o bin/telegram-cli /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/loop.o:/home/79031/tg/loop.c:77: multiple definition of “verbosity”; objs/main.o:/home/79031/tg/main.c:93: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/loop.o:/home/79031/tg/loop.c:392: multiple definition of “wait_dialog_list”; objs/main.o:/home/79031/tg/main.c:510: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/loop.o:/home/79031/tg/loop.c:90: multiple definition of “register_mode”; objs/main.o:/home/79031/tg/main.c:508: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/interface.o:/home/79031/tg/interface.c:121: multiple definition of “msg_num_mode”; objs/main.o:/home/79031/tg/main.c:94: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/interface.o:/home/79031/tg/interface.c:133: multiple definition of “readline_active”; objs/loop.o:/home/79031/tg/loop.c:390: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/interface.o:/home/79031/tg/interface.c:124: multiple definition of “disable_colors”; objs/main.o:/home/79031/tg/main.c:110: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/interface.o:/home/79031/tg/interface.c:123: multiple definition of “permanent_peer_id_mode”; objs/main.o:/home/79031/tg/main.c:123: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/interface.o:/home/79031/tg/interface.c:120: multiple definition of “disable_auto_accept”; objs/main.o:/home/79031/tg/main.c:509: first defined here /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: objs/interface.o:/home/79031/tg/interface.c:122: multiple definition of “permanent_msg_id_mode”; objs/main.o:/home/79031/tg/main.c:122: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:51: bin/telegram-cli] Error 1
same issue here on Raspberry Pi 3 B+: Linux version 5.10.63-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) ..1488 SMP Thu Nov 18 16:14:44 GMT 2021
in former time, approx. 4 years ago it works on the same machine, but older os, like described in README
@infoparticle I found this on https://aur.archlinux.org/packages/telegram-cli-git/?O=0&PP=10 "I got it working by replacing ./configure with ./configure CFLAGS="-w". Might not be the best solution, since this will ignore all compiler warnings"
@infoparticle I found this on https://aur.archlinux.org/packages/telegram-cli-git/?O=0&PP=10 "I got it working by replacing ./configure with ./configure CFLAGS="-w". Might not be the best solution, since this will ignore all compiler warnings"
i still get this error
gcc objs/main.o objs/loop.o objs/interface.o objs/lua-tg.o objs/json-tg.o objs/python-tg.o objs/python-types.o libs/libtgl.a -L/usr/local/lib -L/usr/lib -L/usr/lib -rdynamic -ggdb -levent -ljansson -lconfig -lz -levent -lreadline -llua5.2 -lm -ldl -lssl -lcrypto -ldl -lpthread -lutil -o bin/telegram-cli
/usr/bin/ld: objs/loop.o:/home/self/tg/loop.c:77: multiple definition of verbosity'; objs/main.o:/home/self/tg/main.c:93: first defined here /usr/bin/ld: objs/loop.o:/home/self/tg/loop.c:90: multiple definition of
register_mode'; objs/main.o:/home/self/tg/main.c:508: first defined here
/usr/bin/ld: objs/loop.o:/home/self/tg/loop.c:392: multiple definition of wait_dialog_list'; objs/main.o:/home/self/tg/main.c:510: first defined here /usr/bin/ld: objs/interface.o:/home/self/tg/interface.c:120: multiple definition of
disable_auto_accept'; objs/main.o:/home/self/tg/main.c:509: first defined here
/usr/bin/ld: objs/interface.o:/home/self/tg/interface.c:121: multiple definition of msg_num_mode'; objs/main.o:/home/self/tg/main.c:94: first defined here /usr/bin/ld: objs/interface.o:/home/self/tg/interface.c:122: multiple definition of
permanent_msg_id_mode'; objs/main.o:/home/self/tg/main.c:122: first defined here
/usr/bin/ld: objs/interface.o:/home/self/tg/interface.c:123: multiple definition of permanent_peer_id_mode'; objs/main.o:/home/self/tg/main.c:123: first defined here /usr/bin/ld: objs/interface.o:/home/self/tg/interface.c:124: multiple definition of
disable_colors'; objs/main.o:/home/self/tg/main.c:110: first defined here
/usr/bin/ld: objs/interface.o:/home/self/tg/interface.c:133: multiple definition of `readline_active'; objs/loop.o:/home/self/tg/loop.c:390: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:51: bin/telegram-cli] Error 1
can u help? ty
up
I tried compiling tg in fedora 33 but it fails.