PDA

View Full Version : How to Install Perl 5.8.8 on Clarke Connect



Ramage
2007-12-19, 05:49
ClarkeConnect (C-C) has perl5.8.5 linux-thread-multi installed as default, but this version causes Squeezecenter to crash when using CLI on addons such as Moose and slimfx.

To fix these problems SqueezeCenter needs Perl-5.8.8 linux-thread-multi.

My previous attempts to update C-C to perl 5.8.8 had limited success, as I had not configured the perl as multi-thread, nor accounted for C-C modules which were dependent on C-C perl libraries. There were lots of dependency problems, a real PITA especially with SC7 and some C-C modules did not work.

Eventually I got Perl-5.8.8 running correctly on my main C-C machine but to prove the method, I used a vanilla C-C 4.2 running on a virtual machine. (this will also work with C-C4.1) This is what I did:

Install a compiler.
#apt-get update
#apt-get clean
#apt-get install cc-devel

Create a new temp directory for the perl source code
#mkdir /temp
#cd /temp

Download the latest source code from www.perl.com to the temp directory, use:
#wget http://cpan.org/src/stable.tar.gz or
#wget http://cpan.org/src/perl-5.8.8.tar.gz
#tar -xzvf stable.tar.gz

A new directory /temp/perl5.8.8 will be created - go there
#cd perl-5.8.8

Install the thread-capable Perl somewhere different to the default install. To do that, use the -Dprefix argument and tell Configure not to link this new Perl as /usr/bin/perl with -Uinstallusrbinperl.

Make a directory for the newly compiled perl:
#mkdir /usr/local/bin/myperl

ensure that you are in the unpacked /temp/perl-5.8.8 directory, then:

#sh Configure -Dusethreads -Dprefix=/usr/local/bin/myperl -Uinstallusrbinperl

During the Configure run, you will need to add essential ClarkeConnect perl 5.8.5 directories to the @INC path.

To do this, respond to the prompts with a default except:

When prompted for:
"Colon-separated list of additional directories for perl to search [none]"
enter the following:- /usr/lib/perl5/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl/5.8.5

Accept all the defaults until prompted to check config.sh.

(Optional) Open config.sh in nano (or other text editor) and find "otherlibdirs", the list of directories entered above should be there, if not or there are errors edit the "otherlibdirs" line and save config.sh. (Be careful not to change anything inadvertently)

When the Configure run is complete, you can

#make
#make test
#make install

To get the new Perl to work from the default location (/usr/bin/)

Rename the existing Perl binary (for safe keeping - if needed in the future), enter:

#mv /usr/bin/perl /usr/bin/perl-old

Create a symbolic link in place of the old Perl binary which points to the new Perl binary, by entering:

#ln -s /usr/local/bin/myperl/bin/perl /usr/bin/perl

Check that permissions allow execution

Check that your version of perl is as you want it, and includes the correct directories in @INC. Use

#perl -V

When you are satisified that perl 5.8.8 is running correctly, install/update SqueezeCenter using the rpm.

I had no problems with any SqueezeCenter dependencies, and all the C-C modules run correctly.

jfalk
2007-12-21, 13:03
Thanks, Ramage. You've saved me about... oh, I don't know... six months of head-scratching.

Ramage
2007-12-21, 15:07
Thanks, Ramage. You've saved me about... oh, I don't know... six months of head-scratching.

Glad it helped

Ramage
2007-12-23, 08:43
For any ClarkeConnect users who have followed the procedure in this thread to upgrade to perl-5.8.8, be aware that if you use the new Squeezecenter rpm you will have a problem (easily fixed)
(See: http://wiki.slimdevices.com/index.cgi?SqueezeCenterRPM for info on rpm.)

Because the new rpm uses /usr/lib/perl5/vendor_perl/Slim, for some SC perl modules a link to that dir is needed in the @INC path on perl-5.8.8. This can be done by typing:

#ln -s /usr/lib/perl5/vendor_perl/Slim /usr/local/bin/myperl/lib/site_perl/Slim

Alternatively recompile perl-5.8.8 and add /usr/lib/perl5/vendor_perl/Slim to the additional directories list