Intuition failure leading to failure to create distribution.

35 views
Skip to first unread message

Steve Cookson

unread,
Jul 20, 2013, 7:11:35 PM7/20/13
to citru...@googlegroups.com
Hi Guys,

I'm suffering from a sort of intuition failure with CitrusPerl.  Everyone says its the way to go, but I don't find I am getting what I expect. 

I think the concept is great, in fact I have been told the concept is great by several people who say how well it works.  So I'm trying to use it.

This is what I have done:

I'm using Kubuntu 12.04 LTS.

I haven't done a clean install, maybe I should have, but at this stage I felt I could run it in parallel to my system perl against which I have build my current application.  The doc says this should be ok.

1) Download citrusperl-ubuntults-51603-linux-x64-018.tar.gz into Downloads folder
2) Extract into ~ so I have ~/perl ...

3) ~/perl/bin/relocateperl

4) apt-get install freeglut3

5) apt-get install libwebkitgtk-1.0


6) ~/perl/bin/citrusvars.sh

7) cd ~

8) ./myapp.pl

Now I felt that this should crash since I haven't installed any of the CPAN module, however it ran beautifully.

Ok, well the modules are still there, just further down the path, maybe that's ok.

So I install all the CPAN modules I need and they all say 'latest version' and don't install.

Hmmm... 

Ok, so I install using force cpan -if foo bar etc.

I start citrusutils and I hope that the new cpan modules I have installed will be on the list, but they aren't.  Ok, well that's probably because only 'supported' modules are on the list.

So I create a distribution to see what happens.  I don't know where the distribution will be located, but it will probably tell me whan I run it.

Running ......

2013-07-20 20:08:39 : Error : Failed to copy /home/image/perl/temp/customperl-ubuntults-51603-linux-x64-018.tar.gz to /home/image/perl/distribution/customperl-ubuntults-51603-linux-x64-018.tar.gz at /home/image/perl/vendor/lib/Citrus/Dist/Create.pm line 581.

2013-07-20 20:08:39 : Error : The task did not complete successfully.
2013-07-20 20:08:39 : Error : Failed to create distribution
2013-07-20 20:08:39 : Error : The application failed attempting to create a distribution

So I feel my paradigm is not right.

Where did I go wrong.

Regards

Steve

Citrus Support

unread,
Jul 20, 2013, 8:31:46 PM7/20/13
to citru...@googlegroups.com, Steve Cookson
Hi Steve,

On 21/07/2013 00:11, Steve Cookson wrote:

> I haven't done a clean install, maybe I should have, but at this stage I
> felt I could run it in parallel to my system perl against which I have
> build my current application. The doc says this should be ok.

Citrus Perl is packaged with the idea of running it in parallel with the
system Perl. It isn't a replacement for the system Perl - so your
approach here is correct.

> 6) ~/perl/bin/citrusvars.sh

This is the start of your problems.

As Citrus Perl does not replace your system Perl, you have to have a way
of specifying that you want to use Citrus Perl.

The simplest way to do this is to get Citrus Perl first on your path,
which is what 'citrusvars.sh' does. However, you have to call it in a
specific way.

. ~/perl/bin/citrusvars.sh

Notice, this is 'dot space path-to-citrusvars'. Calling it this way in a
terminal session 'imports' the actions in the file into the current
session. In fact, the 'dot' is just a shorthand for the bash command
'source' so you could also issue

source ~/perl/bin/citrusvars.sh

Perhaps it is better explained by looking at

http://ss64.com/bash/source.html

In any case, if you want to check that your current shell / terminal has
Citrus Perl as the default, do

perl -V

You can also call Citrus Perl directly:

~perl/bin/perl/myapp.pl

and all will work OK. However, for most usage it is much simpler to open
a terminal shell and call

. ~/perl/bin/citrusvars.sh


> So I create a distribution to see what happens. I don't know where the
> distribution will be located, but it will probably tell me whan I run it.
>
> Running ......
>
> 2013-07-20 20:08:39 : Error : Failed to copy
> /home/image/perl/temp/customperl-ubuntults-51603-linux-x64-018.tar.gz to
> /home/image/perl/distribution/customperl-ubuntults-51603-linux-x64-018.tar.gz
> at /home/image/perl/vendor/lib/Citrus/Dist/Create.pm line 581.
>
> 2013-07-20 20:08:39 : Error : The task did not complete successfully.
> 2013-07-20 20:08:39 : Error : Failed to create distribution
> 2013-07-20 20:08:39 : Error : The application failed attempting to
> create a distribution

Not sure what is causing this error. The path does look a bit odd though
- unless you actually have a user called 'image'.

Best way to go forward:

Delete /home/image/perl completely.

Reinstall Citrus ( to the same location if you wish ).

Open a terminal and run:

~/perl/bin/relocateperl

Then, to make Citrus the default for the current session, do

source ~/perl/bin/citrusvars.sh

Check Citrus is now the default for this session with:

perl -V

From thereon, ./myapp.pl should initially fail and installing with cpan
should get your required modules installed in Citrus.

Regards

Mark































Reply all
Reply to author
Forward
0 new messages