[Bug 201773] net-mgmt/collectd5: Fix Python option when building with debug enabled python

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 22 19:51:49 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201773

            Bug ID: 201773
           Summary: net-mgmt/collectd5: Fix Python option when building
                    with debug enabled python
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: suraj at ixsystems.com
                CC: ports at bsdserwis.com
                CC: ports at bsdserwis.com
             Flags: maintainer-feedback?(ports at bsdserwis.com)

Created attachment 159084
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=159084&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list