Edgewall Software
Modify

Opened 7 years ago

Last modified 3 days ago

#6739 new defect

trac svn-python mismatch with apache 2.2 under windows

Reported by: jschmidt@… Owned by: cmlenz
Priority: normal Milestone: next-stable-1.0.x
Component: web frontend/mod_python Version: 0.11b1
Severity: normal Keywords: documentation
Cc: ebekker4csc@…
Release Notes:
API Changes:

Description (last modified by cboos)

If you use xampp apache 2.2 and trac 11b1, you have to use the svn-python binding from this page (binding for apache 2.0) http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91&expandFolder=91&folderID=74 Subversion recommended this binding http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&expandFolder=8100&folderID=8100 But in this case I have an unsynchronized repository. error-stack:

2008-01-30 12:21:21,890 Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\trac\versioncontrol\svn_fs.py", line 251, in __init__
    _import_svn()
  File "C:\Python25\Lib\site-packages\trac\versioncontrol\svn_fs.py", line 69, in _import_svn
    from svn import fs, repos, core, delta
  File "C:\Python25\Lib\site-packages\svn\fs.py", line 19, in <module>
    from libsvn.fs import *
  File "C:\Python25\Lib\site-packages\libsvn\fs.py", line 29, in <module>
    import core
  File "C:\Python25\Lib\site-packages\libsvn\core.py", line 5, in <module>
    import _core
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.

So I go back to use the binding for apache 2.0. If you follow the install-guide from Trac, you won't realize this mistake, because the link brings you to subversion/apache 2.0. Please resolve this mismatch!

Attachments (0)

Change History (26)

comment:1 Changed 7 years ago by anonymous

<<If you follow the install-guide from guide>> has to be 'from trac' 8)

comment:2 Changed 7 years ago by jschmidt@…

  • Component changed from general to mod_python frontend
  • Owner changed from jonas to cmlenz

comment:3 Changed 7 years ago by cboos

  • Description modified (diff)
  • Keywords documentation added

Which part of the install guide?

At least, the TracOnWindows#using-installers part seems clear enough about this.

OTOH, the next section (manual install) still needs much cleanup/removal.

comment:4 Changed 7 years ago by jschmidt@…

In this part of the guide TracOnWindows#using-installers the link of the subversion-python 2.5 binding points on a apache 2.0 version. I installed Apache 2.2 and downloaded the corresponding version directly from tigris.

comment:5 Changed 7 years ago by cboos

Ok, so you haven't read the associated notes ;-)

comment:6 Changed 7 years ago by anonymousjschmidt@…

I think the problem is, that tigris offer the svn-binding as a working exe, which is not. so let's close the ticket and I will send this ticket to the subversion developers, because they have to recover their bindings and not the trac-ians, isn't it?

comment:7 Changed 7 years ago by cboos

Ok, sorry, I didn't get it at first.

So you're basically saying that the Subversion 1.4.6 bindings for Apache 2.2 are actually not compatible with Apache 2.2, but that the Subversion 1.4.6 bindings for Apache 2.0 are?

That's weird. Though I haven't tried myself, I doubt this. From the Apache 2.2 page:

Windows binaries built against Apache 2.2.x — note that Apache 2.2.4 or higher is required.

Have you checked whether the xampp Apache 2.2 satisfies this requirement?

comment:8 Changed 7 years ago by jschmidt@…

Yes, I checked: I'm using the newest release xampp 1.6.5 with Apache 2.2.6

comment:9 follow-up: Changed 7 years ago by Laurens Blanckenborg <laurens@…>

My experiences in this matter are even wierder.

I encountered the same error as mentioned above. I tried to get Trac working under Apache 2.2.8 with mod_python. I have installed (binary releases) Apache 2.2.8 from ApacheLounge? (compiled with VC2008), ActivePython 2.5.2.2, mod_python 3.3.1 from apache.org and the svn-bindings from subversion.tigris.org (the ones compiled against 2.2).

Though everything installed without a problem, the mod_python testhandler showed that mod_python was functioning OK and both my existing trac-envs as well as the newly created test-environment ran fine under the standalone tracd, I was not able to browse the repo when accessing the envs via mod_python. The traclog returned the same error as stated above.

I read the remarks in the help/guide about adding the bindings (./svn and ./libsvn) to the pythonpath, but that didn't help. When testing if using Apache 2.0 would solve the problem (with the appropriate 2.0-mod_python and 2.0-bindings) I accidentally got it working under 2.2.

