You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--
"C++ seems like a language suitable for firing other people's legs."
*****************************
* C++20 : Bug to the future *
*****************************
--
"C++ seems like a language suitable for firing other people's legs."
*****************************
* C++20 : Bug to the future *
*****************************
Well I'm looking into this a little bit and apparently epoll is not available for FreeBSD and apparently not in its Linux emulation layer either (I only saw a brief reference to this so I'm not sure), but BSD systems have their own function, kqueue, which appears to do what epoll does. MTProxy can support multiple platforms. Obviously BSD is a worthwhile target, so you might want to add the ability to compile with kqueue on BSD systems, or search for an alternative method to get it to work.
(and there is not only *BSD and Linux *nix-like OS on market presents -
also /dev/poll OS, poll etc.... libevent also inventer already ;-))
06.09.2018 19:25, marmulak пишет:
--
"C++ seems like a language suitable for firing other people's legs."
*****************************
* C++20 : Bug to the future *
*****************************
So perhaps libevent can provide the necessary abstraction to make the software cross-platform? True there are many OS's out there. I'm particularly interested in BSD as I have a BSD server I would like to run this on, and actually it doesn't seem like a totally unreasonable expectation. A great many servers run BSD, and perhaps even Windows support can be added as well.
@marmulak I just wanted to show you the reason why it doesn't work on BSDs now, not the reason it can't work there.
Nobody is going to rewrite all of this with libev/kqueue -- just use alternative implementations.
Guys, I built in FreeBSD 12 with gmake , got the same issue.
teleMTP /root/MTProxy >gmake
cc -O3 -std=gnu11 -Wall -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-ove
rflow -fwrapv -DAES=1 -DCOMMIT=\"2c942119c4ee340c80922ba11d14fb3b10d5e654\" -D_GNU_SOURCE=1 -D_FILE_OFFS
ET_BITS=64 -iquote common -iquote . -c -MP -MD -MF dep/mtproto/mtproto-proxy.d -MQ objs/mtproto/mtproto-
proxy.o -o objs/mtproto/mtproto-proxy.o mtproto/mtproto-proxy.c
cc: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
In file included from mtproto/mtproto-proxy.c:53:
In file included from ./net/net-tcp-connections.h:28:
In file included from ./net/net-connections.h:34:
./jobs/jobs.h:234:23: error: field has incomplete type 'struct drand48_data'
struct drand48_data rand_data;
^
./jobs/jobs.h:234:10: note: forward declaration of 'struct drand48_data'
struct drand48_data rand_data;
^
mtproto/mtproto-proxy.c:2007:9: warning: implicit declaration of function 'kill' is invalid in C99
[-Wimplicit-function-declaration]
kill (pids[i], SIGKILL);
^
mtproto/mtproto-proxy.c:2007:24: error: use of undeclared identifier 'SIGKILL'
kill (pids[i], SIGKILL);
^
mtproto/mtproto-proxy.c:2019:7: warning: implicit declaration of function 'kill' is invalid in C99
[-Wimplicit-function-declaration]
kill (pids[i], signal);
^
mtproto/mtproto-proxy.c:2038:26: error: use of undeclared identifier 'SIGTERM'
kill_children (SIGTERM);
Activity
sburn commentedon Jun 11, 2018
Guys, add BSD support, please!
yvoinov commentedon Jun 11, 2018
marmulak commentedon Sep 6, 2018
There's no good reason why a program like this shouldn't compile and run on any *nix type system. Its only dependencies are openssl and zlib ...
yvoinov commentedon Sep 6, 2018
stek29 commentedon Sep 6, 2018
@marmulak is using epoll a good reason?
marmulak commentedon Sep 6, 2018
Well I'm looking into this a little bit and apparently epoll is not available for FreeBSD and apparently not in its Linux emulation layer either (I only saw a brief reference to this so I'm not sure), but BSD systems have their own function, kqueue, which appears to do what epoll does. MTProxy can support multiple platforms. Obviously BSD is a worthwhile target, so you might want to add the ability to compile with kqueue on BSD systems, or search for an alternative method to get it to work.
http://people.eecs.berkeley.edu/~sangjin/2012/12/21/epoll-vs-kqueue.html
^ According to this guy, kqueue is better anyway. :)
Apparently there's more than one article about why epoll sucks: https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12/
yvoinov commentedon Sep 6, 2018
marmulak commentedon Sep 6, 2018
So perhaps libevent can provide the necessary abstraction to make the software cross-platform? True there are many OS's out there. I'm particularly interested in BSD as I have a BSD server I would like to run this on, and actually it doesn't seem like a totally unreasonable expectation. A great many servers run BSD, and perhaps even Windows support can be added as well.
stek29 commentedon Sep 6, 2018
@marmulak I just wanted to show you the reason why it doesn't work on BSDs now, not the reason it can't work there.
Nobody is going to rewrite all of this with libev/kqueue -- just use alternative implementations.
bao3 commentedon Mar 17, 2019
Guys, I built in FreeBSD 12 with gmake , got the same issue.