Issue 1230161: Build failure - Python tracker (original) (raw)
./configure + make fails with various errors on FreeBSD 4.11-RELEASE
case $MAKEFLAGS in -s) CC='gcc -pthread' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; *) CC='gcc -pthread' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; esac Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] 'import site' failed; use -v for traceback Traceback (most recent call last): File "./setup.py", line 6, in ? import sys, os, getopt, imp, re ImportError: No module named os *** Error code 1
If I run "make" again, it stops with this, instead, I found it strange because "pwd.so" isn't ready yet.
case $MAKEFLAGS in -s) CC='gcc -pthread' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; *) CC='gcc -pthread' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; esac Traceback (most recent call last): File "./setup.py", line 1184, in ? main() File "./setup.py", line 1178, in main scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', File "/home/mondo/Python-2.4.1/Lib/distutils/core.py", line 123, in setup dist.parse_config_files() File "/home/mondo/Python-2.4.1/Lib/distutils/dist.py", line 339, in parse_config_files filenames = self.find_config_files() File "/home/mondo/Python-2.4.1/Lib/distutils/dist.py", line 302, in find_config_files check_environ() File "/home/mondo/Python-2.4.1/Lib/distutils/util.py", line 155, in check_environ import pwd ImportError: No module named pwd *** Error code 1
I've tried "make clean" + retry, giving --prefix=so-and-so to ./configure, and some other things without success.
I have already built exactly same Python source on this server several weeks ago (in a different directory), and do not understand why it's failing, now. (Possibly, admin updated something causing build process to fail...)
Logged In: YES user_id=1305168
Thank you for the info. "export HOME" soplved the problem.
HOME wasn't exported because I was compiling on shared hosting environment, and the host doesn't set normal env variables.
I set HOME (and some other env var), but didn't export them. And that caused the build failure.