Building things with setup.py
James Stroud
jstroud at mbi.ucla.edu
Thu Sep 21 23:47:06 EDT 2006
Robert Kern wrote:
> James Stroud wrote:
>
>> Hello All,
>>
>> This is annoying. I am trying to build scipy right now but every .so
>> file requires my adding "-lpython2.5 -lpthread -lm -lutil -ldl
>> -shared" to the ld flags.
>
>
>> I'm running Linux FC4 on a dual intel p4 (~3.2 GHz) with sundry
>> libraries in non-standard places. Is this non-standard part what's
>> killing me?
>
>
> It's possible that distutils is not finding the information about how
> the python interpreter was built. Did you build your own python(1)? Is
> the information in $PREFIX/lib/python2.4/config/ accurate?
>
I did build my own python 2.5, yesterday, requiring me to rebuild all
extensions. Everything I do is compiled by hand as joe-user. I'm in a
situation where I can't do RPM (and I don't have root on my work machine
(theoretically ;-)) so, to be a good joe-user, everything I add goes
into the prefix:
$HOME/Programs
This is the listing from $HOME/Programs/lib/python2.5/config:
euler 6% ls
total 4092
8 config.c 12 install-sh* 44 Makefile 8 python.o
8 Setup.config
8 config.c.in 3960 libpython2.5.a 12 makesetup* 24 Setup
8 Setup.local
The build process, by the way, required my copying libpython2.5.a to
$HOME/Programs/lib.
The text files Setup.config and Setup.local do not seem to have terribly
specific information in them. Which file in particular should I inspect?
I did not capture output from the build and I could not find a file with
the word "log" in it that appears to be a build log. The jist of the
problem is that first it can't find symbols from libpython2.5, then from
libthread, etc. Then, it complains about no "MAIN__" when linking the
.so files with g77 and no "main" with gcc (which is curious), so I must
include the -shared flag, after including -llibrary type flags for all
of the libraries it doesn't know about.
If its necessary, I can run setup.py build again and send the output to
a file and post that to scipy-dev if you think it might be helpful.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
More information about the Python-list
mailing list