Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
@ 2012-01-09  7:42 yegorslists at googlemail.com
  2012-01-09  8:18 ` Peter Korsgaard
  2012-01-10 12:47 ` Peter Korsgaard
  0 siblings, 2 replies; 8+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-09  7:42 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/python-netifaces/python-netifaces.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/python-netifaces/python-netifaces.mk b/package/python-netifaces/python-netifaces.mk
index e9a7099..5bfa326 100644
--- a/package/python-netifaces/python-netifaces.mk
+++ b/package/python-netifaces/python-netifaces.mk
@@ -14,7 +14,7 @@ define PYTHON_NETIFACES_BUILD_CMDS
 	(cd $(@D); \
 		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
 		LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
-	$(HOST_DIR)/usr/bin/python setup.py build)
+	$(HOST_DIR)/usr/bin/python setup.py build -x)
 endef
 
 define PYTHON_NETIFACES_INSTALL_TARGET_CMDS
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09  7:42 [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation yegorslists at googlemail.com
@ 2012-01-09  8:18 ` Peter Korsgaard
  2012-01-09  9:57   ` Yegor Yefremov
  2012-01-10 12:47 ` Peter Korsgaard
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2012-01-09  8:18 UTC (permalink / raw)
  To: buildroot

>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:

Hi,

 yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
 yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
 yegorslists> ---
 yegorslists>  package/python-netifaces/python-netifaces.mk |    2 +-
 yegorslists>  1 files changed, 1 insertions(+), 1 deletions(-)

 yegorslists> diff --git a/package/python-netifaces/python-netifaces.mk b/package/python-netifaces/python-netifaces.mk
 yegorslists> index e9a7099..5bfa326 100644
 yegorslists> --- a/package/python-netifaces/python-netifaces.mk
 yegorslists> +++ b/package/python-netifaces/python-netifaces.mk
 yegorslists> @@ -14,7 +14,7 @@ define PYTHON_NETIFACES_BUILD_CMDS
 yegorslists>  	(cd $(@D); \
 yegorslists>  		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
 yegorslists>  		LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
 yegorslists> -	$(HOST_DIR)/usr/bin/python setup.py build)
 yegorslists> +	$(HOST_DIR)/usr/bin/python setup.py build -x)
 yegorslists>  endef

Thanks, so far so good, but it still doesn't build here:

building 'netifaces' extension
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -fno-strict-aliasing -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_GETNAMEINFO=1 -DHAVE_SIOCGIFCONF=1 -DHAVE_SIOCGIFHWADDR=1 -DHAVE_SIOCGIFADDR=1 -DHAVE_SIOCGIFFLAGS=1 -DHAVE_SIOCGIFDSTADDR=1 -DHAVE_SIOCGIFBRDADDR=1 -DHAVE_SIOCGIFNETMASK=1 -DHAVE_SOCKET_IOCTLS=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_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=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 -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.o
netifaces.c: In function 'ifaddrs':
netifaces.c:627: error: invalid type argument of '->' (have 'struct ifreq')
netifaces.c:637: error: expected ';' before 'do'
 

Where netifaces.c:627 is:

if (string_from_sockaddr (ifr->CNAME(ifr_addr), buffer, sizeof (buffer)) == 0) {

and netifaces.c:637 is:

        Py_XDECREF (dict);
        Py_XDECREF (list)
        Py_XDECREF (family);

What kind of toolchain configuration are you using?

I also notice that it detects HAVE_SOCKADDR_IN6 even though my config
doesn't have IPv6 support, which might be a problem.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09  8:18 ` Peter Korsgaard
@ 2012-01-09  9:57   ` Yegor Yefremov
  2012-01-09 10:20     ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Yegor Yefremov @ 2012-01-09  9:57 UTC (permalink / raw)
  To: buildroot

Am 09.01.2012 09:18, schrieb Peter Korsgaard:
>>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
> 
> Hi,
> 
>  yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
>  yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>  yegorslists> ---
>  yegorslists>  package/python-netifaces/python-netifaces.mk |    2 +-
>  yegorslists>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
>  yegorslists> diff --git a/package/python-netifaces/python-netifaces.mk b/package/python-netifaces/python-netifaces.mk
>  yegorslists> index e9a7099..5bfa326 100644
>  yegorslists> --- a/package/python-netifaces/python-netifaces.mk
>  yegorslists> +++ b/package/python-netifaces/python-netifaces.mk
>  yegorslists> @@ -14,7 +14,7 @@ define PYTHON_NETIFACES_BUILD_CMDS
>  yegorslists>  	(cd $(@D); \
>  yegorslists>  		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
>  yegorslists>  		LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
>  yegorslists> -	$(HOST_DIR)/usr/bin/python setup.py build)
>  yegorslists> +	$(HOST_DIR)/usr/bin/python setup.py build -x)
>  yegorslists>  endef
> 
> Thanks, so far so good, but it still doesn't build here:
> 
> building 'netifaces' extension
> /home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -fno-strict-aliasing -pipe -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_GETNAMEINFO=1 -DHAVE_SIOCGIFCONF=1 -DHAVE_SIOCGIFHWADDR=1 -DHAVE_SIOCGIFADDR=1 -DHAVE_SIOCGIFFLAGS=1 -DHAVE_SIOCGIFDSTADDR=1 -DHAVE_SIOCGIFBRDADDR=1 -DHAVE_SIOCGIFNETMASK=1 -DHAVE_SOCKET_IOCTLS=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_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=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 -I/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/python2.7 -c netifaces.c -o build/temp.linux-x86_64-2.7/netifaces.
o
> netifaces.c: In function 'ifaddrs':
> netifaces.c:627: error: invalid type argument of '->' (have 'struct ifreq')
> netifaces.c:637: error: expected ';' before 'do'
>  
> 
> Where netifaces.c:627 is:
> 
> if (string_from_sockaddr (ifr->CNAME(ifr_addr), buffer, sizeof (buffer)) == 0) {
> 
> and netifaces.c:637 is:
> 
>         Py_XDECREF (dict);
>         Py_XDECREF (list)
>         Py_XDECREF (family);
> 
> What kind of toolchain configuration are you using?
> 
> I also notice that it detects HAVE_SOCKADDR_IN6 even though my config
> doesn't have IPv6 support, which might be a problem.

That's really strange. I used CodeSourcery toolchain and had no problems, but with native BR toolchain I have the same behavior as yours. I'll look into this issue.

Yegor

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09  9:57   ` Yegor Yefremov
@ 2012-01-09 10:20     ` Thomas Petazzoni
  2012-01-09 10:35       ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2012-01-09 10:20 UTC (permalink / raw)
  To: buildroot

Le Mon, 09 Jan 2012 10:57:23 +0100,
Yegor Yefremov <yegor_sub1@visionsystems.de> a ?crit :

> That's really strange. I used CodeSourcery toolchain and had no
> problems, but with native BR toolchain I have the same behavior as
> yours. I'll look into this issue.

CodeSourcery toolchains use glibc, so they have IPv6 support enabled.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09 10:20     ` Thomas Petazzoni
@ 2012-01-09 10:35       ` Peter Korsgaard
  2012-01-09 10:40         ` Yegor Yefremov
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2012-01-09 10:35 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Le Mon, 09 Jan 2012 10:57:23 +0100,
 Thomas> Yegor Yefremov <yegor_sub1@visionsystems.de> a ?crit :

 >> That's really strange. I used CodeSourcery toolchain and had no
 >> problems, but with native BR toolchain I have the same behavior as
 >> yours. I'll look into this issue.

 Thomas> CodeSourcery toolchains use glibc, so they have IPv6 support enabled.

Yes, but that doesn't explain the 2nd error (missing ;):

        Py_XDECREF (dict);
        Py_XDECREF (list)
        Py_XDECREF (family);

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09 10:35       ` Peter Korsgaard
@ 2012-01-09 10:40         ` Yegor Yefremov
  2012-01-10 12:48           ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Yegor Yefremov @ 2012-01-09 10:40 UTC (permalink / raw)
  To: buildroot

Am 09.01.2012 11:35, schrieb Peter Korsgaard:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 
>  Thomas> Le Mon, 09 Jan 2012 10:57:23 +0100,
>  Thomas> Yegor Yefremov <yegor_sub1@visionsystems.de> a ?crit :
> 
>  >> That's really strange. I used CodeSourcery toolchain and had no
>  >> problems, but with native BR toolchain I have the same behavior as
>  >> yours. I'll look into this issue.
> 
>  Thomas> CodeSourcery toolchains use glibc, so they have IPv6 support enabled.
> 
> Yes, but that doesn't explain the 2nd error (missing ;):
> 
>         Py_XDECREF (dict);
>         Py_XDECREF (list)
>         Py_XDECREF (family);
> 

I've activated UCLIBC_SUPPORT_AI_ADDRCONFIG and now I can compile netifaces without a problem with native toolchain. Here is my .config for reference. Also take a look at this thread: http://lists.busybox.net/pipermail/uclibc/2008-August/040778.html

Yegor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/xml
Size: 20230 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120109/d77b9158/attachment-0001.wsdl>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09  7:42 [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation yegorslists at googlemail.com
  2012-01-09  8:18 ` Peter Korsgaard
@ 2012-01-10 12:47 ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2012-01-10 12:47 UTC (permalink / raw)
  To: buildroot

>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:

 yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
 yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
 yegorslists> ---
 yegorslists>  package/python-netifaces/python-netifaces.mk |    2 +-
 yegorslists>  1 files changed, 1 insertions(+), 1 deletions(-)

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation
  2012-01-09 10:40         ` Yegor Yefremov
@ 2012-01-10 12:48           ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2012-01-10 12:48 UTC (permalink / raw)
  To: buildroot

>>>>> "Yegor" == Yegor Yefremov <yegor_sub1@visionsystems.de> writes:


 Yegor> I've activated UCLIBC_SUPPORT_AI_ADDRCONFIG and now I can
 Yegor> compile netifaces without a problem with native toolchain. Here
 Yegor> is my .config for reference. Also take a look at this thread:
 Yegor> http://lists.busybox.net/pipermail/uclibc/2008-August/040778.html

Thanks. I added (and sent upstream) a patch to get netifaces to build
without ADDRCONFIG.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-10 12:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09  7:42 [Buildroot] [PATCH] python-netifaces: add -x option to fix cross-compilation yegorslists at googlemail.com
2012-01-09  8:18 ` Peter Korsgaard
2012-01-09  9:57   ` Yegor Yefremov
2012-01-09 10:20     ` Thomas Petazzoni
2012-01-09 10:35       ` Peter Korsgaard
2012-01-09 10:40         ` Yegor Yefremov
2012-01-10 12:48           ` Peter Korsgaard
2012-01-10 12:47 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox