-
Notifications
You must be signed in to change notification settings - Fork 561
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
[Thrift] Build thrift library with cmake. #5427
Conversation
Simply by looking at the list of successful platforms my educated guess is that this is trying to run a C++ program built for the target platform. |
🎉 Only took a day. As always, thanks @giordano for the quick and useful reviews. ❤️ |
+#if __FreeBSD__ | ||
+ #define EAI_NODATA EAI_NONAME | ||
+#endif // __FreeBSD__ | ||
+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very convinced by this patch. How did you come up with that? EAI_NODATA
is in netdb.h
on FreeBSD with value 7, EAI_NONAME
has value 8 (but EAI_NODATA
is inside an #if 0
):
% julia --compile=min -e 'using BinaryBuilderBase; BinaryBuilderBase.runshell(Platform("x86_64", "freebsd"))'
sandbox:${WORKSPACE} # grep -B2 -A2 -r '\<EAI_NODATA\>' /opt/${target}/${target}/sys-root/include/
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/netdb.h-#if 0
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/netdb.h-/* Obsoleted on RFC 2553bis-02 */
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/netdb.h:#define EAI_NODATA 7 /* no address associated with hostname */
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/netdb.h-#endif
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/netdb.h-#define EAI_NONAME 8 /* name does not resolve */
--
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/roken-common.h-#define EAI_FAMILY 5 /* ai_family not supported */
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/roken-common.h-#define EAI_MEMORY 6 /* memory allocation failure */
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/roken-common.h:#define EAI_NODATA 7 /* no address associated with nodename */
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/roken-common.h-#define EAI_NONAME 8 /* nodename nor servname provided, or not known */
/opt/x86_64-unknown-freebsd12.2/x86_64-unknown-freebsd12.2/sys-root/include/roken-common.h-#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a C++ programmer so I could be wrong here. I got the following error on freebsd
[12:12:24] /workspace/srcdir/thrift/lib/cpp/src/thrift/transport/TSocket.cpp:461:16: error: use of undeclared identifier 'EAI_NODATA'
[12:12:24] error == EAI_NODATA
[12:12:24] ^
[12:12:24] 1 error generated.
in a previous build.
There are many hits when you google this, but essentially FreeBSD obsoleted it in an RFC, as it states in your netdb.h
example. Similarly, the manual doesn't mention it anymore: https://www.freebsd.org/cgi/man.cgi?query=gai_strerror&sektion=3&apropos=0&manpath=FreeBSD+7.1-RELEASE and the mailing list states that:
Now, getaddrinfo(3) returns EAI_NONAME instead of
EAI_NODATA.
Eventlet patched this in a similar way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, if FreeBSD devs tell to use EAI_NONAME
instead of EAI_NODATA
then this is good I guess.
Co-authored-by: Mosè Giordano <[email protected]>
As part of #5425.
Not sure why this is called ThriftJuliaCompiler, could be just Thrift?edit: ThriftJuliaCompiler is getting Julia into Thrift (based on a fork of Thrift), this PR just uses the current Thrift libraries.