Install the VI Perl Toolkit on OS X: Difference between revisions

Completely removed the MacPorts steps as they didn't turn out to work
m (highlighted to NOT use MacPorts)
(Completely removed the MacPorts steps as they didn't turn out to work)
 
Line 2: Line 2:
'' by Wil van Antwerpen ''  
'' by Wil van Antwerpen ''  


Basically there are two ways in which you can get the VI Perl Toolkit working on OS X.  
This document describes the preferred way on how-to get the VI Perl Toolkit working on OS X.  


One way is by using the CPAN functionality of Perl which is already installed on your Mac and the other way is by using [http://www.macports.org/ MacPorts].  
We are doing this by using the CPAN functionality of Perl which is already installed on your Mac.
I will first walk you through how-to this using the CPAN Network and then show you how to get it working using macports.
I will walk you through how-to set this up from the start using the CPAN Network.


Obviously, you will only need to use one of these methods in order to use the Toolkit.
''' We have also tried to do this by using [http://www.macports.org/ MacPorts].  but as it turns out MacPorts will give you problems due to it changing paths and installing its own complete perl environment. For now we are not aware of a way to use the toolkit using Macports. '''
 
''' I SUGGEST USING THE CPAN METHOD and not install MacPorts if you can as MacPorts will give you problems due to it changing paths and installing its own complete perl environment. I will remove the MacPort parts of the notes ASAP. '''


== Installing Developer Tools ==
== Installing Developer Tools ==
The VI Perl Toolkit needs to get a few extra modules added to the current perl setup that is by default installed on Mac OS X. In order to get these modules we use CPAN or macPorts.
The VI Perl Toolkit needs to get a few extra modules added to the current perl setup that is by default installed on Mac OS X. In order to get these modules we use CPAN.
Both have some prerequisites of their own and in this case it is the same for both.
CPAN has some prerequisites of its own that we are going to have to satisfy first.


Your system must have "make" installed.
The main issue is that your system must have "make" installed.
The most straightforward way to get that package installed is to take your original OS X installation disk and install Developer Tools (XcodeTools.mpkg) which can be found under Option Installs on the DVD.
The most straightforward way to get that package installed is to take your original OS X installation disk and install Developer Tools (XcodeTools.mpkg) which can be found under Option Installs on the DVD.
Just keep the default settings and you'll be fine.
Just keep the default settings and you'll be fine.


It is a bit big though (over 2GB) so it is a steep requirement for just getting the VI Perl toolkit to work OK. If you don't have the space, the part that is needed is the BSD "make" command and a number of other commands. It should be sufficient to install the UNIX Development Support (or BSD SDK) sub-package of the Developer Tools.
It is a bit big though (over 2GB) so it is a steep requirement for just getting the VI Perl toolkit to work OK. If you don't have the space, the part from the developer tools that is needed is the BSD "make" command and a number of other commands. It should be sufficient to install the UNIX Development Support (or BSD SDK) sub-package of the Developer Tools.


== Getting the Perl VI Toolkit SDK ==
== Getting the Perl VI Toolkit SDK ==
Line 40: Line 38:
  Warning: prerequisite UUID 0.03 not found.
  Warning: prerequisite UUID 0.03 not found.
  Writing Makefile for VIPerlToolkit
  Writing Makefile for VIPerlToolkit
The warnings we see here are the modules we need to install in perl that are missing for the toolkit to work.
The warnings we see here are the modules we need to install for perl that are missing in order for getting the toolkit to work.
So we are going to install these modules first, before we can continue with our main installation.
So we are going to install these modules first, before we can continue with our main installation.


== Installing missing perl dependencies ==
== Installing missing perl dependencies ==
So now we need to setup CPAN or MacPorts unless you already have it working, in that case you can skip the installation part.
So now we need to setup CPAN unless you already have CPAN working, in that case you can skip the installation part.


=== CPAN: Is /usr/local setup? ===
=== CPAN: Is /usr/local setup? ===
By default cpan will try to install some documentation under the /usr/local folder, so this folder has to exist and it needs to have the correct ownership privileges setup.
By default cpan will try to install some documentation under the /usr/local folder, so this folder has to exist and it needs to have the correct ownership privileges setup.
See if the folder already exists:
Check if the folder already exists:
  $ ls /usr/
  $ ls /usr/
  X11 bin lib sbin standalone
  X11 bin lib sbin standalone
Line 58: Line 56:
  $ sudo mkdir /usr/local
  $ sudo mkdir /usr/local
  Password:
  Password:
So now we create the folder, but as you will see its owned by root and we can't install our packages in there unless we allow our user.  
So now we created the folder, but as you will see it is owned by root and we can't install our packages in there unless we allow our user.  
  $ ls -alh /usr/local
  $ ls -alh /usr/local
  total 0
  total 0
Line 71: Line 69:


=== CPAN: Configuration ===
=== CPAN: Configuration ===
With the developer tools setup now you have to configure CPAN. You can also use this step if you want to change your CPAN configuration.
With the developer tools setup you now have to configure CPAN. You can also use this step if you want to change your CPAN configuration.
Configuring CPAN makes sure that the tools finds the necessary commands on your system (make et al). To do that, run:
Configuring CPAN makes sure that the tools find the necessary commands on your system (make et al). To do that, run:


  perl -MCPAN -e shell
  perl -MCPAN -e shell
Line 93: Line 91:
=== CPAN: Installing the VI Perl Toolkit dependencies ===
=== CPAN: Installing the VI Perl Toolkit dependencies ===


Now we'll get the missing dependencies by running them one by one. We could add all of these on a single line, but we want it to be easy to see if the install was successful so we are running them one by one.  
Now we'll get the missing dependencies by running them one by one. We could add all of these on a single line, but we want it to be easy to see if the install was successful. This is why we are running them one by one.  
  cpan Class::MethodMaker
  cpan Class::MethodMaker
this should now end with:
this should now end with:
Line 111: Line 109:
  cpan UUID
  cpan UUID
Which down here installed fine too, so now we can finally get back to installing the VI Perl Toolkit.
Which down here installed fine too, so now we can finally get back to installing the VI Perl Toolkit.
=== Setting up MacPorts ===
Go to the [http://www.macports.org/install.php Macports install page] and download the .dmg file for your environment and run the installer.
=== MacPorts: Installing the VI Perl Toolkit dependencies ===
sudo port install p5-class-methodmaker
On my Snow Leopard machine, this dragged in a complete new version of Perl (5.8.9), very nice.
Then we need Crypt::SSLeay
sudo port install p5-crypt-ssleay
and SOAP::Lite
sudo port install p5-soap-lite
Finally UUID
sudo port install p5-uuid
Now as I said it pulled in its own perl environment... so it turns out that we need to add another module which is missing.
sudo part install p5-xml-libxml
Woww this was quick and we can now get back to installing the VI Perl Toolkit, but first close your terminal as you need to restart that one in order to use the new Perl version installed in /opt/local/bin instead of the default one which is still in /usr/bin


== Install VI Perl Toolkit ==
== Install VI Perl Toolkit ==
Line 138: Line 118:


That UUID is not yet version 0.03 seems to be OK (On Snow Leopard it is 0.04)
That UUID is not yet version 0.03 seems to be OK (On Snow Leopard it is 0.04)
With this version of the toolkit, there are no tests defined for the make file so install it directly:
With this version of the toolkit, there are no tests defined for the make file so we are going to install it directly:


  sudo make install
  sudo make install
1,274

edits