Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with testembed make dependencies in certain circumstances #47789

Closed
smontanaro opened this issue Aug 11, 2008 · 12 comments
Closed

Problem with testembed make dependencies in certain circumstances #47789

smontanaro opened this issue Aug 11, 2008 · 12 comments
Labels
build The build process and cross-build

Comments

@smontanaro
Copy link
Contributor

BPO 3539
Nosy @benjaminp, @vadmium, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2022-02-24.16:13:35.782>
created_at = <Date 2008-08-11.00:55:54.307>
labels = ['build']
title = 'Problem with testembed make dependencies in certain circumstances'
updated_at = <Date 2022-02-24.16:13:35.779>
user = 'https://github.com/smontanaro'

bugs.python.org fields:

activity = <Date 2022-02-24.16:13:35.779>
actor = 'iritkatriel'
assignee = 'none'
closed = True
closed_date = <Date 2022-02-24.16:13:35.782>
closer = 'iritkatriel'
components = ['Build']
creation = <Date 2008-08-11.00:55:54.307>
creator = 'skip.montanaro'
dependencies = []
files = []
hgrepos = []
issue_num = 3539
keywords = ['gsoc']
message_count = 12.0
messages = ['70998', '113254', '113262', '113284', '113286', '113290', '113294', '113295', '113305', '218551', '261884', '413925']
nosy_count = 3.0
nosy_names = ['benjamin.peterson', 'martin.panter', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue3539'
versions = ['Python 3.5']

@smontanaro
Copy link
Contributor Author

I usually build Python directly in my source repository (the directory
containing the configure script). Accordingly, I have .o files scattered
throughout my sandbox.

Today I decided to build --with-pydebug, so I created a debug directory,
then ran ../configure from within that directory, giving the arguments
I wanted. When I ran make it croaked with a link error linking pgen.
The linker complained that tokenizer_pgen.o and pgenmain.o weren't found.

Messing around with make -d I figured out that when make ran it
concluded that Parser/pgenmain.o didn't need to be rebuilt. It thought
that ../Parser/pgenmain.o satisfied the dependency for Parser/pgenmain.o.
I don't know if this is a problem with GNU make's VPATH processing or
with the dependency specification in Python's makefile.

I can work around the problem by avoiding builds directly in my sandbox
but it would be nice if this worked.

(I'm experiencing a sense of deja vu. Perhaps I've reported this problem
sometime in the dim, dark past, but I can't find anything searching for
either "VPATH" or "makefile".)

@smontanaro smontanaro added the build The build process and cross-build label Aug 11, 2008
@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Aug 8, 2010

I'll close this unless anyone shows some interest in it.

@skrah
Copy link
Mannequin

skrah mannequin commented Aug 8, 2010

Mark, the proper way of closing an issue is to test first if the problem
still exists.

@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Aug 8, 2010

Fascinating, three days from the second birthday, the OP isn't interested, nobody else is interested but it can't be closed. Clearly I'm missing something. Shall we leave this issue until it gets to it's 10th birthday?

@benjaminp
Copy link
Contributor

Yes, if it's still a problem.

@skrah
Copy link
Mannequin

skrah mannequin commented Aug 8, 2010

Mark, instead of using sarcasm, it would be more productive to research
this bug. Skip has given a hint that the search terms "VPATH" or "Makefile"
might be relevant. Searching for "VPATH" immediately yields bpo-1613,
which looks very similar:

gcc: Parser/pgenmain.o: No such file or directory

Why don't you try to find out if they are related? It is an excellent
opportunity to get acquainted with the Python build process.

@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Aug 8, 2010

Stefan, I'm not interested in researching something that has been available for others to research for two years, I don't understand why they aren't interested and I don't care. If noone can be bothered with an issue why leave it to rot, why not simply close it? Why is this issue different to others that I have set to pending and then after a couple of weeks closed without having a single comment back?

@benjaminp
Copy link
Contributor

2010/8/8 Mark Lawrence <report@bugs.python.org>:

Mark Lawrence <breamoreboy@yahoo.co.uk> added the comment:

Stefan, I'm not interested in researching something that has been available for others to research for two years, I don't understand why they aren't interested and I don't care.  If noone can be bothered with an issue why leave it to rot, why not simply close it?  Why is this issue different to others that I have set to pending and then after a couple of weeks closed without having a single comment back?

It's not different from others. Bugs should stay open until they are
resolved in some way. Closing a bug for lack of input is only
acceptable when the information needed is to clarify the problem from
the OP.

@skrah
Copy link
Mannequin

skrah mannequin commented Aug 8, 2010

If VPATH is intended to work without doing make distclean first
in the root directory, then this is still valid. I'm not sure if
this is the case though (see also bpo-1613).

cd py3k/
./configure --with-pydebug
make

mkdir debug
cd debug/
../configure --with-pydebug
make
...
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
make: *** [Parser/pgen] Error 1

cd ../
make distclean
cd debug/
make # (works now)

@skrah
Copy link
Mannequin

skrah mannequin commented May 14, 2014

The original problem is fixed, but a similar one exists with
testembed (see msg113305 for instructions):

gcc -pthread -Xlinker -export-dynamic -o Modules/_testembed Modules/_testembed.o libpython3.5dm.a -lpthread -ldl -lutil -lm
gcc: error: Modules/_testembed.o: No such file or directory
make: *** [Modules/_testembed] Error 1

@skrah skrah mannequin changed the title Problem with pgen make dependencies in certain circumstances Problem with testembed make dependencies in certain circumstances May 14, 2014
@wesselj wesselj mannequin added the build The build process and cross-build label May 4, 2015
@vadmium
Copy link
Member

vadmium commented Mar 17, 2016

The fault still exists for me with the pgen objects. The makefile has changed a few times about automatically compiling pgen (bpo-22359) or not (bpo-14321), so it would depend which version is tested.

I’m not an expert on VPATH, but it seems like it would be a awkward working around this problem (e.g. adding absolute paths do all the object file names or something). I propose to just close this. bpo-1613 added a note to the Python 2 README, and Python 3’s README says:

[Building from a subdirectory] will fail if you *also* built at the top-level directory. You should do a "make clean" at the toplevel first.

@iritkatriel
Copy link
Member

Closing as suggested by Martin.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

4 participants