Comments (14)
I can try to do anything, but I don't have any windows computers. Libexec is used only for backtrace, so it can be removed in cygwin version.
from tg.
Let¨s try something, abusing my non-existent habilities:
- dos2unix -f configure
- I've get rid of backtrace related code from main.c.
- This error was given:
$ LC_ALL=C make
gcc -g -O2 -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c main.c -o main.o
In file included from main.c:48:0:
interface.h:42:6: error: conflicting types for 'iprintf'
void iprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
^
In file included from /usr/include/stdio.h:29:0,
from main.c:24:
/usr/include/stdio.h:253:5: note: previous declaration of 'iprintf' was here
int _EXFUN(iprintf, (const char *, ...)
^
Makefile:30: recipe for target 'main.o' failed
make: *** [main.o] Error 1
Solved by:
$ sed -i 's/iprintf/my_iprintf/g' *.c *.h
- Now if fails with:
$ LC_ALL=C make
gcc -g -O2 -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c net.c -o net.o
net.c: In function 'create_connection':
net.c:272:34: error: 'POLLRDHUP' undeclared (first use in this function)
s.events = POLLOUT | POLLERR | POLLRDHUP | POLLHUP;
^
net.c:272:34: note: each undeclared identifier is reported only once for each function it appears in
net.c: In function 'connections_make_poll_array':
net.c:556:43: error: 'POLLRDHUP' undeclared (first use in this function)
fds[0].events = POLLERR | POLLHUP | POLLRDHUP | POLLIN;
^
net.c: In function 'connections_poll_result':
net.c:580:47: error: 'POLLRDHUP' undeclared (first use in this function)
if (fds[i].revents & (POLLHUP | POLLERR | POLLRDHUP)) {
^
Makefile:30: recipe for target 'net.o' failed
make: *** [net.o] Error 1
from tg.
Maybe I fixed this. Try again?
from tg.
Same error after commit e12d05b
Have the changes been committed? Since my first try just one commit reached the tree (the last one, regarding to a typo in readme).
from tg.
My bad, did not push them to github. No should be ok.
from tg.
$ LC_ALL=C make
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c main.c -o main.o~~~
main.c:420:2: error: #else without #if
#else
^
main.c:424:2: error: #endif without #if
#endif
^
Makefile:30: recipe for target 'main.o' failed
make: *** [main.o] Error 1
```
$ LC_ALL=C make
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c main.c -o main.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c loop.c -o loop.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c interface.c -o interface.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c net.c -o net.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c mtproto-common.c -o mtproto-common.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c mtproto-client.c -o mtproto-client.o
mtproto-client.c: In function 'rpc_execute':
mtproto-client.c:1715:35: error: 'TCP_QUICKACK' undeclared (first use in this function)
setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4);
^
mtproto-client.c:1715:35: note: each undeclared identifier is reported only once for each function it appears in
mtproto-client.c: In function 'tc_becomes_ready':
mtproto-client.c:1773:35: error: 'TCP_QUICKACK' undeclared (first use in this function)
setsockopt (c->fd, IPPROTO_TCP, TCP_QUICKACK, (int[]){0}, 4);
^
Makefile:30: recipe for target 'mtproto-client.o' failed
make: *** [mtproto-client.o] Error 1
```
from tg.
Added the following lines at mtproto-client.c
#ifndef TCP_QUICKACK
#define TCP_QUICKACK 0
#endif
and
$ LC_ALL=C make
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c mtproto-client.c -o mtproto-client.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c queries.c -o queries.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c structures.c -o structures.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c binlog.c -o binlog.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c tools.c -o tools.o
gcc -g -O2 -DNO_BACKTRACE -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -I. -I. -c lua-tg.c -o lua-tg.o
gcc main.o loop.o interface.o net.o mtproto-common.o mtproto-client.o queries.o structures.o binlog.o tools.o lua-tg.o -lm -lcrypto -lz -lssl -rdynamic -ggdb -lreadline -lrt -o telegram
from tg.
Builds fine, but:
$ ./telegram.exe -k tg.pub
Telegram-client version 0.01-beta, Copyright (C) 2013 Vitaly Valtman
Telegram-client comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show_license' for details.
[/home/USER/.telegram] created
libconfig not enabled
*** Connect with 173.240.5.1:443 timeout
*** Can not create connection to DC. Is network down?
We are behind a proxy here, I have $http_proxy and $https_proxy defined (w3m, wget, etc. work fine).
from tg.
quickack fixed.
I do not understand problems in main. Something strange. Maybe it merged bad with your backtrace fix?
At this moment client does not support http proxy, because it doesn't use http protocol. It's support is planned (it is not too hard after all) but I am not sure, when I can do it.
from tg.
Please, ignore the #else without #if error (maybe I've updated the repository too quick?).
Steps to reproduce it:
1.- dos2unix -f configure.
2.- ./configure --disable-libconfig --disable-liblua
3.- Remove #include <execinfo.h> at main.c
4.- Add the following lines at mtproto-client.c
#ifndef TCP_QUICKACK
#define TCP_QUICKACK 0
#endif
5.- Builds fine.
6.- No net connectivity due to proxy.
from tg.
#include <execinfo.h> fixed.
from tg.
Ok. So the "out-of-the-box" compilation works!
Thank you very much!
Case closed ;)
from tg.
@ashtophet Could you please outline the steps required for the compilation on windows. I am a newbie on windows compiling and don't know exactly where to start. Thanks!
from tg.
Hi,
Unfortunately I didn't writte down the appropriate steps and I don't have
access to a win machine right now. As I recall it:
- Install cygwin.
- Rerun cygwin setup.exe to install git and the cygwin build tools (
http://x.cygwin.com/docs/cg/prog-build-prerequisites.html ). - Run ./configure --disable-libconfig and see which library is missing.
Search for it and install it on cygwin (there shouldn't be many).
Hope that helps in any way.
Cheers
Em terça-feira, 19 de maio de 2015, them3gabyte [email protected]
escreveu:
@ashtophet https://github.com/ashtophet Could you please outline the
steps required for the compilation on windows. I am a newbie on windows
compiling and don't know exactly where to start. Thanks!—
Reply to this email directly or view it on GitHub
#45 (comment).
from tg.
Related Issues (20)
- Jasim74927492@gmail
- Juthi
- 2527
- اياتي HOT 2
- raspbian make
- termination_signal_handler in make HOT 2
- g
- Z
- "Make" fails on Ubuntu 20.04 HOT 3
- _Originally posted by @dhmii50 in https://github.com/vysheng/tg/issues/1787_
- Outdated api HOT 3
- https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=18fbca16-2224-45f6-85b0-f7bf2b39b3f3&scope=openid%20profile%20email%20offline_access&redirect_uri=https%3A%2F%2Flearn.microsoft.com%2F_themes%2Fdocs.theme%2Fmaster%2Fen-us%2F_themes%2Fglobal%2Fidentity-redirect.html&client-request-id=4ef28716-2289-4678-b97c-5341608f9a67&response_mode=fragment&response_type=code&x-client-SKU=msal.js.browser&x-client-VER=2.32.2&client_info=1&code_challenge=w9C_Mt8dXNYgvyrOigoR3xqe61-maIvYvayx7QA--6U&code_challenge_method=S256&prompt=select_account&nonce=f43388c9-9be2-48a9-9718-8e7cdabaae2f&state=eyJpZCI6ImM5ZGI0MzRmLTIyNTYtNDY5OC04OWI0LTE0ZGRkMDgyZTM0MyIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicmVkaXJlY3QifX0%3D%7Chttps%253A%252F%252Flearn.microsoft.com%252Fru-ru%252Ftraining%252Fbrowse%252F%253Fsource%253Dlearn
- I encountered several problems when using telegram-cli for the first time HOT 3
- tg won't compile on Raspberry Pi HOT 2
- make fails on Fedora
- 6840717977:AAFOztLPRLc3I1USwaMmqZ7Juvmjn7vRNQ0 HOT 1
- ban whatsapp
- Where are we with the TrustWallet support for Tron using in the browser extension?
- make tg on debian HOT 8
- *** 1706666423.275465 Notification API_64BIT_LOGIN_APP_OUTDATED_23: You are using an outdated app that is no longer supported. To access your messages, please update your app to the latest version.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tg.