Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong perl version used #13

Open
XSven opened this issue Oct 5, 2023 · 1 comment
Open

wrong perl version used #13

XSven opened this issue Oct 5, 2023 · 1 comment

Comments

@XSven
Copy link

XSven commented Oct 5, 2023

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"
@XSven
Copy link
Author

XSven commented Oct 6, 2023

After unsetting the PERL_MM_OPT environment variable I was able to build an rpm. The problem and questions (see above) with respect to the %__perl macro remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant