Closed jhonnybonny closed 1 month ago
Hi, same error here while trying to compile on FreeBSD 14. After following the exact installation instructions, I get the following errors:
engine.c: In function 'gsrn_listen':
engine.c:179:34: error: 'GS_FL_PROTO_BUDDY_CHECK' undeclared (first use in this function); did you mean 'GS_FL_PROTO_SERVER_CHECK'?
179 | if (msg->flags & GS_FL_PROTO_BUDDY_CHECK) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| GS_FL_PROTO_SERVER_CHECK
engine.c:179:34: note: each undeclared identifier is reported only once for each function it appears in
In file included from engine.c:24:
engine.c:180:50: error: 'GS_STATUS_CODE_BUDDY_NOK' undeclared (first use in this function); did you mean 'GS_STATUS_CODE_SERVER_OK'?
180 | GSRN_send_status_warn(p, GS_STATUS_CODE_BUDDY_NOK, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~
protocol.h:11:86: note: in definition of macro 'GSRN_send_status_warn'
11 | #define GSRN_send_status_warn(p, c, m) GSRN_send_status(p, GS_STATUS_TYPE_WARN, c, m);
| ^
engine.c:182:42: error: 'GS_FL_PROTO_CONN_CLOSE' undeclared (first use in this function)
182 | if (msg->flags & GS_FL_PROTO_CONN_CLOSE)
| ^~~~~~~~~~~~~~~~~~~~~~
engine.c: In function 'cb_gsrn_connect':
engine.c:340:25: error: 'GS_FL_PROTO_BUDDY_CHECK' undeclared (first use in this function); did you mean 'GS_FL_PROTO_SERVER_CHECK'?
340 | if (msg.flags & GS_FL_PROTO_BUDDY_CHECK)
| ^~~~~~~~~~~~~~~~~~~~~~~
| GS_FL_PROTO_SERVER_CHECK
*** Error code 1
@jhonnybonny @rm1984 don't know if it's still actual, but.
Relay is compiled with the gsocket itself and relies on the definition of gsocket.h.
The problem that with commit 679dd248685577a3bd0463e58f050e9fcd56f94a
at gsocket-realy
were used defines from beta
branch on gscoket, which missing on master.
So, to build relay, you need to build it against beta
branch. Not sure about backward compatibility with master gsocket release, but at least it's builds.
$ sudo apt install make automake autoconf gcc libevent-dev libssl-dev
$ git clone --depth 1 https://github.com/hackerschoice/gsocket-relay.git
$ cd gsocket-relay
$ git clone -b beta --depth 1 https://github.com/hackerschoice/gsocket
$ (cd gsocket; ./bootstrap && ./configure && make)
$ ./bootstrap && ./configure && make
And now it's built. The only change is a -b beta
.
I'm not sure whether such behavior should be in master or not since those definitions might include some functions related to it, but it's a good first issue to contribute to gsocket.
Thanks