Problems with Install

D-Man dsh8290 at rit.edu
Mon Jan 29 11:07:24 EST 2001


On Sat, Jan 27, 2001 at 05:16:20AM -0800, Ben Ocean wrote:
| Unfortunately I need to install python 1.5.2 from source because I need to 
| configure it with multithreads. Equally unfortunately, I don't have the 
| luxury of time to learn C right this red-hot second. But I need to get this 

Ok, we'll help you figure this out now.  Hopefully no one will flame
us for describing C and gcc on a python list ;-).

| installation working!!! I've run into this error while running *make*. D 
| said it was due to an error in the myreadline.o So I re-ran make and copied 
| what printed to screen. The myreadline.o stuff doesn't appear until the 
| last few lines:

Yes, you were running make.  But make is just a nice tool that will
execute a lot of complex shell commands automatically.  You wouldn't
want to have to type all the commands it exec's would you?  ;-)
(rhetorical, don't bother answering it)

| 
| thor:/apache/vhosts/Python-1.5.2# make

[snip]

| gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H   -c myreadline.c -o 
| myreadline.o

The above 2 lines are the shell command make is exec'ing that is
giving you an error. 

| In file included from /usr/include/errno.h:36,
|                   from ../Include/Python.h:59,
|                   from myreadline.c:42:
| /usr/include/bits/errno.h:25: linux/errno.h: No such file or directory

Ahh, here's the error message.  Note that gcc is what gave the error
message.  gcc then returns a number other than zero from main(), thus
make tells you the following:

| make[1]: *** [myreadline.o] Error 1

While trying to execute the commands that will build the target
"myreadline.o" there was an error.

| make[1]: Leaving directory `/apache/vhosts/Python-1.5.2/Parser'
| make: *** [Parser] Error 2

Make is a recursive tool,  during its operation it will run another
copy of itself.  The first level of recursion (make[1]:) is leaving the
directory it is in.  Then you are back to the top-level make (make:)
This make process was trying to build the target "Parser", but got an
error code from the sub-process.

| 
| Just for fun I tried installing an rpm as you mentioned. The strangest 
| thing happened. When I got to the actual installation command, the darn 
| thing just vanished into thin air! running a whereis for python turns up 
| *nothing*! Oh, geez, what'd I do wrong?

I don't know what you did wrong, but try:

$ rpm -qa | grep -i *python*

to find a list of all packages that have python in the name (the -i on
grep makes it case insensitive)


Ok, now to sort out the error message:

| gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H   -c myreadline.c -o 
| myreadline.o
| In file included from /usr/include/errno.h:36,
|                   from ../Include/Python.h:59,
|                   from myreadline.c:42:
| /usr/include/bits/errno.h:25: linux/errno.h: No such file or directory

gcc is being told to compile myreadline.c and write the output to
myreadline.o.  There are a number of options being given to it
regarding optimization, include directories, and macro definitions.
The -c option tells it to just compile, not perform any linking or
create an actual executable.  (gcc will be run many times as each file
is compiled separately, then linked together at the end)

Ok, so you are in myreadline.c,  line 42.  If you look in the file,
you will see a line similar to

#include "../Include/Python.h"

The "" tells the preprocessor to look in the current directory and
follow the relative path.  (it is case sensitive,  at least on Unices
that have case-sensitive file systems, the cygwin port is probably not
but I haven't tested it)  Ok, so now the preproccessor is going
through Python.h.  On line 59 of Python.h there is something like
this:

#include <errno.h>

The <> tells the preprocessor to look in the system include
directories.  /usr/include is the most common one.  I believe the
system include directories are defined by your gcc installation.  Now
we are on line 36 of /usr/include/errno.h.  This line must inlclude
bits/errno.h (I'm concluding all of this from the error message, not
actually checking any files on my system, I have a Debian, not RH,
system now anyways).

The file /usr/include/bits/errno.h (on line 25) is trying to include
the file linux/errno.h, but the file doesn't exist on your system.
>From your other post you indicated that it had <> brackets around the
file name.  That means that it is supposed to be in the system include
directories somewhere.  Maybe /usr/include/linux/errno.h or
/usr/local/include/linux/errno.h.  Someone else said that
linux/errno.h is provided by kernel-headers.rpm.  Try installing that
rpm and see if it works.  Also, check the rpm so you know exactly
where it installs the headers to.  

Keep coming back here to continue your crash-course on C and the
preprocessor until you get all the problems worked out.  :-)  Maybe
you'll have time to learn C in the future.  I have a copy of a really
good tutorial that I found on the web a few years ago.  If you want, I
can send it to you.

HTH,
-D





More information about the Python-list mailing list