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
Windows: dependencies not filled in shared library manifests #161
Comments
I really don't know much about building and linking on Windows. All I do is run Are you using one of the bdists, or building pyzmq yourself? |
Also, I seem recall something about 'debug' builds of libzmq needing the CRT, and 'release' builds not needing it, so maybe that's the issue. The bdists should all be using 'release' builds, but it's possible some of them slipped up. |
Unfortunately, I'm not an expert on the Windows manifest, and even less so on distutils. I've been using the bdists and see this on all varieties (easy_install, msi, 32 & 64 bit). I don't see any evidence of debug library dependencies. I managed to get things to work by deleting the embedded manifest from all the .pyd files (this can easily be done by opening each library in Visual Studio if you rename the file to a .dll extension first). [I now have the same problem with readline, but at least that's optional so I can push on for a while without it.] I think that the manifest can be set up correctly by passing some kind of flag (e.g. /MANIFESTDEPENDENCY) to the linker via msvc9compiler, but I'm not sure exactly what, nor whether the correct thing to do is to have the runtime dependency fully specified or not to have a manifest at all. If I can figure it out I'll let you know! A couple of links that talk about this issue: |
Okay, thanks for the information. It seems like one link is arguing that there should either be a CRT specified or no manifest, and the other argues that it should have a manifest, but not specify crt (the current situation). If there's an easy distutils flag or something that prevents there being any embedded manifest, that seems most sensible based on my ill-informed reading. I don't understand why it would do a better job having no manifest than having a manifest with no information in it, but that's good to know. I think I'm going to go with a 'pull requests welcome' on this one, because I don't think I have any relevant knowledge or experience for figuring this one out. |
This is also an issue when trying to load pyzmq into a vim session. The vim command |
I don't know if you guys will see this, but does pyzmq with libzmq built as an extension have this issue in vim? |
This was also an issue with pyodbc. See here: http://code.google.com/p/pyodbc/issues/detail?id=214. This issue prevents pyzmq from being used with python 2.7 for embedded use or with WSGI through a webserver. Currently you get WindowsError: [Error 126] The specified module could not be found until you fix the manifests in the .pyd libraries. |
Just spent the best part of 2 days trying to work this out. Here are my results. def _remove_visual_c_ref(self, manifest_file):
try:
# Remove references to the Visual C runtime, so they will
# fall through to the Visual C dependency of Python.exe.
# This way, when installed for a restricted user (e.g.
# runtimes are not in WinSxS folder, but in Python's own
# folder), the runtimes do not need to be in every folder
# with .pyd's.
# Returns either the filename of the modified manifest or
# None if no manifest should be embedded.
# Rest of the function removed for brevity. This is an excerpt from I've managed to get the following solutions to work for me:
I hope this helps. |
This issue has already been discussed here #283. Here are the fixed MSIs https://www.dropbox.com/sh/8wpsm3h7y49y1pd/lHggJ5pQhY. These versions of pyzmq might not properly work with newer IPython versions. What I did is, I overwrote the files from pyzmq\zmq\eventloop\ with the ones from a later version. |
Closing stale issues: I think this shouldn't be an issue anymore with the new Windows builds, but new issues can be opened if it comes up. |
We've been trying to add the ability to launch an IPython qt console from our C++ application. On Windows, things are failing because the import of (py)zmq fails (i.e. trying an "import zmq" in our python terminal fails). It turns out that this is because initthreads.pyd depends on the Visual Studio 2008 runtime (MSVCR90.DLL) but it does not know where to find it because the embedded manifest is lacking that information. So whereas in libzmq.dll the manifest contains the section:
the corresponding section in initthreads.pyd is empty (as it is for the other pyzmq libraries - this is just the first to get loaded).
Would it be possible to fix the install kits to point to the runtime correctly?
I assume that the import works on running a regular python terminal because it already has the runtime loaded - our application is built with VS2010, but we still use the stock (VS2008) python underneath.
The text was updated successfully, but these errors were encountered: