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
distutils test_build_ext's test_get_outputs fails in bootstrap environment #52582
Comments
when running testsuite in a clean environment without pre-installed system python, test_distutils fail in test_build_ext, test_get_outputs: full traceback is below. this is most likely caused by change in r72637: not sure about proper fix - personally, i don't care much about leaving one more file in builddir, whereas i do care about tests passing in clean env, so for SUSE i'm reverting r72637 full traceback: test_distutils
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
test test_distutils failed -- Traceback (most recent call last):
File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/tests/test_build_ext.py", line 261, in test_get_outputs
cmd.run()
File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 449, in build_extensions
self.build_extension(ext)
File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 531, in build_extension
target_lang=language)
File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/ccompiler.py", line 769, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/unixccompiler.py", line 259, in link
raise LinkError, msg
LinkError: command 'gcc' failed with exit status 1 |
I am having the exact same problem with test_distutils failing on a clean env. Did reverting the changes in r72637 fix your problem? |
yes, reverting r72637 fixes this problem for me it reintroduces the original bug (there is some temporary file left behind), but i don't care about that |
Dylan, what is your platform ? The only difference is that the test chdir in a new temporary directory. Could anyone trace the test to step into the linker call to see its error output ? (can't reproduce here) |
Tarek, the chdir is the problem - because in an environment where you don't have an existing Python installation, you will not find -lpython2.6. the linker from unixccompiler.py:link() is this: and since you're in new temporary directory, -L. does not include libpython2.6 (unless you copy it in that directory or change -L. to the right place) |
This may be solved by backporting the fix in bpo-10126. I’ll do it when my network gives me access to svn again :/ |
Marking as duplicate, following Barry in msg119022 |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: