<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hello,</p>
<p>I have tried compiling Unbound V1.6.0 --with-pythonmodule on Ubuntu 16.04 and CentOS7 and after a few days I haven't got it working yet!</p>
<p>If I install the version that comes from the package managers in Ubuntu (1.5.8) then that works without issue.</p>
<p>When I build the python module in version 1.6.0 it creates the module, but then when I run unbound it can't find it.</p>
<pre class="lang-py prettyprint prettyprinted"><span style="color: #0000ff;"><code><span class="pun">[</span><span class="lit">1486464444</span><span class="pun">]</span><span class="pln"> unbound</span><span class="pun">[</span><span class="lit">22131</span><span class="pun">:</span><span class="lit">0</span><span class="pun">]</span><span class="pln"> notice</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Start</span><span class="pln"> of unbound </span><span class="lit">1.6</span><span class="pun">.</span><span class="lit">0.</span><span class="pln">
</span><span class="pun">[</span><span class="lit">1486464444</span><span class="pun">]</span><span class="pln"> unbound</span><span class="pun">[</span><span class="lit">22131</span><span class="pun">:</span><span class="lit">0</span><span class="pun">]</span><span class="pln"> warning</span><span class="pun">:</span><span class="pln"> did </span><span class="kwd">not</span><span class="pln"> exit gracefully last time </span><span class="pun">(</span><span class="lit">21788</span><span class="pun">)</span><span class="pln">
</span><span class="typ">Could</span><span class="pln"> </span><span class="kwd">not</span><span class="pln"> find platform independent libraries </span><span class="pun"><</span><span class="pln">prefix</span><span class="pun">></span><span class="pln">
</span><span class="typ">Could</span><span class="pln"> </span><span class="kwd">not</span><span class="pln"> find platform dependent libraries </span><span class="pun"><</span><span class="pln">exec_prefix</span><span class="pun">></span><span class="pln">
</span><span class="typ">Consider</span><span class="pln"> setting $PYTHONHOME to </span><span class="pun"><</span><span class="pln">prefix</span><span class="pun">>[:<</span><span class="pln">exec_prefix</span><span class="pun">>]</span><span class="pln">
</span><span class="typ">Traceback</span><span class="pln"> </span><span class="pun">(</span><span class="pln">most recent call last</span><span class="pun">):</span><span class="pln">
  </span><span class="typ">File</span><span class="pln"> </span><span class="str">"<string>"</span><span class="pun">,</span><span class="pln"> line </span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">in</span><span class="pln"> </span><span class="pun"><</span><span class="pln">module</span><span class="pun">></span><span class="pln">
</span><span class="typ">ImportError</span><span class="pun">:</span><span class="pln"> </span><span class="typ">No</span><span class="pln"> module named distutils</span><span class="pun">.</span><span class="pln">sysconfig
</span><span class="typ">Traceback</span><span class="pln"> </span><span class="pun">(</span><span class="pln">most recent call last</span><span class="pun">):</span><span class="pln">
  </span><span class="typ">File</span><span class="pln"> </span><span class="str">"<string>"</span><span class="pun">,</span><span class="pln"> line </span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">in</span><span class="pln"> </span><span class="pun"><</span><span class="pln">module</span><span class="pun">></span><span class="pln">
</span><span class="typ">NameError</span><span class="pun">:</span><span class="pln"> name </span><span class="str">'distutils'</span><span class="pln"> </span><span class="kwd">is</span><span class="pln"> </span><span class="kwd">not</span><span class="pln"> defined
</span><span class="typ">Traceback</span><span class="pln"> </span><span class="pun">(</span><span class="pln">most recent call last</span><span class="pun">):</span><span class="pln">
  </span><span class="typ">File</span><span class="pln"> </span><span class="str">"<string>"</span><span class="pun">,</span><span class="pln"> line </span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">in</span><span class="pln"> </span><span class="pun"><</span><span class="pln">module</span><span class="pun">></span><span class="pln">
</span><span class="typ">ImportError</span><span class="pun">:</span><span class="pln"> </span><span class="typ">No</span><span class="pln"> module named unboundmodule</span></code></span></pre>
<p>I have tried various fixes including specifying the paths in the config, and trying with python 3.5 instead of 2.7 but I keep getting the same issue. I also made a symbolic link to the file in tot he unbound folder, but that still showed the same error.</p>
<p>I've asked the same here:</p>
<p><a href="http://askubuntu.com/questions/880749/cant-install-unbound-dns-server-with-pythonmodule" target="_blank" rel="noreferrer">http://askubuntu.com/questions/880749/cant-install-unbound-dns-server-with-pythonmodule</a></p>
<p>I am willing to pay for someone to have a look at my server. All I need is server running Ubuntu with Unbound v 1.6.0 working with the python module. Happy to pay an hourly rate or just pay a fixed amount if I could get some help! I've built a large App that depends on this, and 5.8 was working perfectly.</p>
<p>I've tried:</p>
<p><span style="color: #000080;">./configure --with-pythonmodule</span></p>
<p>and various mixture ending in</p>
<p><span style="color: #000080;">./configure --prefix=/usr --sysconfdir=/etc  --disable-static --with-pythonmodule --with-pyunbound --with-pidfile=/run/unbound.pid PYTHON_LDFLAGS="-lpython2.7" PYTHON_VERSION="2.7"</span></p>
<p>They all show the same error that the module can't be found.</p>
<p>I did get a version working when targeting 3.5, but then it looks like the module has an issue with encoding between C and Python. I've submitted a bug about that one which shows the error:</p>
<p><span style="color: #000080;">  File "/opt/arkdns/arkdns/__init__.py", line 85, in operate</span><br /><span style="color: #000080;">    name = qstate.qinfo.qname_str</span><br /><span style="color: #000080;">  File "/usr/lib/python3/dist-packages/unboundmodule.py", line 132, in _get_qname_str</span><br /><span style="color: #000080;">    def _get_qname_str(self): return dnameAsStr(self.qname)</span></p>
<p><span style="color: #000080;">TypeError: in method 'dnameAsStr', argument 1 of type 'char const *'</span></p>
<p> </p>
<p>I'm presuming the 2.7 issue is just something to do with my ./configure for Ubuntu?</p>
<p>Kind Regards,</p>
<p>Matt</p>
<div> </div>
</body></html>