Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue27229

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:In tree cross-build fails copying Include/graminit.h to itself
Type:compile errorStage:resolved
Components:Cross-BuildVersions:Python 3.6, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Alex.Willmer, doko, martin.panter, ned.deily, python-dev, xdegaye
Priority:normalKeywords:patch

Created on2016-06-05 13:05 byAlex.Willmer, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
graminit-same-file.patchAlex.Willmer,2016-06-05 13:05review
vpath.patchxdegaye,2016-06-05 22:05review
Messages (7)
msg267417 -(view)Author: Alex Willmer (Alex.Willmer)*Date: 2016-06-05 13:05
While trying a cross compile of Python 3.6 I encountered the followingalex@martha:~/src/cpython default☿ hg summaryparent: 101753:31ad7885e2e5  Issue#27225: Fixed a reference leak in type_new when setting __new__ fails.branch: defaultcommit: (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=nochecking for hg... found...creating Makefilealex@martha:~/src/cpython default☿ make...arm-linux-gnueabihf-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypesParser/acceler.oParser/grammar1.oParser/listnode.oParser/node.oParser/parser.oParser/bitset.oParser/metagrammar.oParser/firstsets.oParser/grammar.oParser/pgen.oObjects/obmalloc.oPython/dynamic_annotations.oPython/mysnprintf.oPython/pyctype.oParser/tokenizer_pgen.oParser/printgrammar.oParser/parsetok_pgen.oParser/pgenmain.o -lpthread -ldl  -lpthread -lutil -oParser/pgenif test "yes" != "yes"; then \Parser/pgen ./Grammar/GrammarInclude/graminit.hPython/graminit.c; \else \cp ./Include/graminit.hInclude/graminit.h; \ficp: './Include/graminit.h' and 'Include/graminit.h' are the same fileMakefile:806: recipe for target 'Include/graminit.h' failedmake: *** [Include/graminit.h] Error 1The attached patch allows me to get past this error. I'm unsure if it's an appropriate fix or just a workaround.
msg267431 -(view)Author: Ned Deily (ned.deily)*(Python committer)Date: 2016-06-05 16:57
The culprit appears to be the changes introduced forIssue22359 (c36b9ef8ff39 and friends).
msg267480 -(view)Author: Xavier de Gaye (xdegaye)*(Python triager)Date: 2016-06-05 22:05
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.
msg267497 -(view)Author: Martin Panter (martin.panter)*(Python committer)Date: 2016-06-06 01:20
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.
msg267576 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-06-07 00:45
New changeset619f7a2aa40a by Martin Panter in branch '3.5':Issue#27229: Fix in-tree cross-build rule, by Xavier de Gayehttps://hg.python.org/cpython/rev/619f7a2aa40aNew changeset9902230b101f by Martin Panter in branch 'default':Issue#27229: Merge cross-compiling fix from 3.5https://hg.python.org/cpython/rev/9902230b101fNew changesetffed402528c7 by Martin Panter in branch '2.7':Issue#27229: Fix in-tree cross-build rule, by Xavier de Gayehttps://hg.python.org/cpython/rev/ffed402528c7
msg267579 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-06-07 01:11
New changesetec214654708f by Martin Panter in branch '2.7':Issue#27229: Comment in middle of shell command fails on BSD and OS Xhttps://hg.python.org/cpython/rev/ec214654708fNew changesetde5b85f96266 by Martin Panter in branch '3.5':Issue#27229: Comment in middle of shell command fails on BSD and OS Xhttps://hg.python.org/cpython/rev/de5b85f96266New changesetb7a4c076ba40 by Martin Panter in branch 'default':Issue#27229: Merge makefile fix from 3.5https://hg.python.org/cpython/rev/b7a4c076ba40
msg267599 -(view)Author: Martin Panter (martin.panter)*(Python committer)Date: 2016-06-07 06:41
Thanks Alex & Xavier.
History
DateUserActionArgs
2022-04-11 14:58:32adminsetgithub: 71416
2016-06-07 06:41:23martin.pantersetstatus: open -> closed
resolution: fixed
messages: +msg267599

stage: commit review -> resolved
2016-06-07 01:11:50python-devsetmessages: +msg267579
2016-06-07 00:45:39python-devsetnosy: +python-dev
messages: +msg267576
2016-06-06 01:20:20martin.pantersetstage: commit review
messages: +msg267497
versions: + Python 2.7, Python 3.5
2016-06-05 22:05:37xdegayesetfiles: +vpath.patch

messages: +msg267480
2016-06-05 16:57:47ned.deilysetnosy: +xdegaye,ned.deily,martin.panter
messages: +msg267431
2016-06-05 16:50:51ned.deilysetnosy: +doko
2016-06-05 13:05:40Alex.Willmercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp