[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-07 Thread Martin Panter

Martin Panter added the comment:

Thanks Alex & Xavier.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec214654708f by Martin Panter in branch '2.7':
Issue #27229: Comment in middle of shell command fails on BSD and OS X
https://hg.python.org/cpython/rev/ec214654708f

New changeset de5b85f96266 by Martin Panter in branch '3.5':
Issue #27229: Comment in middle of shell command fails on BSD and OS X
https://hg.python.org/cpython/rev/de5b85f96266

New changeset b7a4c076ba40 by Martin Panter in branch 'default':
Issue #27229: Merge makefile fix from 3.5
https://hg.python.org/cpython/rev/b7a4c076ba40

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 619f7a2aa40a by Martin Panter in branch '3.5':
Issue #27229: Fix in-tree cross-build rule, by Xavier de Gaye
https://hg.python.org/cpython/rev/619f7a2aa40a

New changeset 9902230b101f by Martin Panter in branch 'default':
Issue #27229: Merge cross-compiling fix from 3.5
https://hg.python.org/cpython/rev/9902230b101f

New changeset ffed402528c7 by Martin Panter in branch '2.7':
Issue #27229: Fix in-tree cross-build rule, by Xavier de Gaye
https://hg.python.org/cpython/rev/ffed402528c7

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

I was a little concerned that Alex’s patch used “test A -ef B”, which is not 
specified by Posix. But it is apparently widely supported (and consider we 
would only need it for cross compilation). Anyway, I was going to suggest test 
"$(srcdir)" == "." instead, but maybe Xavier’s solution is slightly better 
again.

I say go with vpath.patch, perhaps with a brief comment explaining that the cp 
+ mv dance avoids copying the file onto itself when doing an in-tree build.

--
stage:  -> commit review
versions: +Python 2.7, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Yes, those changes incorrectly assume that the source directory and the build 
directory are always different (using VPATH). Alex patch LGTM, this other patch 
overwrites the graminit.[ch] files, not sure if this is better.

--
Added file: http://bugs.python.org/file43249/vpath.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

The culprit appears to be the changes introduced for Issue22359 (c36b9ef8ff39 
and friends).

--
nosy: +martin.panter, ned.deily, xdegaye

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +doko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Alex Willmer

New submission from Alex Willmer:

While trying a cross compile of Python 3.6 I encountered the following

alex@martha:~/src/cpython default☿ hg summary
parent: 101753:31ad7885e2e5 
 Issue #27225: Fixed a reference leak in type_new when setting __new__ fails.
branch: default
commit: (clean)
update: (current)

alex@martha:~/src/cpython default☿ ./configure --build=x86_64-linux 
--host=arm-linux-gnueabihf --disable-ipv6 ac_cv_file__dev_ptc=no 
ac_cv_file__dev_ptmx=no
checking for hg... found
...
creating Makefile
alex@martha:~/src/cpython default☿ make
...
arm-linux-gnueabihf-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes   
Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o 
Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o 
Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/dynamic_annotations.o 
Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o 
Parser/printgrammar.o Parser/parsetok_pgen.o Parser/pgenmain.o -lpthread -ldl  
-lpthread -lutil -o Parser/pgen
if test "yes" != "yes"; then \
Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c; \
else \
cp ./Include/graminit.h Include/graminit.h; \
fi
cp: './Include/graminit.h' and 'Include/graminit.h' are the same file
Makefile:806: recipe for target 'Include/graminit.h' failed
make: *** [Include/graminit.h] Error 1


The attached patch allows me to get past this error. I'm unsure if it's an 
appropriate fix or just a workaround.

--
components: Cross-Build
files: graminit-same-file.patch
keywords: patch
messages: 267417
nosy: Alex.Willmer
priority: normal
severity: normal
status: open
title: In tree cross-build fails copying  Include/graminit.h to itself
type: compile error
versions: Python 3.6
Added file: http://bugs.python.org/file43235/graminit-same-file.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com