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: Makefile's VPATH feature is broken
Type: Stage:
Components: Build Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, gvanrossum
Priority: normal Keywords:

Created on 2007年12月13日 17:52 by christian.heimes, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (6)
msg58539 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年12月13日 17:52
Makefile has a feature called VPATH that is often used for cross
platform compilation or the creation of a different flavor.
Example:
$ cd py3k
$ mkdir debug
$ cd debug
$ ../configure --with-pydebug
$ make
...
gcc -pthread -c -fno-strict-aliasing -g -Wall -Wstrict-prototypes -I.
-IInclude -I../Include -DPy_BUILD_CORE -o Python/mysnprintf.o
../Python/mysnprintf.c
gcc -pthread -g -Wall -Wstrict-prototypes Parser/acceler.o
Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o
Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o
Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o
Python/mysnprintf.o Parser/tokenizer_pgen.o Parser/printgrammar.o
Parser/pgenmain.o -lpthread -ldl -lutil -o Parser/pgen
gcc: Parser/tokenizer_pgen.o: No such file or directory
gcc: Parser/printgrammar.o: No such file or directory
gcc: Parser/pgenmain.o: No such file or directory
msg58545 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年12月13日 18:07
Before I try to reproduce this, I remember having problems when
switching between using VPATH and not using it in the same subversion
workspace. The .o files left behind by one version confuse the other.
msg58554 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年12月13日 18:35
You are right! :) A make clean in the root of my local workspace solved
the problem but revealed another problem:
$ make
running build
running build_ext
building '_struct' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -Wall -Wstrict-prototypes -I.
-I/home/heimes/dev/python/py3k/debug/./Include -I./Include -IInclude -I.
-I/usr/local/include -I/usr/local/include/python3.0 -c _struct.c -o
build/temp.linux-i686-3.0/_struct.o
gcc: _struct.c: No such file or directory
gcc: keine Eingabedateien
error: /home/heimes/dev/python/py3k/debug/Modules/_ctypes/libffi: No
such file or directory
I fixed the problem by adding the option -b $(srcdir) to setup.py build
in the Makefile.
Next I run into a problem with the modules. Apparently itertools was not
added as a built-in module.
running build
Traceback (most recent call last):
 File "../setup.py", line 1584, in <module>
 main()
 File "../setup.py", line 1579, in main
 'Lib/smtpd.py']
 File "/home/heimes/dev/python/py3k/Lib/distutils/core.py", line 148,
in setup
 dist.run_commands()
 File "/home/heimes/dev/python/py3k/Lib/distutils/dist.py", line 942,
in run_commands
 self.run_command(cmd)
 File "/home/heimes/dev/python/py3k/Lib/distutils/dist.py", line 960,
in run_command
 cmd_obj = self.get_command_obj(command)
 File "/home/heimes/dev/python/py3k/Lib/distutils/dist.py", line 847,
in get_command_obj
 self._set_command_options(cmd_obj, options)
 File "/home/heimes/dev/python/py3k/Lib/distutils/dist.py", line 868,
in _set_command_options
 bool_opts = map(translate_longopt, command_obj.boolean_options)
ImportError: /usr/local/lib/python3.0/site-packages/itertools.so:
undefined symbol: PyUnicodeUCS4_FromFormat
I copied $(srcdir)/Modules/Setup* ./Modules/ and Python compiled
itertools as built-ins.
msg58557 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007年12月13日 18:58
Do you need more help at this point?
msg58567 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年12月13日 19:18
Guido van Rossum wrote:
> Do you need more help at this point?
No, I'm fine. I've a working solution for the problem. :)
Christian
msg58569 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007年12月13日 19:25
Fixed in r59482
I've updated the README and changed distutils slightly. Distutils was
using Modules/Setup.dist to detect an uninstalled Python. However
Setup.dist is only available in the srcdir and not in the VPATH dir.
I've changed it to Setup.local.
History
Date User Action Args
2022年04月11日 14:56:28adminsetgithub: 45954
2008年01月06日 22:29:44adminsetkeywords: - py3k
versions: Python 2.6, Python 3.0
2007年12月13日 19:25:01christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg58569
2007年12月13日 19:18:08christian.heimessetmessages: + msg58567
2007年12月13日 18:58:07gvanrossumsetmessages: + msg58557
2007年12月13日 18:35:15christian.heimessetmessages: + msg58554
2007年12月13日 18:07:36gvanrossumsetnosy: + gvanrossum
messages: + msg58545
2007年12月13日 17:52:31christian.heimescreate

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