0

I am trying to build an RPM of perl-Net-SNMP-XS for RHEL 7 (as I can't find a prebuilt RPM anywhere)

I followed this https://www.cyberciti.biz/faq/build-perl-module-rpm-file-with-cpanspec-on-rhel-centos/ guide to setup my build environment, which worked with no issues on a vanilla RHEL 7.7 installation.

The build of perl-Net-SNMP-XS failed though, as it has a prerequisite of perl-common-sense => 3.74, and my current version is 3.6.

So, I then tried to build the latest perl-common-sense in the same way, but it fails.

It looks like it is trying to build for x86_64, when the specfile says it is noarch. I can't figure out where it is getting mixed up (I have built RPMs before, but they have always worked, I have never had to try and debug the process)

Here is the output of rpmbuild:

# rpmbuild -ba perl-common-sense.spec -vv
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8j06XA
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf common-sense-3.74
+ /usr/bin/tar -xf -
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/common-sense-3.74.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd common-sense-3.74
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.WGrqIV
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd common-sense-3.74
+ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor
Checking if your kit is complete...
Looks good
Writing Makefile for common::sense
Writing MYMETA.yml and MYMETA.json
+ make
/usr/bin/perl sense.pm.PL sense.pm
cp sense.pm blib/arch/common/sense.pm
cp sense.pod blib/lib/common/sense.pod
Manifying blib/man3/common::sense.3pm
Manifying blib/man3/common::sense.3pm
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.Kt9goi
+ umask 022
+ cd /root/rpmbuild/BUILD
+ '[' /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64
++ dirname /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64
+ cd common-sense-3.74
+ rm -rf /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64
+ make pure_install PERL_INSTALL_ROOT=/root/rpmbuild/BUILDROOT/perl-common-sense
-3.74-1.el7.x86_64
Manifying blib/man3/common::sense.3pm
Files found in blib/arch: installing files in blib/lib into architecture depende
nt library tree
Installing /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/usr/lib6
4/perl5/vendor_perl/common/sense.pm
Installing /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/usr/lib6
4/perl5/vendor_perl/common/sense.pod
Installing /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/usr/shar
e/man/man3/common::sense.3pm
+ find /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64 -type f -nam
e .packlist -exec rm -f '{}' ';'
+ find /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64 -depth -type
 d -exec rmdir '{}' ';'
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /root/rpmbuild/BUILDROOT/perl-common-sense
-3.74-1.el7.x86_64/usr
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-di
e-limit 10000000 --dwz-max-die-limit 110000000 /root/rpmbuild/BUILD/common-sense
-3.74
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match.
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.C2Od3F
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd common-sense-3.74
+ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/00_load.t .. ok
t/01_arch.t .. ok
All tests successful.
Files=2, Tests=2,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.00 cusr  0.01 csys
 =  0.04 CPU)
Result: PASS
+ exit 0
Processing files: perl-common-sense-3.74-1.el7.noarch
error: File not found by glob: /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1
.el7.x86_64/usr/share/perl5/vendor_perl/*
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.CLeT53
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd common-sense-3.74
+ DOCDIR=/root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/usr/share/
doc/perl-common-sense-3.74
+ export DOCDIR
+ /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64
/usr/share/doc/perl-common-sense-3.74
+ cp -pr Changes /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/us
r/share/doc/perl-common-sense-3.74
+ cp -pr LICENSE /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/us
r/share/doc/perl-common-sense-3.74
+ cp -pr META.json /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/
usr/share/doc/perl-common-sense-3.74
+ cp -pr README /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el7.x86_64/usr
/share/doc/perl-common-sense-3.74
+ exit 0


RPM build errors:
    File not found by glob: /root/rpmbuild/BUILDROOT/perl-common-sense-3.74-1.el
7.x86_64/usr/share/perl5/vendor_perl/*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.