Collectd links against libperl Since Collectd compiles with -Werror, this results in: CC perl_la-perl.lo In file included from perl.c:46: In file included from /usr/local/lib/perl5/5.20/mach/CORE/perl.h:5199: /usr/local/lib/perl5/5.20/mach/CORE/inline.h:311:9: error: nonnull parameter 'pv' will evaluate to 'true' on first encounter [-Werror,-Wpointer-bool-conversion] if (pv && len > 1) { ^~ ~~ 1 error generated. Makefile:4321: recipe for target 'perl_la-perl.lo' failed gmake[3]: *** [perl_la-perl.lo] Error 1 gmake[3]: Leaving directory '/usr/home/ruben/src/collectd/src' Makefile:4741: recipe for target 'all-recursive' failed gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory '/usr/home/ruben/src/collectd/src' Makefile:3147: recipe for target 'all' failed gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory '/usr/home/ruben/src/collectd/src' Makefile:553: recipe for target 'all-recursive' failed gmake: *** [all-recursive] Error 1 Not a big issue, but I wanted to report it anyway.
Correctly report this as a net-mgmt/collectd5 issue, cc maintainers of both ports
I've made a quick patch to cover this issue. See attachment.
Created attachment 164245 [details] collectd5-perl.patch
Of course I've tested this patch in my lab: https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2015-12-14_15h32m45s/logs/collectd5-5.5.0_5.log
Thanks for the patch, but I was hoping this could be solved in libperl, since this would fix it for everyone linking against it, not just collectd. For what it's worth, I already added an option to build collectd without Werror upstream: https://github.com/collectd/collectd/commit/71e07cf654c476ab13bf30421524b442cc9ad5a7 and this will be in the next release.
Building with -Werror in production while linking with outside code is a very bad idea to begin with.
FWIW I fully agree, but unfortunately not everyone shares that opinion.
The delay was I was trying to figure out if this was something I missed when testing the last net-mgmt/collectd5 updates. However with perl5=5.18, perl5=5.20, and perl5-5.22 set as DEFAULT_VERSIONS this port builds just fine. Then I realized this was built from "/usr/home/ruben/src/collectd/src" and is not the net-mgmt/collectd5 port. What really needs to be done here? I'm not seeing a before and after "fix" from the patch as the net-mgmt/collectd5 port has been building just fine with all versions of Perl.
I opened this issue against perl, not collectd. I was indeed building collectd from its master branch. Collectd from ports builds just fine since it already patches out -Werror. The patch from comment #3 has no effect. All I'm asking is for a small fix in perl.h which fixes the warning shown in comment #1. This will benefit every program building against libperl.
(In reply to Ruben Kerkhof from comment #9) > All I'm asking is for a small fix in perl.h which fixes the warning shown in > comment #1. This will benefit every program building against libperl. All you have to do is to submit your patch upstream, have it included, and it'll be fixed in future versions of Perl.
(In reply to Ruben Kerkhof from comment #9) I hadn't seen a confirmation that this was reported to Perl upstream but as this is "not a (FreeBSD ports) bug" I'm setting this PR as such now.