[openstack-dev] [os-vif]

Sriharsha Basavapatna sriharsha.basavapatna at broadcom.com
Wed Jan 10 05:54:18 UTC 2018


On Tue, Jan 9, 2018 at 10:46 PM, Stephen Finucane <sfinucan at redhat.com> wrote:
> On Tue, 2018-01-09 at 16:30 +0530, Sriharsha Basavapatna wrote:
>> On Tue, Jan 9, 2018 at 2:20 PM, Sriharsha Basavapatna
>> <sriharsha.basavapatna at broadcom.com> wrote:
>> > Hi Andreas,
>> >
>> > On Tue, Jan 9, 2018 at 12:04 PM, Andreas Jaeger <aj at suse.com>
>> > wrote:
>> > > On 2018-01-09 07:00, Sriharsha Basavapatna wrote:
>> > > > Hi,
>> > > >
>> > > > I've uploaded a patch for review:
>> > > > https://review.openstack.org/#/c/531674/
>> > > >
>> > > > This is the first time I'm submitting a patch on openstack. I'd
>> > > > like
>> > >
>> > > Welcome to OpenStack, Harsha.
>> >
>> > Thank you.
>> >
>> > > Please read
>> > > https://docs.openstack.org/infra/manual/developers.html if you
>> > > haven't.
>> >
>> > Ok, i'll read it.
>> > >
>> > > I see that your change fails the basic tests, you can run these
>> > > locally
>> > > as follows to check that your fixes will pass:
>> > >
>> > > tox -e pep8
>> > > tox -e py27
>> >
>> > I was wondering if there's a way to catch these errors without
>> > having
>> > to submit it for gerrit review.  I fixed the ones that were
>> > reported
>> > in patch-set-1; looks like there's some new ones in the second
>> > patch-set. I'll run the above commands to verify the fix locally.
>> >
>> > Thanks,
>> > -Harsha
>>
>> I installed python-pip and tox.  But when I run "tox -e pep8", I'm
>> seeing some errors:
>>
>>     building 'netifaces' extension
>>     gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
>> --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
>> -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall
>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
>> --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
>> -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNETIFACES_VERSION=0.10.6
>> -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
>>     netifaces.c:1:20: fatal error: Python.h: No such file or
>> directory
>>      #include <Python.h>
>>                         ^
>>     compilation terminated.
>>     error: command 'gcc' failed with exit status 1
>>
>>     ----------------------------------------
>> Command "/home/harshab/os-vif/.tox/pep8/bin/python2 -u -c "import
>> setuptools, tokenize;__file__='/tmp/pip-build-
>> OibnHO/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 /tmp/pip-3Hu__1-record/install-record.txt
>> --single-version-externally-managed --compile --install-headers
>> /home/harshab/os-vif/.tox/pep8/include/site/python2.7/netifaces"
>> failed with error code 1 in /tmp/pip-build-OibnHO/netifaces/
>>
>> ERROR: could not install deps
>> [-r/home/harshab/os-vif/requirements.txt,
>> -r/home/harshab/os-vif/test-requirements.txt]; v =
>> InvocationError('/home/harshab/os-vif/.tox/pep8/bin/pip install -U
>> -r/home/harshab/os-vif/requirements.txt
>> -r/home/harshab/os-vif/test-requirements.txt (see
>> /home/harshab/os-vif/.tox/pep8/log/pep8-1.log)', 1)
>> ___________________________________ summary
>> ____________________________________
>> ERROR:   pep8: could not install deps
>> [-r/home/harshab/os-vif/requirements.txt,
>> -r/home/harshab/os-vif/test-requirements.txt]; v =
>> InvocationError('/home/harshab/os-vif/.tox/pep8/bin/pip install -U
>> -r/home/harshab/os-vif/requirements.txt
>> -r/home/harshab/os-vif/test-requirements.txt (see
>> /home/harshab/os-vif/.tox/pep8/log/pep8-1.log)', 1)
>>
>> Thanks,
>> -Harsha
>
> That's happening because the 'pep8' target is installing all the
> requirements for the project in a virtualenv, and one of them needs
> Python development headers. What Linux distro are you using? On Fedora
> you can fix this like so:
>
>     sudo dnf install python-devel

Thanks Stephen, I'm using RHEL and 'yum install python-devel' resolved it.
-Harsha

>
> On Ubuntu, I think it's something like this:
>
>     sudo apt-get install python-dev
>
> Stephen
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list