Skip to content

wrong perl version used #13

Description

@XSven

After some time I am trying to use cpantorpm on AIX again. I am using perlbrew to manage multiple perl versions. The version that is currently active is 5.14.4. The following shows the last few lines of the failing cpantorpm call.

...
INFO: Attempting system command: /usr/bin/rpmbuild -ba --clean --nodeps /home/micsw/rpmbuild/SPECS/perl-Local-App-Logtail3.spec
...
Installing /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/home/micsw/perl-5.14.4/App-CPANtoRPM/lib/perl5/Local/App/Logtail3.pm
Installing /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/home/micsw/perl-5.14.4/App-CPANtoRPM/lib/perl5/Local/App/Logtail3.pod
Installing /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/home/micsw/perl-5.14.4/App-CPANtoRPM/lib/perl5/Local/App/Logtail3/Common.pm
Installing /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/home/micsw/perl-5.14.4/App-CPANtoRPM/lib/perl5/Local/App/Logtail3/DetectRotate.pm
Installing /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/opt/freeware/man/man3/Local::App::Logtail3.3
Installing /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/opt/freeware/bin/logtail3
+ find /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc -type f -name .packlist -exec rm -f {} ;
+ find /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc -type f -name *.bs -size 0 -exec rm -f {} ;
+ find /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc -depth -type d -exec rmdir {} ;
+ 2> /dev/null
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/home /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/opt
+ RPM_EC=0
+ jobs -p
+ exit 0
Processing files: perl-Local-App-Logtail3-0.001-1.noarch
error: File not found: /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/usr/opt/perl5/lib/site_perl/5.34.1/*


RPM build errors:
    File not found: /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/usr/opt/perl5/lib/site_perl/5.34.1/*
ERR:  Unable to execute /usr/bin/rpmbuild

Seemingly the operating system perl (that is 5.34.1) is used at the end which is presumably the first mistake. I have added

%__perl   /opt/perlbrew/perls/perl-5.14.4/bin/perl

to the ~/.rpmmacros file.

How could this trap be avoided?
Maybe the rpmbuild could use its -D, --define='MACRO EXPR' to set the __perl macro automatically?

Finally this doesn't solve my problem completely.

...
Processing files: perl-Local-App-Logtail3-0.001-1.noarch
error: File not found: /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/opt/perlbrew/perls/perl-5.14.4/lib/site_perl/5.14.4/*


RPM build errors:
    File not found: /var/tmp/perl-Local-App-Logtail3-0.001-1.ppc/opt/perlbrew/perls/perl-5.14.4/lib/site_perl/5.14.4/*
ERR:  Unable to execute /usr/bin/rpmbuild

Any help/idea is very much appreciated?

Some more information that will help to understand the Installing path

rpm --eval %buildroot
/var/tmp/%{NAME}-%{VERSION}-%{RELEASE}.ppc
...
PERL_MB_OPT="--install_base "/home/micsw/perl-5.14.4/App-CPANtoRPM""
PERL_MM_OPT="INSTALL_BASE=/home/micsw/perl-5.14.4/App-CPANtoRPM"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions