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: test_httpservers fails CGI tests if --enable-shared
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, orsenthil, r.david.murray, terry.reedy, tony_nelson
Priority: normal Keywords:

Created on 2009-04-01 03:11 by tony_nelson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg84969 - (view) Author: Tony Nelson (tony_nelson) Date: 2009-04-01 03:11
test_httpservers fails the CGI tests if Python was built as a shared
library (./config --enable-shared) and not yet installed.  To run such a
Python without installing it, the command line must define
LD_LIBRARY_PATH to point to the build directory.  I see that the new
environment for the child CGI process still has LD_LIBRARY_PATH set. 
The child process is not using that when the CGI is invoked.

After the new shared Python (or one like it) is installed, the test
passes, but the CGIs aren't using the correct copy of Python.

I'm doing this with Python 2.6.1, but the version probably doesn't matter.
msg109881 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-10 15:38
Would anyone like to comment on this.
msg221799 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-28 16:03
David, Senthil, can either of you make any sense of this? Is the described configuration supported? Or should we close this?
msg221805 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-06-28 18:06
I don't see where any problems were fixed but I've verified that with current default that this case works correctly if you start the tests correctly as "make test" does.

LD_LIBRARY_PATH=$CWD ./python -m test ...

The cgi test cases create a temporary directory, set up a symlink for python using the value of sys.executable, which should be ./python, and the LD_LIBRARY_PATH environment variable (or equivalent on the platform) is inherited in the test cases.  I suppose you could run into trouble *if* there already is a Python shared library installed in the prefix location and on the platform, directories in LD_LIBRARY_PATH are not searched first.  If that's the case, then there's little Python can do and other tests would fail.  In such a situation, you would either have to install first or, for test purposes, use a temporary value for --prefix when running configure and make a test-only build.
History
Date User Action Args
2022-04-11 14:56:47adminsetgithub: 49888
2014-06-28 18:06:22ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg221805

resolution: works for me
stage: test needed -> resolved
2014-06-28 16:03:37terry.reedysetnosy: + terry.reedy, r.david.murray, orsenthil
messages: + msg221799
2014-02-03 19:22:24BreamoreBoysetnosy: - BreamoreBoy
2010-07-10 15:38:33BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + BreamoreBoy

messages: + msg109881

stage: test needed
2009-04-01 03:11:18tony_nelsoncreate