New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error on FreeBSD #61
Comments
2. use of undeclared identifier 'IPPROTO_TCP'This is simple issue. Build log[ 58%] Built target cJSON
[ 59%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_network.c.o
fluent-bit/src/flb_network.c:123:30: error: use of undeclared identifier 'IPPROTO_TCP'
ret = setsockopt(sockfd, SOL_TCP, TCP_NODELAY, &on, sizeof(on));
^
fluent-bit/src/flb_network.c:40:17: note: expanded from macro 'SOL_TCP'
#define SOL_TCP IPPROTO_TCP
^
fluent-bit/src/flb_network.c:151:31: error: use of undeclared identifier 'IPPROTO_TCP'
return setsockopt(sockfd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen));
^
fluent-bit/src/flb_network.c:40:17: note: expanded from macro 'SOL_TCP'
#define SOL_TCP IPPROTO_TCP
^
fluent-bit/src/flb_network.c:341:63: error: incomplete definition of type 'struct sockaddr_in'
if ((inet_ntop(AF_INET, &((struct sockaddr_in *)&addr)->sin_addr,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
fluent-bit/src/flb_network.c:341:43: note: forward declaration of 'struct sockaddr_in'
if ((inet_ntop(AF_INET, &((struct sockaddr_in *)&addr)->sin_addr,
^
fluent-bit/src/flb_network.c:349:65: error: incomplete definition of type 'struct sockaddr_in6'
if ((inet_ntop(AF_INET6, &((struct sockaddr_in6 *)&addr)->sin6_addr,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
fluent-bit/src/flb_network.c:349:44: note: forward declaration of 'struct sockaddr_in6'
if ((inet_ntop(AF_INET6, &((struct sockaddr_in6 *)&addr)->sin6_addr,
^
4 errors generated.
*** Error code 1
Stop.
make[2]: stopped in fluent-bit/build
*** Error code 1
Stop.
make[1]: stopped in fluent-bit/build
*** Error code 1
Stop.
make: stopped in fluent-bit/build |
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
thanks for catching these problems. ucontext_t is being deprecated from POSIX years ago, but the main problem and suggestion is to use POSIX threads, for performance reasons this is not good, and that's why ucontext is still around. In a next version of Fluent Bit I plan to replace ucontext by the workaround with sigsetjmp(3). About the missing header for FreeBSD I found the following:
so all of them claim that #include <ucontext.h> is the right path, but looks like OSX is wrong. Anyways I just pushed a fix for Monkey here: monkey/monkey@62f1aa2 and merged into Fluent Bit here: 00e5194 Second issue for missing in.h fixed here: d4e3943 would you please check if the fixes pushed are working ? |
Thank you for your information and updating. d4e3943 can be built on FreeBSD. However, Monkey can't be built yet. |
Note...
Well, it's a FreeBSD's.
Sorry , I wrote a wrong information. |
Signed-off-by: Vetési Zoltán <vetesi.zoltan@gmail.com>
Fix broken link to td-agent-bit installation
I found this issue when I tested #48.
My environment is FreeBSD 10.2 ,
gcc 4.8.5.clang 3.4.1.There are 2 issues.
I want to know how we fix issue1
1. unknown type name 'ucontext_t'
This is compatibility issue.
This is caused these codes at lib/monkey/mk_core/mk_thread.c.
(Monkey project has same issue.)
There is no 'else' case.
It is very simple to replace #elif to #else or add FreeBSD define.
ucontext.h may be obsolete.
On the other hand, I found these articles.
That header is removed on 'POSIX issue7' .
http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap13.html
OpenBSD doesn't have ucontext.h
https://groups.google.com/forum/#!topic/v8-dev/seLPS6grC2A
They recommended to replace these API to POSIX threads.
http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html
Build log
The text was updated successfully, but these errors were encountered: