From: Simon M. <lon...@gm...> - 2009-11-16 14:17:39
|
Hi, Just posting my experience with installing PyODE on Windows XP with Python 2.6.4 and VS 2008. It took me 4 tries to get it working. --------------------- TRY #1 * Use the Windows installer from http://pyode.sourceforge.net/ PROBLEM #1 * No installer for Python 2.6; installer for 2.5 complains that I don't have 2.5 SOLUTION #1 * Compile from source --------------------- TRY #2 * Download PyODE source * Download ODE 0.11.1 source * Compile ODE 0.11.1 to a .lib using VS 2008 * Modify setup.py to find the ODE 0.11.1 lib file * Install PyODE using 'python setup.py install' PROBLEM #2 * PyODE installs but crashes python.exe shortly after (but apparently not inside) an "ODE.Mass()" call. No Python exceptions are raised; it looks like a null pointer exception caught by Windows. SOLUTION #2 * PyODE incompatible with ODE 0.11? Use ODE 0.8 instead? --------------------- TRY #3 * Download ODE 0.8 precompiled Windows libraries * Modify setup.py to find the ODE 0.8 lib file * Install PyODE using 'python setup.py install' PROBLEM #3 * Linker failure: "unresolved external symbol __iob referenced" SOLUTION #3 * ODE 0.8 precompiled libraries incompatible with VS 2008? Try compiling ODE 0.8 from source using VS 2008? --------------------- TRY #4 * Download ODE 0.8 source * Compile ODE 0.8 using VS 2008 SUCCESS! --------------------- The complete list of steps which resulted in a working solution on my machine was: * Download premake 3.7 (not premake 4) * Download ODE 0.8 source (not ODE 0.11.1) * Run "premake --target vs2008" in the ODE "build" directory * Open "ode.vcproj" in the ODE "build/custom" directory, using VS 2008 * Compile the "ReleaseLib" solution in VS 2008 * Download PyODE source * Edit "setup.py" in PyODE directory changing the "ODE_BASE" variable to my ODE 0.8 directory * Run "python setup.py install" in PyODE directory Hope this is useful for anyone else having similar problems. Out of interest, can anyone estimate how much work would be required to get PyODE working with ODE 0.11.1? Quite a lot has been done in ODE since 0.8! Simon |
From: Ethan Glasser-C. <gl...@cs...> - 2009-11-20 04:52:14
|
Simon McGregor wrote: > Hi, > > Just posting my experience with installing PyODE on Windows XP with > Python 2.6.4 and VS 2008. > It took me 4 tries to get it working. Hi! Sorry about the long delay in responding. I think I might have encountered a problem like this once and I was waiting till I had my ducks in a row before replying. > TRY #1 > * Use the Windows installer from http://pyode.sourceforge.net/ > > PROBLEM #1 > * No installer for Python 2.6; installer for 2.5 complains that I don't have 2.5 > > SOLUTION #1 > * Compile from source I'm not really comfortable contributing Windows builds, as it's not really my chosen operating system. > TRY #2 > * Download PyODE source > * Download ODE 0.11.1 source > * Compile ODE 0.11.1 to a .lib using VS 2008 > * Modify setup.py to find the ODE 0.11.1 lib file > * Install PyODE using 'python setup.py install' > > PROBLEM #2 > * PyODE installs but crashes python.exe shortly after (but apparently > not inside) an "ODE.Mass()" call. No Python exceptions are raised; it > looks like a null pointer exception caught by Windows. > > SOLUTION #2 > * PyODE incompatible with ODE 0.11? Use ODE 0.8 instead? I think I encountered a very similar problem once. When you modified setup.py, did you update both CFLAGS and LIBS? The version in CVS should be fixed. http://pyode.cvs.sourceforge.net/viewvc/pyode/pyode/setup.py?revision=1.13&view=markup I suspect strongly that when I committed the fix of calling ode-config to get CFLAGS/LIBS, it didn't make it into the tarballs/zip archives on the "files" page. I'd like to update those files but I don't have permissions. I just sent an email to one of the former admins and hopefully I can get that changed. Without those CFLAGS, you can get bugs like you saw because of conflicts with single precision/double precision. > Hope this is useful for anyone else having similar problems. > Out of interest, can anyone estimate how much work would be required > to get PyODE working with ODE 0.11.1? Quite a lot has been done in ODE > since 0.8! Lots of features have been added to ODE that never made it into the Python bindings. Pyrex being fairly simple, it shouldn't be that hard to jump in and start sending patches :) I'm not using PyODE any more and I expect that the silence on this list testifies to the fact that none of the other people with commit access do either. So patches are the best way to see more of ODE get supported. Failing that, if you tell me which features you're most interested in, and are willing to test, I'll try to sit down and bash 'em out. Of course, if you can't successfully build against a new ODE, that's not really feasible, so let me know. Ethan |
From: Ethan Glasser-C. <gl...@cs...> - 2009-11-26 17:28:25
|
Simon McGregor wrote: > This fix works! > > Well, on a single-precision build anyway. I tried the double-precision > build with the following changes to setup.py: > > LIB_DIRS += [os.path.join(ODE_BASE, "lib", "ReleaseDoubleLib")] # > VS annoyingly builds to ReleaseDoubleLib > LIBS += ["ode_double", "user32"] # VS annoyingly builds > ode.lib as ode_double.lib > CC_ARGS += ["/ML /DdDOUBLE"] # VS annoyingly uses /D where gcc uses -D OK, I only have one idea here, which is to try: ["/ML", "/DdDOUBLE"] instead of ["/ML /DdDOUBLE"] I make this suggestion solely on the fact that the CC_ARGS (not CC_FLAGS, sorry :)) call has .split() at the end. >> I spoke to Matthias Baas, who writes: >> >> "I was actually thinking it might be a good idea to write a new version >> that's entirely based on ctypes instead of Pyrex, but there were just >> too many other things that kept me busy and PyODE just is a rather >> low-priority for me at the moment." > > Is that a good idea? I'm new to both ctypes and Pyrex, so I don't know > the ins and outs of both. After a quick perusal of ctypes, I can't see > how to interrogate a linked library's export table (which I'd quite > like to be able to do!)... It would at least obviate the need for figuring out how to compile things. I agree that I can't see a way to look at the symbols that are exported, but there has to be some way, because it's capable of figuring out that "dInitODE" is an existing symbol, and "foo" isn't. Anyhow, I don't see this as a major hurdle; whoever undertook this task would be working from the ODE docs and defining wrappers (much like the pyrex code already does). Ethan |