-
Notifications
You must be signed in to change notification settings - Fork 605
MM.pm: treat undefined mtimes as 0 to avoid warnings #24042
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
Conversation
|
It seems to me like there's some context missing here? What is different about AFAICT, mtime would only return |
|
my debug block: I get a mix of no mtime for pod and always no mtime for Makefile. The "pod file does not exist" never logs. I don't doubt there's some combination of gentoo's build sandbox and zoneminders code triggering this behavior. |
I just cloned ... but came up with nothing. That suggests the problem may be in your build sandbox. |
Sorry? I added that block into MM.pm to see what it was processing, just above the original line 147 outputs in the original post |
|
The uninitialized are being thrown during portage install phase.
MM.pm is called prior during the compile phase and logs no mtime for pod files, but doesn't throw uninitialized until later. Given gentoo's ebuild scripts, I don't believe that Makefile will ever exist within the build sandbox. We're not dependent upon it. So if we want to be surgical, Line 149 might be all we need.
Again. this is more of an annoyance pollution than actual breakage. As the build process continues post uninitialized |
Insert `// 0` for mtime comparisons so missing Makefile is treated as 0. Preserves original skip behavior while preventing "uninitialized value" warnings in numeric comparisons. Signed-off-by: Nic Boet <[email protected]>
2df2493 to
ac5c38c
Compare
|
@Leont thanks for questioning mtime. I refined the PR, this is boiling down to no Makefile present / needed during portage builds. |
|
I think that «make -f MakefilePerl» is the essential clue here. Zoneminder is explicitly giving it a silly name in the CMakeLists.txt, and then A better fix might be to pass on the Regardless of any of that, modules under |
|
Appreciate the insights. Opened Perl-Toolchain-Gang/ExtUtils-MakeMaker#479 Do we want this //0 hack as a PR or ponder further ? |
My hunch is that that is better discussed in the Perl-Toolchain-Gang issue you just opened. Here in Perl 5 Porters Land, we're concerned with the impact of ExtUtils-MakeMaker (including ExtUtils::Command::MM) on the code that ships with the Perl core distribution. ExtUtils-MakeMaker is, however, "dual-life, upstream," meaning that its primary maintenance is on CPAN and that people are free to install the latest CPAN version of the library on older versions of Perl. That means, at least in principle, that any patch/pull request you provide upstream will be assessed over a wider scope of use-cases than we would undertake here (even though the "we" in this case is often the same people). |
|
I think we do this because cmake creates a Makefile in the same directory. @nabbi are you using cmake? I don't see how any of this could work if Makefile doesn't exist. |
|
Yes; using gentoo ebuild, src_compile function calls cmake_src_compile to initiate "cmake". What I believe is happening is the CMakeLists.txt writes that file as "MakefilePerl".... then ExtUtils/Command/MM.pm throws uninitialized values as it's not finding it exactly as "Makefile". By default, that uninitialized behaviors still passes the greater than > check within MM.pm and the zoneminder build process continues, but with noise. Cross linking ZoneMinder/zoneminder#4507 so there's triangulation for others following along. |
Insert
// 0for mtime comparisons so missing pod or Makefile are treated as 0. Preserves original skip behavior while preventing "uninitialized value" warnings in numeric comparisons.This suppresses 3077 uninitialized occurrences when building ZoneMinder on Gentoo using cmake 4.1.2 perl 5.42.0
Use of uninitialized value in numeric gt (>) at /usr/lib64/perl5/5.42/ExtUtils/Command/MM.pm line 147.