On 03/05/2012 01:17 PM, Joschi Brauchle wrote:
On 03/05/2012 10:51 AM, Stephan Kulow wrote:
On 05.03.2012 10:41, Joschi Brauchle wrote:
Hello everyone,
I have a question/problem with Perl packages and BuildRequires when building for SLES(SP2).
The problem comes up with multiple packages when trying to build them for SLES, let's look at perl-HTTP-BrowserDetect from devel:languages:perl for example.
The spec files includes: --- BuildRequires: perl(Module::Build)>= 0.3601 --- and the build log clearly states (see https://build.opensuse.org/package/rawlog?arch=x86_64&package=perl-HTTP-Brow...)
that it is being installed: --- installing perl-Module-Build-0.36.07-4.1 --- but still, the build fails with: --- Module::Build version 0.3601 required--this is only version 0.280801 at Build.PL line 5. ---
As far as I understand, "Module::Build" v0.280801 is already installed by default under SLES11SP2 and the newer required version 0.3607 is not found OR the older version is found first by the script "Build.pl".
That's the way perl 5.10 works - if perl is bundled with a module it always wins, even if you have installed an update as extra module.
It was fixed in 5.12, but it won't help you with 5.10/ SLES11.
Greetings, Stephan
Ah, ok, thanks for this information.
I was able to get around the problem now using the following lines in the spec file: --- %if 0%{?sles_version} export PERL5LIB=%{perl_vendorlib}:%{perl_sitelib} %endif --- which prepends the vendor and site library paths to the @INC for SLES. This way, the updated extra modules get loaded.
I'm by no means a perl expert, thus: Are there any downsides/severe problems to be expected using this approach?
Thanks again.
Coming back to this problem: Probably since the last OBS update, my package is now in state "unresolvable" with the message "conflict for provider of perl(Module::Build) >= 0.3601, (provider perl-Module-Build is obsoleted by installed perl)". The error message *would* be correct, if one does not change the PERL5LIB path to search vendorlib first (as is done with the lines quoted above). Actually the package in question was building fine previously... but now OBS refuses to even start building. Looking at the build results of the "devel:languages:perl" project, more than 2000 packages are "unresolvable" for SLES11 and SLES11SP2 with the same kind of problem. Is that how it's gonna stay for now? If so, OBS has become useless for building perl packages for SLES11+ that have BuildRequires on newer modules than provided by perl 5.10.0. Best regards, J Brauchle