The following weird mixing did the trick: ActivePython 2.5.2.2 (not changed when going back to 2.0); uninstalled svn-python and mod_python for 2.2; installed svn-python for Apache 2.0; installed mod-python for Apache 2.0 * BUT * loaded the Apache-modulefile (mod_python.so) from the 2.2-package. Now I can browse the repo via mod_python under Apache 2.2.8.

Using the 2.0-mod_python.so under Apache 2.2.8 causes it to fail starting the service, using the whole mod_python2.2-package together with the bindings for 2.0 (as mentioned above) causes Trac in import the bindings, but Trac then stops after importing the bindings (giving a blank page and leaving "[…] Trac[svn_fs] DEBUG: Subversion bindings imported" as the last line in the log).

I really don't know a possible cause of this wierd behavior, but I hope some other people could benefit from my experience as it took me several days searching the internet to get it all working.

Remark: I'm using Windows Server 2003 x64 SP2, but all software (Python, Apache, SVN) is 32bit. I don't think this error to have anything to do with x64.

comment:10 in reply to: ↑ 9 Changed 7 years ago by cboos

Thanks a lot for your detailed explanation, I'll add a link to it at the relevant places.

I think this whole story can be explained by mismatched MSVCRTs. You could have a look at the various .exe, .so and .pyd files involved here using the dependency walker (depends.exe) and see to which MSVC runtime each is linked to.

Off-topic note to self: [...] should not be recognized as a relative wiki link…

comment:11 follow-ups: Changed 6 years ago by ebekker4csc@…

  • Cc ebekker4csc@… added

More info on this issue. We experienced the exact same problem, here is our setup: VisualSVN Server (Apache 2.2.9), with the latest bins for Python 2.5, SVN 1.5, SVN-Python (SVN1.5-Py2.5-Apache2.2), mod_python-3.3.1 (Apache 2.2), Trac 0.11.

Just as in your case, we could run tracd with no problems, but when running through Apache (VisualSVN Server) we got the same error trace failing to load _core. We solved it by replacing the libapr-1.dll in the Apache bin with the version that's in Python's libsvn, just substituting seems to have fixed it.

Using the "depends" utility we see that one specific routines symbol name has changed, specifically "_apr_time_ansi_put@12" became "_apr_time_ansi_put@8" and libsvn has a dependency on the latter. Looks like this is an issue for the SVN guys to fix, but I'm curious how the signature for this routine changed between the builds?

comment:12 follow-up: Changed 6 years ago by sakesun

We experienced the exact same problem as ebekker4csc

and the solution mentioned solve the problem.

We solved it by replacing the libapr-1.dll in the Apache bin with the version that's in Python's libsvn, just substituting seems to have fixed it.

Thanks

comment:13 in reply to: ↑ 12 ; follow-up: Changed 6 years ago by wtigotw

Same setup, same problem, same solution as the other two

Replying to sakesun:

We experienced the exact same problem as ebekker4csc

and the solution mentioned solve the problem.

We solved it by replacing the libapr-1.dll in the Apache bin with the version that's in Python's libsvn, just substituting seems to have fixed it.

Thanks

comment:14 in reply to: ↑ 11 Changed 5 years ago by anonymous

VisualSvn? 1.7.2 Python 2.5.4 setuptools-0.6c9.win32-py2.5 genshi-0.5.1.win32-py2.5 Trac0.11.4.win32 svn-python-1.6.2-win32-py2.5 mod_python_3.3.1-win32-py2.5-Apache2.2

Same Problem, same fix. Thanks a bunch.

comment:15 in reply to: ↑ 13 Changed 5 years ago by anonymous

Replying to sakesun:

We solved it by replacing the libapr-1.dll in the Apache bin with the version that's in Python's libsvn, just substituting seems to have fixed it.

Same problem and fix here:

Windows 2000 SVN 1.6.5 Python 2.5.4 Trac 0.11.5 svn-python-1.6.5-win32-py2.5 mod_python_3.3.1-win32-py2.5-Apache2.2

comment:16 Changed 5 years ago by bxdtech

FIXED!!!

My upgrade of Apache, SVN and Trac was going fine; I had all the programs running great on their own, but there was one very crucial problem left to overcome: Trac could see the SVN repos while running on tracd, but Trac couldn't see the repos while running on Apache. I tried everything, had literally been so frustrated that I was going to switch to Bugzilla…I've literally days spent trying to get Trac to talk to SVN…uninstalling, reinstalling, moving files, adding little bits and pieces of Python code here and there, swapping versions of bindings, swapping module versions, reconfiguring Apache from mod_python to fcgi and back again, pouring over forums, tickets, email groups, installation instructions, etc…-you know, all that troubleshooting stuff we all know and love so well…and now, it's all fixed.

Apache/2.2.14 (Win32) DAV/2 SVN/1.6.6 mod_python/3.3.1 Python/2.5.4

I just stopped Apache, copied ALL the .dll files from /libsvn to my Apache /bin dir and restarted Apache. Everything now works perfectly. w00t!

-I have to say that this was undoubtedly the absolute worst upgrade procedure I've ever experienced. I understand that integrating these programs is a huge development task, and as a developer and sysadmin I appreciate all the work that goes into building all the associated parts and APIs, but there MUST be an easier upgrade path…from an engineering prospective the work done to improve Trac is fantastic, but from an end-user perspective, specifically the installation and configuration of it, Trac is a disjointed hodge-podge of instructions that usually carry the caveat of "your mileage may vary". Someone needs to focus on keeping the installation instructions clear and concise, or perhaps build and maintain an installer system that actually works….or both. -JMHO

comment:17 Changed 5 years ago by anonymous

I have to agree with what was said before… There MUST be an easier way to make Trac + SVN work together. I am trying to make SVN 1.6.9, Trac 0.11.7, and ActivePython 2.6.15 work together on Windows 7. All installed, and very nicely, but Trac refuses to see my repository. It's the famous Failed to load Subversion bindings problem.

IMO, Trac and Subversion need to become one single product. A given Trac version already requires specific bindings from a particular build of Subversion. The installer should include Trac, Subversion, Genshi, Python from python.org,* easy-install, Apache, and whatever else might be needed for a complete standalone system, with each piece optionally installable at user discretion.

The other option is to cut the umbilical cord between Subversion and Trac, so that users don't have to hunt down this and that from all over the web.

Granted, Trac and Subversion are completely separate projects, each with their respective development teams. And yes, I know volunteering time and effort on open source projects is very often a thankless job. But folks, it is utterly ridiculous to expect the user to dig through a dozen wiki pages, and twice as many search engine query results, and days later have little more than fading hope that Trac and Subversion will ever work together on their machine.

I do so want to see this great duo working in concert, and I'll gladly contribute something to the projects when they do.* But my confidence level in the software is nearing bottom of the tank.

Thank you.

* ActiveState only has the current plus previous version of ActivePython available for download, and their standard license prohibits distribution.

Much like the BitNami stack. only the SVN/Trac versions they use are showing their age, and I could not get their combo to work with TortoiseSVN nor AnkhSVN.

* An obvious first contribution would be my install instructions.

comment:18 in reply to: ↑ 11 Changed 4 years ago by Laurens Blanckenborg <laurens@…>

Replying to ebekker4csc@…:

Just as in your case, we could run tracd with no problems, but when running through Apache (VisualSVN Server) we got the same error trace failing to load _core. We solved it by replacing the libapr-1.dll in the Apache bin with the version that's in Python's libsvn, just substituting seems to have fixed it.


The story goes on…

A few days ago, I upgraded SVN from 1.4.6 to 1.6.12 and Python from 2.5 to 2.6, and again the bindings gave me a headache.

As the mod_python project is now officially dead (as stated on TracModPython), I followed the advice and configured Apache to run Trac on top of mod_wsgi. Following the instructions on TracModWSGI, all went fine until I encountered the most feared SVN error:
Unsupported version control system "svn": DLL load failed: The specified procedure could not be found.

Just as in the other cases, I could run tracd with no problems. Also, as suggested on TracSubversion#Troubleshooting, I tried to load the bindings using the Python interactive interpreter, which was successful.

I tried all other methods (adding several dirs to the pythonpath, have both the .pyd and .dll version of the libsvn files available, etc. etc.), no success. Finally, this post helped me get the bindings working, but in a slightly different way:
As I didn't have the libapr-1.dll in the /libsvn folder (I used the SVN and SVN-Python binaries from http://alagazam.net/), I solved it by replacing the libapr-1.dll in the Apache bin with the version that's in Subversion's bin.

No other tricks required! No adding folders to the Python path and other Python configuration whatsoever. Since I already a working Apache with SVN and Trac, upgrading basically took the following steps to get Trac 0.13dev-r9966 working with SVN 1.6.12:

1) Downloaded and extracted SVN from http://alagazam.net/;
2) Uninstalled Python 2.5, installed Python 2.6 32bit from http://www.activestate.com/activepython;
3) Extracted python bindings from http://alagazam.net/ to <python-dir>\Lib\site-packages
4) Reconfigured Apache to use mod_wsgi instead of mod_python following the instructions on TracModWSGI;
5) Replaced the libapr-1.dll in the Apache bin with the version that's in Subversion's bin.

Apache/2.2.16 (Windows 2003) Trac 0.13dev-r9966 SVN/1.6.12 mod_wsgi/3.3 Python/2.6.5 svn-win32-1.6.12_py

Hope this can save other Windows users time.

comment:19 Changed 4 years ago by Laurens Blanckenborg <laurens@…>

Addition to previous comment:

I also tried setting up Apache / Trac using mod_python, no difference, python bindings also didn't work until I replaced the libapr-1.dll in the Apache bin.

comment:20 follow-up: Changed 4 years ago by anonymous

For Trac 0.12 and SVN 1.6.12 I had to add the libapr-1.dll from apache 2.2.15 (archived download, installing msi, getting the lib, deinstalling apache) as stated in the "build with" section of the amalgazam's bindings.

comment:21 in reply to: ↑ 20 Changed 4 years ago by anonymous

Replying to anonymous:

For Trac 0.12 and SVN 1.6.12 I had to add the libapr-1.dll from apache 2.2.15 (archived download, installing msi, getting the lib, deinstalling apache) as stated in the "build with" section of the amalgazam's bindings.

to <Pythonpath>\Lib\libsvn AND make a copy of every dll-File there as *.pyd. Then finally python imported ("from svn import core") and since then I have svn access via tracd.

comment:22 Changed 4 years ago by cboos

[semi-OT]: I wonder how a "git plugin" style rewrite of our svn backend would do… (replacing the creepy bindings with svn ... --xml calls). As we have most of the stuff cached anyway, the performance penalty wouldn't be that high. That would make the leaks go away, and support #493 for free ;-)

comment:23 Changed 4 years ago by navyxhj@…

I get an another mismatch:

2011-02-14 22:20:21,858 Trac[main] DEBUG: Dispatching <Request "GET '/browser'">
2011-02-14 22:20:21,858 Trac[session] DEBUG: Retrieving session for ID u'Ueser'
2011-02-14 22:20:21,858 Trac[main] DEBUG: Negotiated locale: en_US -> en_US
2011-02-14 22:20:21,890 Trac[api] INFO: Synchronized 'svn' repository in 0.03 seconds
2011-02-14 22:20:21,937 Trac[util] WARNING: Unable to get changeset [3]
2011-02-14 22:20:21,937 Trac[util] WARNING: Unable to get changeset [5]
2011-02-14 22:20:21,937 Trac[util] WARNING: Unable to get changeset [7]
2011-02-14 22:20:21,953 Trac[chrome] DEBUG: Prepare chrome data for request
2011-02-14 22:20:22,015 Trac[main] WARNING: [127.0.0.1] HTTPNotFound: 404 No such changeset (No changeset 0 in the repository)

System Information:

Trac 0.13dev-r10482 
Babel 0.9.5 
Genshi 0.6 
mod_python 3.3.2-dev-20080819 
MySQL server: "5.1.54-community", client: "5.1.33", thread-safe: 1 
MySQLdb 1.2.3c1 
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] 
setuptools 0.6c11 
Subversion 1.6.15 (r1038135) 

why?

comment:24 follow-up: Changed 12 months ago by anonymous

I have copied the svn and libsvn folder from the bindings I downloaded from alagazam to my site-packages folder. when i try to run the svn check, it gives me the Import Error: DLL load failed: the specified procedure could not be found.

Any clue how to solve this? Do I need to have apache installed?

comment:25 in reply to: ↑ 24 Changed 12 months ago by rjollos

Replying to anonymous:

I have copied the svn and libsvn folder from the bindings I downloaded from alagazam to my site-packages folder. when i try to run the svn check, it gives me the Import Error: DLL load failed: the specified procedure could not be found.

Any clue how to solve this? Do I need to have apache installed?

There are some hints at TracSubversion#checklist-windows. If you have further questions, please ask on the MailingList.

comment:26 Changed 3 days ago by rjollos

  • Milestone changed from next-minor-0.12.x to next-stable-1.0.x

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain cmlenz.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from cmlenz to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.