installing turbogears on mandriva 2005 LE

0 views
Skip to first unread message

bmur...@gmail.com

unread,
Oct 20, 2005, 10:54:23 AM10/20/05
to TurboGears
I'm having trouble installing TurboGears on Mandriva 2005 LE following
the ez_setup instructions. I found a thread about it here:

http://www.mail-archive.com/turbo...@googlegroups.com/msg00037.html

But it kind of died with this, well, um,
go-to-comp.lang.python-and-figure-it-out-there advice. Google has no
record of anyone bringing this up on comp.lang.python. I'd do it, but
I feel utterly unqualified to do so. Mandriva is the number 2 Linux
distro[1] and it'd be a shame to have turbogears not working on it.
What can I do to help? If somebody gives me the right questions to
ask, I don't mind asking them on comp.lang.python or anywhere else for
that matter.

Thanks,

Bryan

1. http://distrowatch.com/

SuperJared

unread,
Oct 20, 2005, 1:07:45 PM10/20/05
to TurboGears
Do you know if GCC is installed?

Bryan Murdock

unread,
Oct 20, 2005, 2:19:19 PM10/20/05
to turbo...@googlegroups.com
Yes, I have gcc, glibc-devel, memmove is there in the header file,
apparenlty something checking for memmove's existence is still unable
to find it though.


Bryan

Bryan Murdock

unread,
Oct 20, 2005, 2:35:27 PM10/20/05
to turbo...@googlegroups.com
On 10/20/05, SuperJared <jared...@gmail.com> wrote:
>
> Do you know if GCC is installed?
>

OK, to quote the previous thread, Robert Kern said:

"Ah, then I suspect this a Mandriva-specific issue. Trace through the
multiarch-dispatch.h file to see what it actually manages to #include.
If it's not the pyconfig.h that has the HAVE_MEMMOVE defined, then your
setup is broken for compiling extension modules."

My multiarch-dispatch.h doesn't include either pyconfig.h that exists
on my system. Rather it has include lines like this:

#elif defined(__i386__)
#include _MULTIARCH_MAKE_HEADER(i386,_MULTIARCH_HEADER)

Which, following the macros, seems like it might lead to the
pyconfig.h that has the "#define HAVE_MEMMOVE 1"

So, um, is this what I should be discussin on comp.lang.python?

Bryan

Phillip J. Eby

unread,
Oct 20, 2005, 2:47:26 PM10/20/05
to TurboGears
bmur...@gmail.com wrote:
> I'm having trouble installing TurboGears on Mandriva 2005 LE following
> the ez_setup instructions. I found a thread about it here:
>
> http://www.mail-archive.com/turbo...@googlegroups.com/msg00037.html
>
> But it kind of died with this, well, um,
> go-to-comp.lang.python-and-figure-it-out-there advice.

Actually, Robert Kern and others explained the problem to you, and
pointed you to both Mandriva and to the author of cElementTree.
Reading the thread above I see that it was pointed out that
cElementTree's "setup.py" checks for HAVE_MEMMOVE in the standard
"/usr/include/python2.4/pyconfig.h" file, but your distribution
replaces the standard "pyconfig.h" with some kind of redirection
header.

Ergo, Mandriva has a broken Python installation, because it doesn't
have the configuration information in the standard "pyconfig.h" where
it belongs.

I don't think you can say that cElementTree is broken, just because it
doesn't assume that some guy making a Linux distribution thinks they
can screw around with the contents of pyconfig.h and not break Python
extension modules.

File a bug report with Mandriva, its Python installation is broken.
You can also tell the cElementTree author about the problem, but it's
not reasonable to expect him to be able to fix it. "pyconfig.h" is
supposed to have constants in it, not a bunch of #include's and
#ifdef's to figure out what the constants should be.

As I understand it, the correct way for Mandriva to handle
multi-architecture support for Python is to build with a different
"exec prefix" for each architecture. This should automatically takes
care of having different architectures' "pyconfig.h" files come from
different locations. If it doesn't, then that's a Python build process
bug. :)

Bryan Murdock

unread,
Oct 20, 2005, 3:06:02 PM10/20/05
to turbo...@googlegroups.com
On 10/20/05, Phillip J. Eby <p...@telecommunity.com> wrote:
>
> bmur...@gmail.com wrote:
> > I'm having trouble installing TurboGears on Mandriva 2005 LE following
> > the ez_setup instructions. I found a thread about it here:
> >
> > http://www.mail-archive.com/turbo...@googlegroups.com/msg00037.html
> >
> > But it kind of died with this, well, um,
> > go-to-comp.lang.python-and-figure-it-out-there advice.
>
> Actually, Robert Kern and others explained the problem to you, and
> pointed you to both Mandriva and to the author of cElementTree.
> Reading the thread above I see that it was pointed out that
> cElementTree's "setup.py" checks for HAVE_MEMMOVE in the standard
> "/usr/include/python2.4/pyconfig.h" file, but your distribution
> replaces the standard "pyconfig.h" with some kind of redirection
> header.
>
> Ergo, Mandriva has a broken Python installation, because it doesn't
> have the configuration information in the standard "pyconfig.h" where
> it belongs.
>
> I don't think you can say that cElementTree is broken, just because it
> doesn't assume that some guy making a Linux distribution thinks they
> can screw around with the contents of pyconfig.h and not break Python
> extension modules.
<snip/>

Thanks for taking the time to type that lengthy, if not somewhat
hostile towards Mandriva, reply. Apparently I'm a little slow, but I
looked closer and I don't see any reason why including the standard
pyconfig.h wouldn't then cause the actual pyconfig.h under the
multiarch subdirectory to be included. I'm no C preprocessor expert
though.

Apparently this is having less and less to do with turbogears, so I'll
pursue it elsewhere. Thanks for the quick and meaty replies!

Bryan

Phillip J. Eby

unread,
Oct 20, 2005, 3:53:58 PM10/20/05
to TurboGears
Bryan Murdock wrote:
> Apparently I'm a little slow, but I
> looked closer and I don't see any reason why including the standard
> pyconfig.h wouldn't then cause the actual pyconfig.h under the
> multiarch subdirectory to be included.

That's not the issue. It's that some setup scripts for Python
extensions parse the *contents* of pyconfig.h (as opposed to
interpreting them via the C preprocessor), since in a standard Python
installation the constants will be *there*.

Since Python already has a standard way to deal with multi-architecture
builds, it's not reasonable to expect extension developers to
defensively program for the possibility that some distribution might
decide to redefine Python's installation structure in some arbitrary
way -- that is, a way that's outside the normal Python-provided
mechanisms for such customizations (e.g., sys.exec_prefix).

Bryan Murdock

unread,
Oct 20, 2005, 6:43:53 PM10/20/05
to turbo...@googlegroups.com
On 10/20/05, Phillip J. Eby <p...@telecommunity.com> wrote:
>
Ahhh, now that's interesting. Well, when I decided to try Turbogears
I had no idea I would become familiar with some of the intricacies of
Python module development or Mandriva packaging. This has been fun.
May I ask why anyone wouldn't just #include pyconfig.h? My somewhat
educated guess is that a purely Python module can't #include a C
header file, but what's the c in cElementTree for?

For the record, moving aside /usr/include/python2.4/pyconfig.h and
linking in /usr/include/multiarch-i386-linux/python2.4/pyconfig.h
instead allows Turbogears to complete installation. This bug has been
reported at http://qa.mandriva.com, bug 19376.

Bryan

Kevin Dangoor

unread,
Oct 20, 2005, 9:27:21 PM10/20/05
to turbo...@googlegroups.com
On 10/20/05, Bryan Murdock <bmur...@gmail.com> wrote:
> For the record, moving aside /usr/include/python2.4/pyconfig.h and
> linking in /usr/include/multiarch-i386-linux/python2.4/pyconfig.h
> instead allows Turbogears to complete installation. This bug has been
> reported at http://qa.mandriva.com, bug 19376.

I've added this info to the install troubleshooting page. Thanks for
following through on it!

Kevin

--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: k...@blazingthings.com
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com
Reply all
Reply to author
Forward
0 new messages