views:

29

answers:

1

Hello everyone.

I have written an Apache2 module in C, now I am at the point of distributing the module.

I am not sure of the standard practices regarding the distribution of Apache modules, so I am considering to provide binaries for some of the more common platforms, like Windows and Ubuntu, etc.

I have two questions to ask-

  1. Will the module compiled on my Linux distro (Ubuntu 10.04) will be able to run on other Linux distros as well ? (I only have one machine so can't test it). By the way the compiled module is a shared object file.

  2. I couldn't find any reference or guide on how to compile apache modules on windows, so it would be very kind of you if you could give some heads up regarding this .

Thanks.

+1  A: 
  1. The answer is...possibly. If the apache module and the other system were compiled with a similar version of gcc then everything should be fine. If they are not the same then there is a chance for problems. It depends on the gcc version, and the options you passed in to gcc for compilation.

Someone else would be more qualified to go into specifics of how to make a binary more portable between distros.

  1. CMake is a very popular tool for compiling C code that works in windows. http://www.cmake.org/cmake/resources/software.html. You should be able to install it with apt-get.
paulusdd
Thanks. Yes, I believe there will be problems regarding the versions of other shared libraries and the GCC version used to compile apache on the target machine, that is why I am not able to decide how to package and distribute the module, its really a single C file, so making a .deb or .rpm package seems to be overkill :)regarding windows binaries, I read on the apache website that they use Visual C++ (professional) to compile the binaries for Windows, as other compilers have some issues on Windows, so the module should be compiled using the same compiler with which Apache was compiled.
Abhinav Upadhyay