Running setup.py install for netifaces: finished with status 'error'

Bug #1618714 reported by Kevin Huynh
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Unassigned

Bug Description

The install fails on SLE12 SP1 with master branch. Never had this error on the same system before.

Installed gcc gcc-c++ kernel-devel

gcc-4.8-6.189.x86_64
gcc-c++-4.8-6.189.x86_64
kernel-devel-3.12.39-47.1.noarch

Snippet from install log

02:26:37 Running setup.py install for netifaces: finished with status 'error'
02:26:37 Complete output from command /opt/rally-upstream/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_kIttB/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kiXeRa-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/rally-upstream/include/site/python2.7/netifaces:
02:26:37 running install
02:26:37 running build
02:26:37 running build_ext
02:26:37 checking for getifaddrs...found.
02:26:37 checking for getnameinfo...found.
02:26:37 checking for IPv6 socket IOCTLs...not found.
02:26:37 checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h linux/irda.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
02:26:37 checking whether struct sockaddr has a length field...no.
02:26:37 checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un ash ec ll atmpvc atmsvc dn irda llc.
02:26:37 checking for routing socket support...no.
02:26:37 checking for sysctl(CTL_NET...) support...no.
02:26:37 checking for netlink support...yes.
02:26:37 will use netlink to read routing table
02:26:37 building 'netifaces' extension
02:26:37 gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -DNETIFACES_VERSION=0.10.5 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_IRDA_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_IRDA=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
02:26:37 netifaces.c: In function 'gateways':
02:26:37 netifaces.c:1704:22: error: 'RTNL_FAMILY_MAX' undeclared (first use in this function)
02:26:37 int def_priorities[RTNL_FAMILY_MAX];
02:26:37 ^
02:26:37 netifaces.c:1704:22: note: each undeclared identifier is reported only once for each function it appears in
02:26:37 netifaces.c:1704:7: warning: unused variable 'def_priorities' [-Wunused-variable]
02:26:37 int def_priorities[RTNL_FAMILY_MAX];
02:26:37 ^
02:26:37 error: command 'gcc' failed with exit status 1
02:26:37
02:26:37 ----------------------------------------
02:26:37 Command "/opt/rally-upstream/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_kIttB/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kiXeRa-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/rally-upstream/include/site/python2.7/netifaces" failed with error code 1 in /tmp/pip-build-_kIttB/netifaces/

Kevin Huynh (kevkha)
description: updated
Revision history for this message
Alexander Maretskiy (maretskiy) wrote :

This seems to be related to missed C headers files:

 02:26:37 netifaces.c: In function 'gateways':
 02:26:37 netifaces.c:1704:22: error: 'RTNL_FAMILY_MAX' undeclared (first use in this function)

That's probably rtnetlink.h:

http://lxr.free-electrons.com/source/include/uapi/linux/rtnetlink.h#L15

Revision history for this message
Kevin Huynh (kevkha) wrote :

It appears to be a problem in netifaces-0.10.5 but not in netifaces-0.10.4.

# pip install netifaces --no-clean

  InsecurePlatformWarning
  Using cached netifaces-0.10.5.tar.gz
Installing collected packages: netifaces
  Running setup.py install for netifaces ... error

# pip install netifaces==0.10.4 --no-clean
Collecting netifaces==0.10.4
  Using cached netifaces-0.10.4.tar.gz
Installing collected packages: netifaces
  Running setup.py install for netifaces ... done
Successfully installed netifaces-0.10.4

I looked in requirements.txt but not seeing netifaces defined here. Any ideas how to specify netifaces version for "Installing collected packages" to workaround this?

Revision history for this message
Kevin Huynh (kevkha) wrote :

Further up the log in the collecting section it used the cached as shown.

10:14:30 Collecting netifaces>=0.10.4 (from oslo.utils>=3.16.0->rally==0.5.1.dev140)
10:14:30 Using cached netifaces-0.10.5.tar.gz

Revision history for this message
Kevin Huynh (kevkha) wrote :

I cleared the pip cache but still no joy because of netifaces>=0.10.4

# rm -r ~/.cache/pip

11:49:21 Collecting netifaces>=0.10.4 (from oslo.utils>=3.16.0->rally==0.5.1.dev144)
11:49:21 Downloading netifaces-0.10.5.tar.gz

Proposed solution:

1. Fix the missing C headers file in netifaces-0.10.5
2. Supported an older version netifaces==0.10.4

Revision history for this message
Kevin Huynh (kevkha) wrote :

I was able to work around this issue by:

# zypper update
# pip install --upgrade pip
# pip install --upgrade python-openstackclient

and netifaces-0.10.5 install succeeded.

Successfully installed Babel-2.3.4 PyYAML-3.12 cliff-2.2.0 jsonpatch-1.14 keystoneauth1-2.12.1 msgpack-python-0.4.8 netifaces-0.10.5 openstacksdk-0.9.5 os-client-config-1.21.1 osc-lib-1.1.0 oslo.config-3.17.0 oslo.i18n-3.9.0 oslo.serialization-2.13.0 oslo.utils-3.16.0 positional-1.1.1 python-cinderclient-1.9.0 python-glanceclient-2.5.0 python-keystoneclient-3.5.0 python-novaclient-6.0.0 python-openstackclient-3.2.0 requests-2.11.1 rfc3986-0.4.1 stevedore-1.17.1

Revision history for this message
Andriy Kurilin (andreykurilin) wrote :

It wasn't our direct dependency :( I'm happy that issue is fixed now

Changed in rally:
status: New → Fix Released
Revision history for this message
Jorman Franzini (jorman-franzini) wrote :
Download full text (3.4 KiB)

Hi, I also have the same problem, and python-openstackclient don't resolve the problem.

  Found existing installation: netifaces 0.10.4
    Uninstalling netifaces-0.10.4:
      Successfully uninstalled netifaces-0.10.4
  Running setup.py install for netifaces ... error
    Complete output from command /opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/share/CACHEDEV1_DATA/.qpkg/Entware-ng/tmp/pip-build-VEkXNJ/netifaces/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /opt/tmp/pip-c267Az-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    checking for getifaddrs...found.
    checking for getnameinfo...found.
    checking for IPv6 socket IOCTLs...not found.
    checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h linux/irda.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
    checking whether struct sockaddr has a length field...no.
    checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un ash ec ll atmpvc atmsvc dn irda llc.
    checking for routing socket support...no.
    checking for sysctl(CTL_NET...) support...no.
    checking for netlink support...yes.
    will use netlink to read routing table
    building 'netifaces' extension
    x86_64-openwrt-linux-gnu-gcc -fno-strict-aliasing -O2 -pipe -fomit-frame-pointer -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -DNDEBUG -fno-inline -DNDEBUG -O2 -pipe -fomit-frame-pointer -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fPIC -DNETIFACES_VERSION=0.10.5 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_IRDA_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_IRDA=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/opt/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
    netifaces.c: In function 'gateways':
    netifaces.c:1704:22: error: 'RTNL_FAMILY_MAX' undeclared (first use in this function)
       int def_priorities[RTNL_FAMILY_MAX];
                          ^~~~~~~~~~~~~~~
    netifaces.c:1704:22: note: each undeclared identifier is reported only once for each function it appears in
    error: command 'x86_64-openwrt-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
  Rolling back uninstall of netifaces
Command "/opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/share/CACHEDEV1_DATA/.qpkg/Entware-ng/tmp/pip-build-VEkXNJ/netifaces/setup.py';f=getattr(tokenize, 'open', open)(__fi...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.