-
Notifications
You must be signed in to change notification settings - Fork 201
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
Unable to reference kernel32 dll within cygwin64 #559
Comments
Thanks a lot for the report. I've never tried Bloop with Cygwin on Windows, so I can't tell if the issue comes from there or not, and I really can't tell whether the changes that you propose would solve the issues for good. The Bloop client You can download the latest version of the Python Nailgun client here: https://github.com/facebook/nailgun/blob/master/pynailgun/ng.py To use it with Bloop, the invocation should look like this (assuming you're running the Bloop server on port 8212, which is the default port):
|
I downloaded nailgun and did the suggested experiment, here's the output:
I have searched online for references to python/cygwin/dll and have found almost nothing. It could be that very few are using cygwin/python/nailgun, and that the bug exists also in nailgun. Since filing the report I also tested my Windows 10 laptop with the same result. My python skills are limited, but I'll see if I can come up with a fix that only applies the modified code if the original throws an exception. |
The following fix (replacing bloop script line 725) avoids the question of whether this is a bug in nailgun or not.
|
I also filed a bug with the nailgun project. |
(See: facebookarchive/nailgun#145) |
Hey Phil, do you want to submit a fix to our bloop plugin script so that we unblock you? It looks like the nailgun bug won't be fixed any time soon. It would be a pity you cannot try bloop out because of that. |
If the following approach seems acceptable, I'll submit a pull request. In the installer script at line 166, the nailgun script is transferred as-is to the client:
One approach would be to transfer first to a temporary file, and then copy-with-edits to the correct location:
Here's a simple version of 'copy_with_edits':
This works if the target line doesn't change. |
I wonder if instead of doing this workaround you would be happy with making this change in facebook/nailgun, and then we would upgrade our nailgun version to it. The change would only need to be the addition of the extra |
Actually, I just did the change in the linked nailgun commit. Assuming the fix you linked at the beginning works, this will be fixed in 1.0.0 for you. |
Wow, a much better approach, thanks! I didn't know we had our own nailgun version to work with. |
Yeah, I realized that from your response! 😄 |
In my cygwin64 environment, I was unable to run the bloop script as-is. Here's the error I was seeing:
Experimentation led to the following fix : bloop script section near line 726 change from:
to
In summary, changing the first argument to ctypes.CDLL from 'Kernel32' to 'Kernel32.dll' fixes the problem in my environment.
What I don't know is whether the original problem might be due to my environment being non-standard in some way. If anyone else is able to use the script as-is in a cygwin environment, then this is not the right fix. Anyone have such an experience?
I can do a pull request if this is a universal fix, I just need some confirmation from other cygwin users.
The text was updated successfully, but these errors were encountered: