homepage

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.

classification
Title: environment variable MACHDEP and python build system
Type: behavior Stage: resolved
Components: Build Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, doko, loewis, python-dev, rpetrov
Priority: normal Keywords: patch

Created on 2008年08月28日 22:18 by rpetrov, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-release25-MACHDEP.patch rpetrov, 2008年08月28日 22:18
Messages (6)
msg72116 - (view) Author: Roumen Petrov (rpetrov) * Date: 2008年08月28日 22:18
A) The reason to propose this patch following paragraph
from README:
--------------------
 2) To set sys.platform to something sensible, pass the
 following environment variable to the configure script:
 MACHDEP=unicosmk
--------------------
The sentence above is not true in all cases. It don't state how to pass
as example
1) MACHDEP=abcd
 export MACHDEP
 ./configure ....
2) MACHDEP=abcd ./configure ....
3) ./configure MACHDEP=abcd ....
The Makefile.pre.in contain dependency rule "Run the configure script": 
that create config.status if file "configure" is changed as run the script.
From above three samples for environment varaible passing only 3) will
save MACHDEP
into variable CONFIG_ARGS from generated Makefile.
The case 2) alwais lost it if config.status is created from makefile rule.
The case 1) will work only if developer don't remeber to set it every day.
B) The test case (note that MACHDEP isn't valid name!):
$ MACHDEP=linuxTEST ./configure --disable-ipv6
checking MACHDEP... linuxTEST
....
checking for build directories... done
configure: creating ./config.status
....
creating Makefile
Now lets see if "configure" script is changed:
$ touch configure; make
/bin/sh ./configure '--disable-ipv6'
checking MACHDEP... linux2 <-- MACHDEP is lost
....
checking for build directories... done
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating pyconfig.h
config.status: pyconfig.h is unchanged
creating Modules/Setup
creating Modules/Setup.local
creating Makefile
CONFIG_FILES=Makefile.pre CONFIG_HEADERS= /bin/sh config.status
config.status: creating Makefile.pre
make -f Makefile.pre Makefile
make[1]: Entering directory `..../python-release25-maint'
make[1]: `Makefile' is up to date. <--- extra
make[1]: Leaving directory `..../python-release25-maint'
/bin/sh ./Modules/makesetup -c ./Modules/config.c.in \
....
The Makefile was updated, you may need to re-run make.
gcc -pthread -c ....
....
Note an extra attempt to create Makefile.
C) Next lets see after patch:
(the python configuration is the same as above):
$ touch configure; make
/bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --disable-ipv6
MACHDEP=linuxTEST --no-create --no-recursion
checking MACHDEP... linuxTEST <-- MACHDEP is same as at
configure time
....
checking for build directories... done
configure: creating ./config.status
creating Modules/Setup
creating Modules/Setup.local
creating Makefile
/bin/sh ./config.status Makefile.pre
config.status: creating Makefile.pre
/bin/sh ./Modules/makesetup -c ./Modules/config.c.in \
				-s Modules \
				Modules/Setup.config \
				Modules/Setup.local \
				Modules/Setup
The Makefile was updated, you may need to re-run make.
gcc -pthread -c - ....
(ignore failure here since MACHDEP=linuxTEST is used only to show problem)
D) Rerefence (from autoconf textinfo sections):
4.8.5 Automatic Remaking
7.2 Setting Output Variables (see macro AC_ARG_VAR)
16 config.status Invocation
msg112306 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010年08月01日 10:17
Can someone from the build team please review the patch, thanks.
msg180583 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2013年01月25日 14:00
the change to the configure script looks ok. however you could change the README too.
It looks like the changes to the Makefile.pre.in are already applied.
msg180684 - (view) Author: Roumen Petrov (rpetrov) * Date: 2013年01月26日 17:05
Matthias Klose wrote:
>
> Matthias Klose added the comment:
>
> the change to the configure script looks ok. however you could change the README too.
This is 5 years old issue.
README is not more in repository. As result python lack documentation 
related to build process.
> It looks like the changes to the Makefile.pre.in are already applied.
No . But you could ignore this part of issue.
Roumen
msg180692 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013年01月26日 18:00
New changeset 8c49dd8e4d22 by doko in branch '3.3':
- Issue #3718: Use AC_ARG_VAR to set MACHDEP in configure.ac.
http://hg.python.org/cpython/rev/8c49dd8e4d22
New changeset 6866384d9ccb by doko in branch 'default':
- Issue #3718: Use AC_ARG_VAR to set MACHDEP in configure.ac.
http://hg.python.org/cpython/rev/6866384d9ccb 
msg180693 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2013年01月26日 18:02
now checked in the configure change. I think that the cross-build documentation deserves an extra issue. Therefore now closing this issue.
History
Date User Action Args
2022年04月11日 14:56:38adminsetgithub: 47968
2013年01月26日 18:02:45dokosetstatus: open -> closed
resolution: fixed
messages: + msg180693

stage: patch review -> resolved
2013年01月26日 18:00:34python-devsetnosy: + python-dev
messages: + msg180692
2013年01月26日 17:23:14gregory.p.smithsetnosy: - gregory.p.smith
2013年01月26日 17:05:16rpetrovsetmessages: + msg180684
2013年01月25日 14:00:16dokosetnosy: + doko
messages: + msg180583
2011年03月15日 16:22:55gregory.p.smithsetassignee: gregory.p.smith ->

nosy: + loewis
2010年08月01日 10:17:55BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
nosy: + BreamoreBoy

messages: + msg112306

type: behavior
stage: patch review
2009年07月31日 21:05:04gregory.p.smithsetpriority: normal
assignee: gregory.p.smith

nosy: + gregory.p.smith
2008年08月28日 22:18:51rpetrovcreate

AltStyle によって変換されたページ (->オリジナル) /