timbunce / devel-nytprof

Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
http://blog.timbunce.org/tag/nytprof/
67 stars 51 forks source link

Build time warnings 20210409 #157

Closed jkeenan closed 3 years ago

jkeenan commented 3 years ago

This pull request partially addresses the problem described in https://github.com/timbunce/devel-nytprof/issues/145. It cherry-picks two commits submitted by @rurban in 2019 as part of https://github.com/timbunce/devel-nytprof/pull/134.

My local experimentation suggests that these commits eliminate all warnings but one that are generated during make when both perl and Devel::NYTProf are compiled with recent versions of clang, such as version 9 or 10.

Since those warnings are not generated during make when perl and Devel::NYTProf are compiled with recent gcc, the patches don't change anything in that case.

When, however, I compiled perl with a recent version of g++ and then tried to install Devel::NYTProf, I found that the build processed failed with one of the module's prerequisites, a bug which I have reported upstream.

It would be good to have these patches reviewed by people more familiar with C than I am. However, we'll defer application for a while in the hope that we can get the prerequisite's bug fixed.

Thank you very much. Jim Keenan

jkeenan commented 3 years ago

I've come to realize that the failure of prerequisite Cpanel-JSON-XS doesn't really prevent me from trying to run perl Makefile.PL && make with a perl built with g++ and inspecting the warnings. It only prevents certain tests from passing.

So I've tried to do that, and also tried to apply one of @rurban's commits that was intended to deal with such build-time warnings -- but I'm still getting build-time warnings.

So what I'm going to do is to merge this pull request into master and then open a separate bug ticket for warnings thrown when building with g++. In that way, we'll get the benefit of the patches in this p.r. for clang builds and can then focus more clearly on g++ build warnings.