Edgewall Software

Changes between Version 83 and Version 84 of TracSubversion


Ignore:
Timestamp:
Sep 6, 2010, 2:42:00 PM (14 years ago)
Author:
Christian Boos
Comment:

add some debugging tricks for troubleshooting windows installation of the bindings

Legend:

Unmodified
Added
Removed
Modified
  • TracSubversion

    v83 v84  
    4343* Note: if !CollabNet is providing SWIG bindings for Python 2.6, I can't find them. In fact, since the move to apache.org, I can no longer find the 2.5 bindings.
    4444* Also note: the Subversion directory structure of the Algazam distro is slightly different than the !CollabNet one: all the executables are in the `bin` subdirectory.
     45
     46If you end up with the infamous //`ImportError: DLL load failed: ...`//, don't despair but have a look at the [#checklist-windows Windows troubleshooting] section below.
    4547
    4648=== BSDs
     
    255257 If you get the message {{{ImportError: libsvn_swig_py-1.so.0: cannot open shared object file: No such file or directory}}} even though you can see the .so file in the correct place, then try {{{ldconfig -v}}} as root.
    256258
    257  '''Windows Users'''
    258 
    259  According to the README.txt file for the Subversion bindings, if you are using Python 2.5+ you need to rename all the .dll files in the libsvn folder to .pyd files. Upon further research, http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll indicates you may need to have both the .pyd and .dll version of the libsvn files available. This resolved both the 'ImportError: No module named _core' error (with only the DLL) and the 'ImportError: DLL load failed' (with only the pyd) when testing from the console, and the browswer.
     259 '''Windows Users''' [=#checklist-windows]
     260
     261 According to the README.txt file for the Subversion bindings, if you are using Python 2.5+ you need to rename all the .dll files in the libsvn folder to .pyd files. Upon further research, http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll indicates you may need to have both the .pyd and .dll version of the libsvn files available. This resolved both the '`ImportError: No module named _core`' error (with only the DLL) and the '`ImportError: DLL load failed`' (with only the pyd) when testing from the console, and the browser.
     262
     263 A good way to diagnose a //DLL load failed// error is to use the [http://www.dependencywalker.com/ depends.exe] tool from the console in which you'd run python.exe, and do a `depends.exe absolute-path-to/python.exe` instead. Then, press `F7` (//Start Profiling...// - you need at least version 2.0 of depends.exe) and type `from svn import core` at the Python prompt in the new cmd window. This will try to load the bindings, but this time you'll be able to see //why// this fails, by spotting the .DLLs shown in red in the Module list, and there are really lots of options here ;-)
    260264
    261265