Skip to content

python3.7 throws exceptions about missing getifaddrs #175

Description

@sjorge
Traceback (most recent call last):
  File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/components/discovery.py", line 179, in scan_devices
    results = await hass.async_add_job(_discover, netdisco)
  File "/opt/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/components/discovery.py", line 207, in _discover
    netdisco.scan()
  File "/opt/homeassistant/lib/python3.7/site-packages/netdisco/discovery.py", line 57, in scan
    self.mdns.start()
  File "/opt/homeassistant/lib/python3.7/site-packages/netdisco/mdns.py", line 23, in start
    self.zeroconf = zeroconf.Zeroconf()
  File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf.py", line 1724, in __init__
    interfaces = normalize_interface_choice(interfaces)
  File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf.py", line 1655, in normalize_interface_choice
    return get_all_addresses()
  File "/opt/homeassistant/lib/python3.7/site-packages/zeroconf.py", line 1645, in get_all_addresses
    for iface in ifaddr.get_adapters()
  File "/opt/homeassistant/lib/python3.7/site-packages/ifaddr/_posix.py", line 44, in get_adapters
    retval = libc.getifaddrs(ctypes.byref(addr))
  File "/opt/local/lib/python3.7/ctypes/__init__.py", line 369, in __getattr__
    func = self.__getitem__(name)
  File "/opt/local/lib/python3.7/ctypes/__init__.py", line 374, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ld.so.1: python3.7: fatal: getifaddrs: can't find symbol```


We (illumos) do have that! http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libsocket/inet/getifaddrs.c

I think we just might have to add libsocket to the linker libraries?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions