Compiling Python 2.0 in DEC Alpha?

Donn Cave donn at u.washington.edu
Tue Jan 23 12:47:16 EST 2001


Quoth pekko at iki.fi (Pekko Piirola):
| I'm trying to compile python-2.0 in DEC Alpha, which is running
| Digital UNIX V4.0F (Rev. 1229).  After reading the README and the man
| page of cc I figured out the commands I need to build the interpreter:
| (I have already edited the Modules/Setup)
|
|
| CC=cc OPT='-std -arch host -fast -D_REENTRANT -pthread' \
| LDFLAGS='-pthread -lpthread -lmach -lexc -lc' \
| ./configure --prefix=/usr/local/contrib --with-dec-threads
|
|
| make CC=cc OPT='-std -arch host -fast -D_REENTRANT -pthread' \
| LDFLAGS='-pthread -lpthread -lmach -lexc -lc' 2>&1 | tee make.output-1
|
| ./configure runs nicely but make stops with the following error message:

...
| cc: Error: ./../Include/pyport.h, line 390: #error \
|   "LONG_BIT definition appears wrong for platform (bad gcc config?)." \
|   (errormessage)
| #error "LONG_BIT definition appears wrong for platform (bad gcc config?)."

I don't know where it went wrong.  Look at config.h in the top build
directory, and I bet you will find that SIZEOF_LONG is somehow not 8.

It builds OK for me on roughly the same platform (4.0D).  Standard
advice for anyone with a build problem is to make sure to start over
with a virgin source directory, but I have a couple of specific ideas
for you.

First, if you can get "configure" to do its job right, you should be
able to simply type "make".  You don't need to specify a bunch of flags
to configure, and then again to make to confuse the issue.

Second, try to curb your enthusiasm for the compile options.  First
try it with nothing at all:  just type "configure".  Save the output.
If that doesn't work, then we really do have a problem.  Then add your
optimization options, OPT='-arch host -fast'.  Add -pthread there too
if you like, but configure already knows to use that in the link step
and as far as I know that's all you need.  Omit the --with-dec-threads,
which contradicts -pthread.  Omit LDFLAGS altogether, unless for a
specific library for some extra extension you have in mind.

The "configure" script is a major advance in cross platform software
distribution, but it is vulnerable to compiler issues.  Any damage
in the compile options will have numerous unpleasant side effects;
configure will run without any apparent problems, but not "nicely".

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list