Skip to content
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

Merged
merged 16 commits into from
Sep 5, 2022

Conversation

evetion
Copy link
Contributor

@evetion evetion commented Sep 4, 2022

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.

@evetion evetion changed the title [ThriftJuliaCompiler] Build thrift library with cmake. [Thrift] Build thrift library with cmake. Sep 4, 2022
@giordano
Copy link
Member

giordano commented Sep 4, 2022

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.

T/Thrift/build_tarballs.jl Outdated Show resolved Hide resolved
@evetion
Copy link
Contributor Author

evetion commented Sep 4, 2022

🎉 Only took a day. As always, thanks @giordano for the quick and useful reviews. ❤️

T/Thrift/build_tarballs.jl Outdated Show resolved Hide resolved
Comment on lines +9 to +12
+#if __FreeBSD__
+ #define EAI_NODATA EAI_NONAME
+#endif // __FreeBSD__
+
Copy link
Member

@giordano giordano Sep 4, 2022

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 */

Copy link
Contributor Author

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.

Copy link
Member

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.

@giordano giordano merged commit c02cb5c into JuliaPackaging:master Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants