Build Windows perl module on Linux - linux

I am in a bit of a bind, I need to get my hands on some perl modules that are available on the any of the repos that Activestate can access. But the module is on CPAN and I got the source code but when I attempt to compile it on Windows it fails. If I run it on my Ubuntu virtual machine I run MAKE and works fine. Is there anyway to have MAKE on linux compile for Windows so I can get these modules?
The modules in question are Net::SSH::Perl and Net::SSH:W32Perl
Any help would be appreciated.

Some of the modules not available in the AS repositories can be found here.
http://theoryx5.uwinnipeg.ca/ppms/package.lst

This is a problem with ActiveState Perl: It's not really setup to build modules because there's no compiler. Therefore, you depend upon some third party to build and compile the packages for you. I like Active Perl, but this can be a pain.
Download Strawberry Perl. Strawberry Perl is another Windows version of Perl, but it also comes with the MinGW development environment. This will allow you to use CPAN to compile the modules you need. You might even be able to install these modules in your ActiveState Perl installation.
Are you using Perl 5.12? The default University of Winnipeg package manager for that version only has about a 1/2 dozen packages installed on it. I've found more packages available when I added in the URL for version 5.10. Add in the URL http://cpan.uwinnipeg.ca/PPMPackages/10xx/ to the PPM program and see if its there.

Related

how to compile apache,mysql and php in linux

I have never used Linux OS. Want to know how we can start compiling Apache,Mysql and php in Linux and is it necessary to configure it.
I tried doing it by using cd/user/scr/httpd_2.0.09
Do we need to downloads the set up from google
Do yourself a favour and don't try to compile your own webserver etc. ;)
Aside from the fact that it's a lot of work to set up the tools for compiling, resolve dependencies, and debug possible errors, you will have to do the same procedure with every tiny update – instead of simply getting a new version via your package manager.
If you use a common distribution, install the packages required for the so-called LAMP stack, and configure them properly. That will be hard enough for starters.
If you're using Ubuntu, have a look here: https://help.ubuntu.com/community/ApacheMySQLPHP
Actually installing binaries from repositories is less painful than compiling, but if you really want so, you may install Gentoo or other source-based distributive. I've simply described compilation of MySQL 5.5 in my blog.
To compile packages on Debian based systems you need to install build-essential and cmake package (and maybe some other *-dev packages, which appears to be missing during source configure).
For example to compile MySQL 5.5 it is enough to run:
cmake . #yep, with dot. Will prepare your source according to your system
make
make install #will install compiled binaries to system

What is the best approach to distribute a project in both windows and linux?

So there is this particular jython project that needs a couple of dependencies, such as Jenkins, some kind of subversion, and this needs to be done on windows.
Would it be sane of me to consider using pip to help install all of these items, or should I look elsewhere, such as NSIS?
Update:
I really should've rephrase this - my fault for asking the question late at night.
There's an automated testing project that has the following dependencies:
Java JDK
Jython
Ant
Robot Framework
subversion
Jenkins
I personally prefer to run on Linux, but people that need to use this are typically Windows users. I'm confident enough to write a script to install all of this on Linux, but what I want is to have a script / installer that would install the relevent tools.
I would prefer to have a single script to do all of this - it's easy on Ubuntu with apt-get; but on windows, this quickly becomes non-trivial.
What is the best way to try and do this? Should I create separate installers for separate OS
pip is the acronym for pip install packages, python packages, and it only install Python packages.
Since Jenkins and Subversion are not Python packages, as far as I know, you can't install them, and it is not "sane".
Unfortunately there is no single established tool to install everything in every platform.
Use pip to install all your python packages, and prefer to use virtualenv to create isolated Python environments to manage your projects.
Since pip only installs python packages and Jenkins isn't a python package (it's written in Java), you cannot use it to install those packages.
You should totally take a look to virtualenv, but if you need to do a "double click" installer for your project in Windows i think that NSIS is the way to go.
I am successfully using install4j to create an executable installer for Windows, Linux and OSX. The application is Java and it bundles JRE. Install4j creates installer for each specified platform using respective JRE. So far it worked great on Windows and it somewhat works on Linux and OSX (e.g. in new version of install4j, JRE for Java 1.8 is not bundled properly for linu, so the JRE is preinstalled, but it could be automated). It also allows you to run non-interactive installer.

Port a debian package to YUM for CentOS

I have a project that runs on Debian and uses many packages provided from the Debian repositories.
Because of demand, I've looked into porting the project to CentOS, but found that many of the packages I require are completely missing - at least 10 dependencies would have to be compiled manually at install time on the users machine.
My question is, what is the best way to create an installer for the user's machine? Should I use automake tools (with the standard ./configure, make, make install), to compile the required libraries, or is this a non-standard approach. Note that my app doesn't actually need to be compiled since it is written in Python, so is it weird to do a "make", when you're not compiling your own app?
Should the configure script just warn the user that package X is missing, and let them handle the rest?
Should I roll my own dependency checker by runng pkg-config manually a few times for each library required, and exit if something is missing?
I'm quite new to this, so any tips to get me moving in the right direction are appreciated.
Edit: I am familiar with RPM and yum for red hat base distros, but CentOS is missing many multimedia packages that I require. An example of one of my package dependencies is "liquidsoap" which is a programmable audio engine: http://savonet.sourceforge.net/
This is available on Debian, but not Redhat/Centos
See this link on CentOS package management.
http://wiki.centos.org/PackageManagement/Yum
CentOS is redhat based and does not use .deb packages by default. However apt package management has been ported to tons of platforms, you may be able to use a port for centOS
If you use YUM whatever packages you need will be there for your application as redhat distros need all the same things that any other distro does.
EDIT: To get the details out of comments
Packages not available on the target platform either have to be built (possibly as a port) on the target platform and then shipped in the ported package (in this case YUM), or code needs to be modified and forked to use packages which already are available on the target platform. The choice depends on which is worse, or which is even possible given your constraints.

How to compile software into a re-installable form?

I am working through my 7th recompile of the same software. There are no pre-built packages available, and it's a long compile time. Is there a way to take what I compile and package it up so that I don't have to continually build it right from source?
EDIT: CentOS 6 for the OS if that matters.
You should have a look at CDE. From its website :
CDE (formerly known as CDEpack) automatically packages up the Code, Data, and Environment required to deploy and run your Linux programs on other machines without any installation or configuration. CDE is the easiest way to completely eliminate dependency hell.
So it will compile your program and include all the dependencies in the resulting package as well. The resulting package should be able to run on any modern x86 Linux distribution, so you won't have to continually build it right from source.
checkinstall, which is based on installwatch, is able to create various packages including .deb (Debian, Ubuntu, ...), .rpm (Red Hat, Fedora, SuSE, ...) and .tgz (Slackware) suitable for your distribution's package manager.

Compiling apache modules for Windows and Linux distros

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-
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.
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.
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.
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.

Resources