Discussion:
[rt.cpan.org #93008] install failure with ubuntu / puppet
(too old to reply)
Andrew Pennebaker via RT
2014-02-13 16:26:22 UTC
Permalink
Thu Feb 13 11:26:21 2014: Request 93008 was acted upon.
Transaction: Ticket created by mcandre
Queue: PAR-Packer
Subject: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


I'm able to install several CPAN packages with Puppet, but PAR::Packer
seems to be misbehaving. The package appears to install with no error
messages, but the pp binary never installs.

Vagrantfile:

VAGRANTFILE_API_VERSION = '2'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'

# Disable tty warning
config.vm.provision :shell,
:inline => "sed -i 's/^mesg n$/tty -s \\&\\& mesg n/g' /root/.profile"

config.vm.provision :shell, path: 'upgrade-puppet.sh'

# Install puppet modules
config.vm.provision :shell, path: 'bootstrap.rb', args:
"puppetlabs-stdlib \
puppetlabs/apt \
example42/puppi \
example42/perl"

config.vm.provision :puppet do |puppet|
puppet.options = ENV['PUPPET_OPTIONS']
end
end

manifests/default.pp:

class { 'perl': }

perl::cpan::module { 'App::Ack':
require => Package['build-essential']
}

perl::cpan::module { 'Test::More': }

perl::cpan::module { 'Perl::Critic': }

perl::cpan::module { 'PAR::Packer':
require => Package['build-essential']
}

perl::cpan::module { 'WWW::Mechanize': }

Trace:

$ vagrant provision

Notice:
/Stage[main]/Main/Perl::Cpan::Module[PAR::Packer]/Exec[cpan-PAR::Packer-present]/returns:
executed successfully

$ vagrant ssh

$ which pp

$

$ which perlcritic

/usr/local/bin/perlcritic

System:

* CPAN 1.57
* Perl 5.14
* Puppet 3.4.2
* Ubuntu 12.04 Precise Pangolin
* VirtualBox 4.3.6
* Vagrant 1.4.3
* Homebrew 0.9.5
* Mac OS X 10.9.1 Mavericks
--
Cheers,

Andrew Pennebaker
www.yellosoft.us
Roderich Schupp via RT
2014-02-13 18:04:15 UTC
Permalink
Thu Feb 13 13:04:14 2014: Request 93008 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


Sorry, I know next to nothing about puppet. I assume "perl::cpan::module" installs a Perl module directly from CPAN?
Can you post a detailed log of what puppet is doing when it tries to build PAR::Packer?
Why don't you just install the corresponding Debian/Ubuntu package for PAR::Packer, libpar-packer-perl?

Cheers, Roderich
Andrew Pennebaker via RT
2014-02-14 03:30:01 UTC
Permalink
Thu Feb 13 22:30:00 2014: Request 93008 was acted upon.
Transaction: Correspondence added by mcandre
Queue: PAR-Packer
Subject: Re: [rt.cpan.org #93008] install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


I prefer to install packages through CPAN, and I don't want to make an
exception just for PAR::Packer.

The Puppet trace looks like:

$ vagrant up
Notify [Installing App::Ack] success
Notify [Installing PAR::Packer] success
...
more success
...
all success

$ vagrant ssh
***@precise64$ ack
... ack usage info
***@precise64$ pp
... pp is not available, have you tried libpar-packer-perl? ...



On Thu, Feb 13, 2014 at 1:04 PM, Roderich Schupp via RT <
Post by Andrew Pennebaker via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
Sorry, I know next to nothing about puppet. I assume "perl::cpan::module"
installs a Perl module directly from CPAN?
Can you post a detailed log of what puppet is doing when it tries to build
PAR::Packer?
Why don't you just install the corresponding Debian/Ubuntu package for
PAR::Packer, libpar-packer-perl?
Cheers, Roderich
--
Cheers,

Andrew Pennebaker
www.yellosoft.us
Roderich Schupp via RT
2014-02-14 08:39:02 UTC
Permalink
Fri Feb 14 03:39:00 2014: Request 93008 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
Post by Andrew Pennebaker via RT
I prefer to install packages through CPAN, and I don't want to make an
exception just for PAR::Packer.
PAR::Packer is kinda special, it's build process is highly unusual (as perl modules go).
For starters, on a perl installation that is supplied by a Linux distro, it requires the "perl devel" package which on Debian/Ubuntu systems is called libperl-dev.
Post by Andrew Pennebaker via RT
$ vagrant up
Notify [Installing App::Ack] success
Notify [Installing PAR::Packer] success
...
more success
...
all success
That is useless. I bet that puppet writes a detailed log of its actions somewhere (maybe you have to enable some debug option).

Cheers, Roderich
Andrew Pennebaker via RT
2014-02-15 00:03:52 UTC
Permalink
Fri Feb 14 19:03:52 2014: Request 93008 was acted upon.
Transaction: Correspondence added by mcandre
Queue: PAR-Packer
Subject: Re: [rt.cpan.org #93008] install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


Thanks for the tip about libperl-dev, that might just be the thing!


On Fri, Feb 14, 2014 at 3:39 AM, Roderich Schupp via RT <
Post by Andrew Pennebaker via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
Post by Andrew Pennebaker via RT
I prefer to install packages through CPAN, and I don't want to make an
exception just for PAR::Packer.
PAR::Packer is kinda special, it's build process is highly unusual (as
perl modules go).
For starters, on a perl installation that is supplied by a Linux distro,
it requires the "perl devel" package which on Debian/Ubuntu systems is
called libperl-dev.
Post by Andrew Pennebaker via RT
$ vagrant up
Notify [Installing App::Ack] success
Notify [Installing PAR::Packer] success
...
more success
...
all success
That is useless. I bet that puppet writes a detailed log of its actions
somewhere (maybe you have to enable some debug option).
Cheers, Roderich
--
Cheers,

Andrew Pennebaker
www.yellosoft.us
Andrew Pennebaker via RT
2014-02-15 00:31:38 UTC
Permalink
Fri Feb 14 19:31:37 2014: Request 93008 was acted upon.
Transaction: Correspondence added by mcandre
Queue: PAR-Packer
Subject: Re: [rt.cpan.org #93008] install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


Yep, that seems to work!

https://github.com/mcandre/mcandre-ubuntu/blob/b0bb8924c48333c49e2b3970aa5a910404533ea0/manifests/default.pp#L347-L372


On Fri, Feb 14, 2014 at 7:03 PM, Andrew Pennebaker <
Post by Andrew Pennebaker via RT
Thanks for the tip about libperl-dev, that might just be the thing!
On Fri, Feb 14, 2014 at 3:39 AM, Roderich Schupp via RT <
Post by Andrew Pennebaker via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
Post by Andrew Pennebaker via RT
I prefer to install packages through CPAN, and I don't want to make an
exception just for PAR::Packer.
PAR::Packer is kinda special, it's build process is highly unusual (as
perl modules go).
For starters, on a perl installation that is supplied by a Linux distro,
it requires the "perl devel" package which on Debian/Ubuntu systems is
called libperl-dev.
Post by Andrew Pennebaker via RT
$ vagrant up
Notify [Installing App::Ack] success
Notify [Installing PAR::Packer] success
...
more success
...
all success
That is useless. I bet that puppet writes a detailed log of its actions
somewhere (maybe you have to enable some debug option).
Cheers, Roderich
--
Cheers,
Andrew Pennebaker
www.yellosoft.us
--
Cheers,

Andrew Pennebaker
www.yellosoft.us
Roderich Schupp via RT
2014-02-15 12:02:26 UTC
Permalink
Sat Feb 15 07:02:24 2014: Request 93008 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
Post by Andrew Pennebaker via RT
Yep, that seems to work!
https://github.com/mcandre/mcandre-
ubuntu/blob/b0bb8924c48333c49e2b3970aa5a910404533ea0/manifests/default.pp#L347-
L372
Great.

BTW, I assume the "perl::cpan::module" in your puppet files is
from module example42/perl on Puppet Forge?
This manifest uses "cpan ..." to install modules. Unfortunately it's exit code
is not reliable:

# Debian package libperl-dev NOT installed
$ cpan PAR::Packer ; echo "==> $?"
CPAN: Storable loaded ok (v2.41)
Reading '/home/roderich/.local/share/.cpan/Metadata'
...
CPAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.017.tar.gz
...
cc main.o -s -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lc -lcrypt -o ./par
/usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status
make[1]: *** [par] Error 1
make[1]: Leaving directory `/home/roderich/.local/share/.cpan/build/PAR-Packer-1.017-kmq8nu/myldr'
make: *** [subdirs] Error 2
RSCHUPP/PAR-Packer-1.017.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
==> 0


But there's also "perl-module" which uses "cpanm ..." which gets it right:


$ cpanm PAR::Packer ; echo "==> $?"
--> Working on PAR::Packer
Fetching http://www.cpan.org/authors/id/R/RS/RSCHUPP/PAR-Packer-1.017.tar.gz ... OK
Configuring PAR-Packer-1.017 ... OK
Building and testing PAR-Packer-1.017 ... FAIL
! Installing PAR::Packer failed. See /home/roderich/.cpanm/work/1392465396.26842/build.log for details. Retry with --force to force install it.
==> 1


Cheers, Roderich
Andrew Pennebaker via RT
2014-02-15 20:00:19 UTC
Permalink
Sat Feb 15 15:00:19 2014: Request 93008 was acted upon.
Transaction: Correspondence added by mcandre
Queue: PAR-Packer
Subject: Re: [rt.cpan.org #93008] Resolved: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: resolved
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


I'm able to install and use perlcritic with cpan, but when I try to run pp,
I get two errors, even though cpan reports success for the package.

1. pp is not added to PATH. I have to manually add /root/perl5/bin to PATH
in my bash profile.

2. When I try to run pp, it says:

$ pp

Can't locate pp.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl .) at /root/perl5/bin/pp line 8.

BEGIN failed--compilation aborted at /root/perl5/bin/pp line 8.


On Sat, Feb 15, 2014 at 7:02 AM, Roderich Schupp via RT <
Post by Andrew Pennebaker via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.
--
Cheers,

Andrew Pennebaker
www.yellosoft.us
Andrew Pennebaker via RT
2014-02-15 20:16:38 UTC
Permalink
Sat Feb 15 15:16:37 2014: Request 93008 was acted upon.
Transaction: Correspondence added by mcandre
Queue: PAR-Packer
Subject: Re: [rt.cpan.org #93008] Resolved: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: resolved
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >


I was able to fix several problems by switching from cpan to cpanm. Go
figure.


On Sat, Feb 15, 2014 at 3:00 PM, Andrew Pennebaker <
Post by Andrew Pennebaker via RT
I'm able to install and use perlcritic with cpan, but when I try to run
pp, I get two errors, even though cpan reports success for the package.
1. pp is not added to PATH. I have to manually add /root/perl5/bin to PATH
in my bash profile.
$ pp
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl .) at /root/perl5/bin/pp line 8.
BEGIN failed--compilation aborted at /root/perl5/bin/pp line 8.
On Sat, Feb 15, 2014 at 7:02 AM, Roderich Schupp via RT <
Post by Andrew Pennebaker via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.
--
Cheers,
Andrew Pennebaker
www.yellosoft.us
--
Cheers,

Andrew Pennebaker
www.yellosoft.us
Roderich Schupp via RT
2014-02-16 15:08:16 UTC
Permalink
Sun Feb 16 10:08:15 2014: Request 93008 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: install failure with ubuntu / puppet
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@gmail.com
Status: resolved
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93008 >
Post by Andrew Pennebaker via RT
I was able to fix several problems by switching from cpan to cpanm. Go
figure.
I suspect that you have a broken CPAN.pm configuration file that installs stuff below /root/perl5 - check /root/.cpan/CPAN/MyConfig.pm
Maybe example42/perl installed this config file as a side effect.

Cheers,Roderich

Loading...