[issue20211] setup.py: do not add invalid header locations

2016-03-09 Thread Martin Hundebøll

Martin Hundebøll added the comment:

The patch looks good to me, and works in my setup.

--
nosy: +hundeboll

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20211>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26443] cross building extensions picks up host headers

2016-03-09 Thread Martin Hundebøll

Martin Hundebøll added the comment:

Yes, it is a duplicate of #20211, and I agree with the fix proposed in there.

Thanks for pointing it out.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26443>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26443] cross building extensions picks up host headers

2016-02-26 Thread Martin Hundebøll

New submission from Martin Hundebøll:

When cross building python, the building of extensions is called with 
-I/usr/include and -L/usr/lib

This makes some extensions fail to compile due to picking up inline assembly 
from host headers (e.g. _socket[1]).

I have fixed this locally by applying the attached patch, but I cannot tell if 
that would make other builds fail.

[1] log output:
building '_socket' extension
arm-cortexa9neon-linux-gnueabi-gcc -fPIC -Wno-unused-result -Wsign-compare 
-Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/stage/machine/usr/lib/libffi-3.2.1/include
 -O2 -fexpensive-optimizations -fomit-frame-pointer -frename-registers 
-Werror=declaration-after-statement -I./Include -I/usr/include -I. -IInclude 
-I/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/stage/cross/bin/../arm-cortexa9neon-linux-gnueabi/sysroot/usr/include
 
-I/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1/Include
 
-I/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1
 -c 
/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1/Modules/socketmodule.c
 -o 
build/temp.linux-arm-3.5/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1/Modules/socketmodule.o
In file included from /usr/include/bits/byteswap.h:35:0,
 from /usr/include/endian.h:60,
 from /usr/include/bits/string2.h:51,
 from /usr/include/string.h:635,
 from ./Include/Python.h:30,
 from 
/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1/Modules/socketmodule.c:95:
/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1/Modules/socketmodule.c:
 In function 'socket_getservbyport':
/usr/include/bits/byteswap-16.h:31:5: error: invalid 'asm': invalid operand for 
code 'w'
 __asm__ ("rorw $8, %w0"   \
 ^
/usr/include/netinet/in.h:403:21: note: in expansion of macro '__bswap_16'
 #   define htons(x) __bswap_16 (x)
 ^
/home/mnhu/projects/pil/oe/tmp/work/machine/arm-cortexa9neon-linux-gnueabi/python-3.5.1/src/Python-3.5.1/Modules/socketmodule.c:4861:24:
 note: in expansion of macro 'htons'
 sp = getservbyport(htons((short)port), proto);
^

--
components: Cross-Build
files: include-dirs.patch
keywords: patch
messages: 260894
nosy: hundeboll
priority: normal
severity: normal
status: open
title: cross building extensions picks up host headers
type: compile error
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file42032/include-dirs.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26443>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com