Python 2.4.2 make failure in posixmodule on OSX 10.4.3

S

smurphus

Hi All-

I'm trying to build Python 2.4.2 on OSX 10.4.3 (gcc ver. 3.3 apple
build 1495) and have the following error when running 'make':

gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o
Modules/posixmodule.o
Modules/posixmodule.c: In function `posix_lchown':
Modules/posixmodule.c:1353: warning: implicit declaration of function
`lchown'
Modules/posixmodule.c:5999:25: sys/statvfs.h: No such file or directory
Modules/posixmodule.c: At top level:
Modules/posixmodule.c:6002: error: parameter `st' has incomplete type
Modules/posixmodule.c: In function `posix_fstatvfs':
Modules/posixmodule.c:6048: error: storage size of `st' isn't known
Modules/posixmodule.c:6053: warning: implicit declaration of function
`fstatvfs'
Modules/posixmodule.c:6048: warning: unused variable `st'
Modules/posixmodule.c:6064:25: sys/statvfs.h: No such file or directory
Modules/posixmodule.c: In function `posix_statvfs':
Modules/posixmodule.c:6075: error: storage size of `st' isn't known
Modules/posixmodule.c:6079: warning: implicit declaration of function
`statvfs'
Modules/posixmodule.c:6075: warning: unused variable `st'
make: *** [Modules/posixmodule.o] Error 1

'make clean' hasn't helped, and I ran configure with
'--disable-toolbox-glue'.

I need to build it from source because I have a program with a long
running worker thread that I think will benefit from using Evan Jones'
memory management patch (http://evanjones.ca/python-memory-part2.html).
Note that I haven't applied the diff yet; this is just the reason I
need to build from source.

Couldn't find anything on this in the group already, or the main Python
site, or in any of the docs with the distribution.
Any suggestions on how I can remedy this?
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

smurphus said:
Any suggestions on how I can remedy this?

It would be good if you could try to understand and to
analyse these error messages; your message does not
indicate whether you have knowledge of the C language
and could analyse them or not.

For example, it is very puzzling that there is no
declaration of lchown. Can you find a declaration
for this function (there must be one, somewhere
in /usr/include)? Why is it not used?

Regards,
Martin
 
S

smurphus

Thanks for the reply, Martin.

I know a bit of C. I thought maybe I was missing something simple,
since I don't have an exotic system configuration.

Re: lchown
the file posixmodule.c in Python does include <sys/types.h> and I have
that header where it should be, i.e. /usr/include/sys/types.h so I
don't know why it tells me lchown is implicitly defined after the
include.

The next error with statvfs.h perhaps makes more sense. I do not have
/usr/include/sys/statvfs.h on my system, and the statement #include
<sys/statvfs.h> is in an include guard, #if defined(HAVE_FSTATVFS). I
assume that's not being detected properly by the configure script?

I hope that information is of some use. Not sure where to go from
here.

Thanks.
 
S

smurphus

I just re-ran the configure script.

It reports:
checking for lchown... yes
checking for fstatvfs... yes

??
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

smurphus said:
I hope that information is of some use. Not sure where to go from
here.

Please try
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o
Modules/posixmodule.o --save-temps

and inspect the resulting posixmodule.i. I would expect that
it *doesn't* have the prototype for lchown.

I'm surprised though that you were suggesting (without
actually saying) that the prototype for lchown is in
sys/types.h in your system. I would have expected it in
unistd.h. Still can't check my Mac right now.

Re fstatvfs: can you verify that your system has the
fvstatvfs function? Is there a prototype declared anywhere?

Looking at

http://www.hmug.org/man/3/statvfs.php

suggests that OS X / Darwin does indeed have sys/statvfs.h.
So if you don't have it, something is broken with your
compiler setup.

Regards,
Martin
 
S

smurphus

Yes, it looks like I was missing the necessary headers. Once I
replaced them, it has been smooth sailing.

Thank you for your assitance, Martin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top