in reply to Dealing with XS modules on multiple platforms

It seems that your deployment process is tailored towards pure perl modules, and just not general enough.
So on to my questions... Given that any module may have an XS module somewhere in it's dependency chain, do I have to keep a separate set of all the libraries for each platform (rather than only the XS ones)?

I think so, yes. But it shouldn't be all that much work, because most pure perl modules are very easy to build once all dependencies are in place.

But I'd chose a different approach: keep a local cpan mirror, and if some module makes trouble during build, write a patch and let your local mirror distribute the patched copy. Then just use CPAN to install everything on your machines.

There's also the problem that at some point a new platform may be added. When that happens, we need to build all the modules for that platform. Our current solution is to have a big make file which supposedly builds the right version of everything. In reality, this never works, and someone has to spend days manually building all the modules. Is there a good way to solve this?

That depends on why the build fails. If it's just management issues (for example dependencies built in the wrong order), you could try to set up a bundle that has all of the to-be-installed modules as dependencies, and let CPAN or CPANPLUS do the work for you. If the build fails because some module just doesn't work on that platform, I see no way around manual building.

Disclaimer: I never maintained a larger cluster of machines, so take these thoughts as ideas only, not as advice.

  • Comment on Re: Dealing with XS modules on multiple platforms

Replies are listed 'Best First'.
Re^2: Dealing with XS modules on multiple platforms
by Mutant (Priest) on Jul 24, 2008 at 12:24 UTC

    Thanks for this. I like the idea of running a local CPAN repository to take care of hacks (and versions). I have a feeling I can do this so that the local repository just goes to a real one if it can't find what it's been asked to build. We could potentially then use a Module::Install script to make it easier to allow for a re-build for a new platform.

    It still means I'd have to maintain a separate dir of built modules for each platform, but not sure there's an easy way around that.

      Also see CPAN::Mini and CPAN::Inject for creating/keeping the local mirror and the "distroprefs" feature of CPAN.pm for maintaining your local patches integrated in your mirror and automatically patching any module upon build time.

        Just as a data point: my CPAN::Mini mirror uses less then 1GB of disk space (currently 866MB), because it keeps only one version of each distribution. 1GB shouldn't be a problem with today's disk prices ;-)