Sorry for being unclear
I'm looking for a HOWTO, Tutorial, example, or guru to explain how to build an XS-based moudule into a PPM for Windows, yet build it on Linux.
We currently build the Windows binary version of Swish-e on Linux. So to include the PPM module in the distribution we would like to be able to build it also on Linux.
The XS module needs to link with libz and libswish-e which is generated as part of the buld for swish-e.
I assume someone does this kind of thing.
| [reply] |
Well, a PPM is easy
(see HowTo build and distribute a PPMed module for Win32 in Tutorials), but cross-compiling is not easy(i tried doing it, I failed miserabley, I've only heard people say they did it, but only on unices).
You probably know, but there is a SWISH module on cpan which interfaces to the swish-e.exe executable.
http://mingw.sourceforge.net/ might be of interest.
I'll see if I can build it on windows
(if you can provide me with a more recent dev binary, that'd be great).
update: Theoretically (i've not tried it), it's easier (or possible -- should be) to cross-compile perl extensions
(and more) using SWIG instead of XS.
update: I tried building the perl extension, I didn't have much luck, sorry. I suggest you add the SWISH distribution from CPAN to your bundle.
MJD says you
can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM
repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.
|
| [reply] |
Yes, it's the cross-compiling that is the issue. But I suppose if we could build the PPM on Windows we could just copy it into the Windows distribution (which is cross-compiled on linux).
Yes, I know the SWISH module on CPAN as I'm the author. ;) That is a front-end module that uses either the SWISH::Fork module to run the swish-e executable, and there's also a SWISH::Library backend that has not been released -- and probably won't because the C API was redesigned. There's was suppose to be a SWISH::Server module, too. The idea was that code could switch between backends as needed -- something like DBI backends (well kind of).
So, basically although those modules can still work, they are really outdated for the current version of swish. The SWISH::API module makes things much easier. But since it's not pure Perl we need to get a PPM built for the Windows users.
Again, I don't know Windows, so the code I've written for running swish via the swish-e executable (like SWISH::Fork, and example CGI scripts) is a potential security problem with Windows. Under unix I can fork/exec and not worry about sending user data through the shell. I don't now how to do that with Windows, and keep the code portable (not that I've thought about it too much). But if I can get a PPM built for SWISH::API module then life will be much easier.
So you tried to build the SWISH::API module under Windows and had problems?
| [reply] |