EMG 5.2.6+ and Perl plugins

Background

EMG 5 includes support for plugins written in Perl thereby eliminating the need for developing and compiling C shared libraries.

From EMG 5.2.6 embedded perl is provided statically linked into the emgd binary. This has the advantage of avoiding the dependency towards libperl.so, which complicates EMG setup process, especially for customers not even planning to use Perl plugins. The drawback of this approach is that the default search paths for Perl modules will be compiled into emgd. This, more or less, introduces the requirement that Perl is setup identically on the customer server as the setup on the server where emgd was compiled if Perl plugins with dependencies on, for example, CPAN modules will be used.

Please note that if Perl plugins will not be used or for Perl plugins without the dependency of external/CPAN modules the steps below will not be necessary.

Installing Perl 5.12.2 from source

If possible, please use the precompiled distributions at the bottom of this page. Otherwise follow the insttructions below to install Perl 5.12.2 from source code.

  • Download Perl 5.12.2 from http://www.cpan.org/src/5.0/perl-5.12.2.tar.gz
  • Extract it, for example under “/tmp”
  • Configure, compile it and install it using “./Configure -Dcc=gcc -e -d -Dprefix=/opt/perl-5.12.2-emg -Duseithreads -Dusethreads -Duselargefiles && make && make test && make install”

This will put a Perl distribution with multi-thread capabilities (important for plugins with INSTANCES > 1) in the directory “/opt/perl-5.12.2-emg”.

The “make install” part above most likely needs to be run as “root” unless “/opt” is writable as the current user. You may consider changing ownership of the directory structure to the user that emg will run as after installation, “chmod -R emg /opt/perl-5.12.2-emg”.

Additional CPAN modules can then be installed from the CPAN shell by running “/opt/perl-5.12.2-emg/bin/perl -MCPAN -e shell”.

Please note that this Perl installation will be completely separated from any other Perl installation which may already be in place on the server.

Pre-compiled Perl

The distribution must be extracted under “/opt” and will then create a directory “perl-5.12.2-emg”.

Pre-compiled Perl 5.12.2 for Linux 64-bit (12 MB) »