This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年02月26日 15:19 by hundeboll, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| include-dirs.patch | hundeboll, 2016年02月26日 15:19 | remove addition of host dirs to include dirs when building extensions | ||
| Messages (3) | |||
|---|---|---|---|
| msg260894 - (view) | Author: Martin Hundebøll (hundeboll) | Date: 2016年02月26日 15:19 | |
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);
^
|
|||
| msg261094 - (view) | Author: Alex Willmer (Alex.Willmer) * | Date: 2016年03月02日 00:33 | |
This looks like a duplicate of #20211, and IMO the patch there is more correct. |
|||
| msg261434 - (view) | Author: Martin Hundebøll (hundeboll) | Date: 2016年03月09日 15:11 | |
Yes, it is a duplicate of #20211, and I agree with the fix proposed in there. Thanks for pointing it out. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:28 | admin | set | github: 70630 |
| 2016年03月09日 15:22:33 | berker.peksag | set | superseder: setup.py: do not add system header locations when cross compiling stage: resolved |
| 2016年03月09日 15:11:29 | hundeboll | set | status: open -> closed resolution: duplicate messages: + msg261434 |
| 2016年03月02日 00:33:17 | Alex.Willmer | set | messages: + msg261094 |
| 2016年03月02日 00:22:30 | Alex.Willmer | set | nosy:
+ Alex.Willmer |
| 2016年02月28日 06:33:19 | ned.deily | set | nosy:
+ doko |
| 2016年02月26日 15:19:33 | hundeboll | create | |