[OpenWrt-Devel] python ctypes.util.find_library cannot find libc
ardeleanalex at gmail.com
Mon Jan 16 07:23:27 EST 2017
Hey Andrew & 郭涛
Sorry I did not answer sooner.
@Andrew: do you have a Makefile for the python-iptables packages ?
I'd like to try to build it and see the issue. Or, are you just using
that .py file ?
Can you give a bit more input on which Python version you're using,
and which OpenWrt version?
If the issue is still present in the current packages trunk, I'd like to fix it.
And if 郭涛's fix works, we can apply it to trunk.
On Mon, Jan 16, 2017 at 6:23 AM, 郭涛 <guotao945 at gmail.com> wrote:
> I also meet this issue.
> I fixed it using below change
> 2017-01-13 0:43 GMT+08:00 Andrew McConachie <andrew at depht.com>:
>> Hi OpenWRT Devs,
>> I'm building an OpenWRT package for python-iptables for a project I'm
>> working on and getting this error message when attempting to use it.
>> import iptc
>> File "/usr/lib/python2.7/site-packages/iptc/__init__.py", line 10, in
>> from ip4tc import (is_table_available, Table, Chain, Rule, Match,
>> File "/usr/lib/python2.7/site-packages/iptc/ip4tc.py", line 13, in
>> from xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
>> File "/usr/lib/python2.7/site-packages/iptc/xtables.py", line 677, in
>> _optind = ct.c_long.in_dll(_libc, "optind")
>> AttributeError: 'NoneType' object has no attribute '_handle'
>> You can view xtables.py here if you're curious.
>> The problem is that my python-iptables package cannot find libc functions
>> using ctypes.util.find_library(). I've tried building OpenWRT using both
>> musl and eglibc but neither work. I've also tried building OpenWRT with
>> objdump and ldconfig. When I include ldconfig via 'make menuconfig' it
>> doesn't actually populate my OpenWRT image with an ldconfig binary. Maybe
>> this is the problem?
>> This bug report looks similar to my problem, but it's about MIPS and marked
>> as closed.
>> Any help or pointers would be much appreciated.
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel