Bug 1547165

Summary: perl-ExtUtils-CBuilder should require gcc
Product: [Fedora] Fedora Reporter: Paul Howarth <paul>
Component: perl-ExtUtils-CBuilderAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jose.p.oliveira.oss, jplesnik, perl-devel, ppisar, steve, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-ExtUtils-CBuilder-0.280230-3.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-14 13:00:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Howarth 2018-02-20 16:15:05 UTC
In view of the likely upcoming removal of gcc from the default buildroot, it would make sense to add gcc as a dependency of perl-ExtUtils-CBuilder, given that the entire purpose of the module is to compile the C portions of perl modules.

This would fix a significant of number of perl modules that FTBFS without gcc in the default buildroot, as can be seen by looking at the logs from the failed builds:
https://ignatenkobrain.fedorapeople.org/gcc-removal.txt

Comment 1 Petr Pisar 2018-02-21 12:32:00 UTC
I did not yet look at the problem thoroughly. I remember we had a dependency on gcc somewhere sometime and people did not like that installing Perl core modules installs gcc. I need to look into it more deeply. Because I do not want noarch packages to bring gcc into build root via some transitive dependency. Also Perl guidelines states that archfull packages should build-require perl-devel. I do not want tell people that they should build-require EU::CBuilder instead.

Comment 2 Petr Pisar 2018-02-21 12:45:20 UTC
CBuilder::Base::compile() does:

  my @cc = $self->split_like_shell($args{'C++'} ? $cf->{cxx} : $cf->{cc});
  $self->do_system(@cc, @flags, $args{source})

Should we also hard-require gcc-c++? Or do we aim to "good enough" solution?

Comment 3 Paul Howarth 2018-02-21 12:52:46 UTC
Looking at the gcc-removal.txt file, all of the failures mentioning EU::CB are failing when trying to run gcc rather than g++.

So I'm inclined to add a hard dependency on gcc (the module is pretty much useless without it) and a soft one on gcc-c++.

Comment 4 Paul Howarth 2018-02-21 12:54:52 UTC
(In reply to Petr Pisar from comment #1)
> Also Perl guidelines states that archfull packages should
> build-require perl-devel. I do not want tell people that they should
> build-require EU::CBuilder instead.

Not all archful packages use EU::CBuilder; those that don't should pull in gcc themselves, but those that do use EU::CBuilder could reasonably expect it to "just work" I think.

Comment 5 Igor Gnatenko 2018-02-22 17:03:18 UTC
I would add both dependencies.

Comment 6 Petr Pisar 2018-02-23 10:32:58 UTC
Compare to cmake bug #923024. cmake does not run-require any compiler although it defaults to C++ and dies if it cannot find g++.

I will probably add both compilers as a hard dependency.

Comment 7 Petr Pisar 2018-02-23 12:14:43 UTC
I did some tests and if we want perl-ExtUtils-CBuilder to require gcc, we need to remove dependency on ExtUtils::CBuilder from perl-Module-Build. That will break 36 packages in Fedora.

Module-Build requires ExtUtils::CBuilder in META data, but at the same time documents that Module::Build users should require ExtUtils::CBuilder explicitly.

I'm keen to go this way and fix the 36 packages. I will send an e-mail to perl-devel list the attract more attention and more ideas.

Comment 9 Petr Pisar 2018-02-28 17:21:06 UTC
There were no objections. The change is implemented in:

perl-ExtUtils-CBuilder-0.280230-3.fc29
perl-ExtUtils-MakeMaker-7.32-2.fc29
perl-Module-Build-0.42.24-6.fc29

I also removed a hard dependency on perl-devel from perl-ExtUtils-MakeMaker.

I also noticed that perl-Module-Install pulls in perl-devel and gcc transitively. I will find out why.

Comment 10 Petr Pisar 2018-03-02 13:53:43 UTC
I finished adding ExtUtils::CBuilder dependency to spec files. I omitted some of them where it came as a transitive dependency of some other already used XS-builder used module because I do not feel competent nor motivate to hunt the specific piece of line responsible for executing gcc in foreign packages. I fell little bit uneasy with this change.

Comment 11 Fedora Update System 2018-12-06 09:29:18 UTC
perl-Net-IDN-Encode-2.400-7.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b2c056d6b0

Comment 12 Fedora Update System 2018-12-07 03:22:28 UTC
perl-Net-IDN-Encode-2.400-7.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-b2c056d6b0

Comment 13 Fedora Update System 2018-12-16 02:24:30 UTC
perl-Net-IDN-Encode-2.400-7.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.