On 7/22/26 10:07 AM, Patrick Dupre via users wrote:
Here is the problem.
You installed (recompiled) the official version of perl-Alien-Build
(perl-Alien-Build-2.84-5.fc44.noarch)
but it differs from the version available in the CPAN project
In addition, in https://www.rpmfind.net/linux/RPM/fedora/44/ppc64le/p/ perl-Alien-Build-2.84-5.fc44.noarch.html <https://www.rpmfind.net/linux/ RPM/fedora/44/ppc64le/p/perl-Alien-Build-2.84-5.fc44.noarch.html>
I read

Thu Feb 19 2026 Petr Pisar <[email protected]> - 2.84-5
   - Remove CMake plugin if CMake has version 4 (bug #2440944)

It mean that I not have CMake.pm which is necessary to build
perl-Alien-PLplot

+ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
Alien::Build::Plugin::PkgConfig::Negotiate> Using PkgConfig plugin: 
PkgConfig::LibPkgConf
Can't locate Alien/Build/Plugin/Build/CMake.pm in @INC (you may need to install 
the Alien::Build::Plugin::Build::CMake module) (@INC entries checked: 
/home/pdupre/perl_lib/x86_64-linux-thread-multi 
/home/pdupre/perl_lib/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.42 
/usr/local/share/perl5/5.42 /usr/lib64/perl5/vendor_perl 
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at 
/usr/share/perl5/vendor_perl/Alien/Build.pm line 1363.
error: Bad exit status from /var/tmp/rpm-tmp.LGncrG (%build)

How can I fix this issue?
OK, I am definitely just an old sysadmin, not a developer, but here's what I wound up figuring out.

I already had all the development groups installed using:

sudo dnf group install development-tools
sudo dnf install rpmdevtools

Then I ran rpmdev-setup, which created my ~/.rpmmacros

I added myself as a packager using:
echo '%packager Thomas Cameron <[email protected]>' >> ~/.rpmmacros

Then I created the spec file:

sudo dnf install cpanspec
cd ~/rpmbuild/SPECS/
cpanspec Alien::Build

Once that was built, I ran this to make sure all the build dependencies were installed:

sudo dnf builddep perl-Alien-Build.spec

Then I ran:

rpmbuild -ba SPECS/perl-Alien-Build.spec

It bombed, and I figured out through many tries and a little help from Gemini that I needed to edit the ~/rpmbuild/SPECS/perl-Alien-Build.spec file to look like this:

Name:           perl-Alien-Build
Version:        2.84
Release:        1%{?dist}
Summary:        Build external dependencies for use in CPAN
License:        GPL-1.0-or-later OR Artistic-1.0-Perl
URL:            https://metacpan.org/dist/Alien-Build
Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Build-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  make
BuildRequires:  perl-generators
BuildRequires:  perl-interpreter
BuildRequires:  perl(:VERSION) >= 5.8.4
BuildRequires:  perl(Capture::Tiny) >= 0.17
BuildRequires:  perl(Digest::SHA)
BuildRequires:  perl(ExtUtils::CBuilder)
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.64
BuildRequires:  perl(ExtUtils::ParseXS) >= 3.30
BuildRequires:  perl(FFI::CheckLib) >= 0.11
BuildRequires:  perl(File::chdir)
BuildRequires:  perl(File::Which) >= 1.10
BuildRequires:  perl(JSON::PP)
BuildRequires:  perl(List::Util) >= 1.33
BuildRequires:  perl(parent)
BuildRequires:  perl(Path::Tiny) >= 0.077
BuildRequires:  perl(Test2::API) >= 1.302096
BuildRequires:  perl(Test2::V0) >= 0.000121
BuildRequires:  perl(Text::ParseWords) >= 3.26
Requires:       perl(Capture::Tiny) >= 0.17
Requires:       perl(ExtUtils::MakeMaker) >= 6.64
Requires:       perl(ExtUtils::ParseXS) >= 3.30
Requires:       perl(FFI::CheckLib) >= 0.11
Requires:       perl(File::Which) >= 1.10
Requires:       perl(List::Util) >= 1.33
Requires:       perl(Path::Tiny) >= 0.077
Requires:       perl(Test2::API) >= 1.302096
Requires:       perl(Text::ParseWords) >= 3.26

%description
This module provides tools for building external (non-CPAN) dependencies
for CPAN. It is mainly designed to be used at install time of a CPAN
client, and work closely with Alien::Base which is used at runtime.

%prep
%setup -q -n Alien-Build-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}

%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot} INSTALLDIRS=vendor
find %{buildroot} -type f -name .packlist -delete
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;

%check
make test

%files
%doc author.yml Changes Changes.Alien-Base Changes.Alien-Base-Wrapper Changes.Alien-Build-Decode-Mojo Changes.Test-Alien perlcriticrc README spellcheck.ini SUPPORT weaver.ini
%license LICENSE
%{perl_vendorlib}/Alien*
%{perl_vendorlib}/Test/Alien*
%{perl_vendorlib}/alienfile.pm
%{_mandir}/man3/*

%changelog
* Wed Jul 22 2026 Thomas Cameron <[email protected]> 2.84-1
- Specfile autogenerated by cpanspec 1.78.

The diff looks like this:

sysadmin@dev:~/rpmbuild$ diff SPECS/perl-Alien-Build.spec.orig SPECS/perl-Alien-Build.spec
7a8
> BuildArch:    noarch
50,52c51,54
< %{make_install}
< find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
< %{_fixperms} $RPM_BUILD_ROOT/*
---
> rm -rf %{buildroot}
> make pure_install DESTDIR=%{buildroot} INSTALLDIRS=vendor
> find %{buildroot} -type f -name .packlist -delete
> find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
60,61c62,64
< %{perl_vendorarch}/auto/*
< %{perl_vendorarch}/Alien*
---
> %{perl_vendorlib}/Alien*
> %{perl_vendorlib}/Test/Alien*
> %{perl_vendorlib}/alienfile.pm

Once I did that, it built fine:

sysadmin@dev:~/rpmbuild$ tree
.
├── BUILD
├── RPMS
│   └── noarch
│       └── perl-Alien-Build-2.84-1.fc44.noarch.rpm
├── SOURCES
│   └── Alien-Build-2.84.tar.gz
├── SPECS
│   ├── perl-Alien-Build.spec
│   └── perl-Alien-Build.spec.orig
└── SRPMS
    └── perl-Alien-Build-2.84-1.fc44.src.rpm

Now, I did not sign the package or anything like that. I am also absolutely NOT a developer, but I love figuring out how to build packages. I'm not terribly good at it, though, sorry.

I'm just posting this in the hopes that it's helpful.

--
Cheers!
Thomas
--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to