Created attachment 159084 [details] Patch file fixing net-mgmt/colletd5 port to build with debug python The configure file of collectd depends on calling some python routines to obtain the version, library flags and so on. Example: python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1` Now on a normal python instance this returns: -L. -lpython2.7 But on a debug enabled python it results in: -L. -lpython2.7[20106 refs] The refcounts sneak in and break the configure process. A simple fix to this is the redirect stderr to /dev/null: thus the above example now becomes: python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2> /dev/null` Patch file attached with all such fixes.
Please Note that this patch is submitted for the net-mgmt/colletd5 port from the 2015q2 branch.
(In reply to Suraj Ravichandran from comment #0) Hello, Your patch bumps PORTREVISION for net-mgmt/collectd but the files you've modified are under net-mgmt/collectd5/files/. Your patch will need to be adjusted to be just net-mgmt/collectd5. Also, I don't want to see any of your time spent on this to be in vain. Bug 201514 is the net-mgmt/collectd5 update to 5.5.0. Can you check that first and see if that resolves your issue and if it doesn't ensure your patch works on top of the 5.5.0 patch?
(In reply to Suraj Ravichandran from comment #1) Please note that 2015Q2 is no longer supported.
Ok Shoul i attach relevant diff for 2015Q3 or master?
(In reply to Suraj Ravichandran from comment #4) Always against HEAD, and set the merge-quarterly flag to ? here if it needs to be merged
Also, is the fix for this going to be submitted upstream? If so please include breadcrumbs/comments in the patch header to include upstream references/links
Yes, I think this patch sholud be tested against new collectd-5.5.0. Beacuse collectd developers stopped working on collectd4 branch, so I think this port will be deleted (maybe after my vactions :-) ). Bust first https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201514 must be committed to ports tree.
Thanks for upgrading to 5.5.0. I just tested it with DEBUG enabled python and it still does not work. I have made the relevant patch and this time it is with respect to HEAD and also I have not goofed up regarding changing the wrong port's PORTREVISION :-P I will upload the patch in an hour or so. In the meanwhile what am I supposed to add in the header w.r.t to this comment from @Kubilay Kocak """Also, is the fix for this going to be submitted upstream? If so please include breadcrumbs/comments in the patch header to include upstream references/links""" And yes it would be nice if it were upstreamed eventually. as for the merge-quaterly flag it is set to ? by me now. Thanks.
Created attachment 159751 [details] Revised Patch file fixing net-mgmt/collectd5 port (version 5.50) to build with python plugin when using debug enabled python
Well, I have to merge your patch with new issue bug #202327. So I think it is good idea to close one of these bugs
(In reply to Krzysztof from comment #10) Sure, as long as it goes in. If I am to close this bug (if you can close it that you be best) then what status,etc should I provide it with so that it can show that it links up with that other one.
Your patch is merged into bug #202327, so I will (try to) close this one.
Well, this bug should be closed. I'm not able to do it :-))) I hope that someone could :-)
A commit references this bug: Author: brd Date: Fri Aug 14 19:30:13 UTC 2015 New revision: 394253 URL: https://svnweb.freebsd.org/changeset/ports/394253 Log: Add native disk metrics thanks to delphij, Ruben Kerkhof <ruben@rubenkerkhof.com>, and myself. [1] Fix Python option when building with debug enabled python [2] PR: 202327 [1] PR: 201773 [2] Submitted by: brd [1] Submitted by: Suraj Ravichandran <suraj@ixsystems.com> [2] Approved by: Krzysztof <ports@bsdserwis.com> (maintainer), bdrewery (mentor) Changes: head/net-mgmt/collectd5/Makefile head/net-mgmt/collectd5/files/patch-configure.ac head/net-mgmt/collectd5/files/patch-src__Makefile.am head/net-mgmt/collectd5/pkg-plist
Committed, thanks!
Thanks @Brad and @Krzysztof!