-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support other operating systems #2
Comments
We can download librdkafka with nuget (https://www.nuget.org/downloads)
|
We currently have
On MacOS. |
It was possible to compile the cpp into .o files using the following Makevars.win and putting the header files (rdkafkacpp.h) into
However the last step threw a lot of errors like
This makes sense as the library was not included yet. But all attempts to link to the library were not successful, i.e. putting the
|
The problem is that the nuget package is compiled with visual studio which is not compatible with the mingw compiler included in Rtools. I got it partially working by downloading the binaries from here: https://packages.msys2.org/package/mingw-w64-ucrt-x86_64-librdkafka?repo=ucrt64 and adjusting the Makevars.win file to
Now the building succeeds but the library cannot be loaded because there are other runtime dependencies (i.e. libcurl, libzstd, libcrypt, liblz4, libssl) which cannot be found. This could be debugged by using Dependency Walker in Windows. I installed the msys2 helper from https://www.msys2.org/ and installed the library with I added this folder to the path (Settings -> Edit Environment Variables for your Account) and loading worked 🎉 msys2 is also included in Rtools. I need to test if we can install librdkafka this way and do not need to adjust the path |
We can use the msys2 binary from Rtools to install librdkafka using the command
Then we can compile and use the package with the following
|
It's now possible to run the package on windows, potentially with some manual steps involved. As we need to change the process anyway when publishing to CRAN this should be okay for now. |
We can now support all main operating systems (windows, macos, linux). Pipeline tests however are currently running under linux |
The R package should be functional on all common operating systems (main linux distributions, macOS, Windows).
Hints:
The text was updated successfully, but these errors were encountered: