Buliding on SuSE 8 for x86_64 (AMD Opteron)

Paul Komarek <komarek-D+Gtc/[email protected]> 13 Dec 2003 17:12:57 -0500
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <1071353577.23396.41.camel@laptop>
Hi,

SuSE 8 for x86_64 has /usr/lib for 32 bit stuff, and /usr/lib64 for 64
bit stuff.  /usr/bin/python is 64 bit.  There is /usr/lib64/libpq.so.3
and /usr/lib/libpq.so.2.  You can imagine the mess this makes for
distutils.

I sucessfully compiled and installed pyPgSQL 2.4.0 from the source
tarball.  I made the following customizations:

1) Using the CUSTOM stuff in setup.py, set library_dirs = ["/usr/lib64",
"/usr/lib"]

2) After installing with python setup.py instal, stuff gets installed in
/usr/lib/python2.2/site-packages and you are warned this isn't in the
search path.  Simply cp -a /usr/lib/python2.2/site-packages/pyPgSQL to
/usr/lib64/python2.2/site-packages/.

I figure distutils may be able to do this kind of thing automatically.
Today is the first time I looked into distutils, and I'm not going to
mess around with fancy automatic stuff.

egenix mxDateTime also gave me some grief because their configuration
isn't documented and isn't as nice as yours.  To make it work, I edited
mxSetup.py (which I think gets copied around, so modify all copies you
find in the tarball before building).  The change is again simple:

1) search for /usr/local/lib in mxSetup.py
2) prepend '/usr/local/lib64' and '/usr/lib64' to the default library
list.

After building and installing, cp -a /usr/lib/python2.2/site-packages/mx
/usr/lib64/python2.2/site-packages.

To make this email easier to find, I'll include the error messages you
get if you don't do this stuff:

/usr/lib64/gcc-lib/x86_64-suse-linux/3.2.2/../../../../x86_64-suse-linux/bin/ld: cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

The same errors occur for egenix-mx-base (for which I didn't find a good
email list to post this to).

Note that I am not subscribed to this list.  If someone feels the need
to get my attention, you can email me at [email protected]

-Paul Komarek


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/