newbie: help please!

David LeBlanc whisper at oz.net
Wed Jun 19 19:40:25 CEST 2002


Errr... since that's tk.h doing the include, I am pretty sure that it's
trying to include tcl/include/x11/xlib.h and not one from a X11 distro. You
just need to add tcl/include to your include path.

These files do have some minor differences to add support for Tcl.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Chris Gonnerman
> Sent: Wednesday, June 19, 2002 5:38
> To: Steve
> Cc: python-list at python.org
> Subject: Re: newbie: help please!
>
>
> ----- Original Message -----
> From: "Steve" <steve.bond at btinternet.com>
> Newsgroups: comp.lang.python
> To: <python-list at python.org>
> Sent: Wednesday, June 19, 2002 5:20 AM
> Subject: newbie: help please!
>
>
> > hello,
> >
> > i have python 2.2.1 installed on my mandrake 8.1 system, which seems to
> > work fine.
> >
> > The problem is im trying to install Tk exstensions, i have
> downloaded both
> > tcl8.3.4 and tk8.3.4 files and installed using the ./configure, make and
> > then make install commands. I then when into the setup file in the
> > Python-2.2.1/Modules directory where i understand i have to enable the
> > tkinter extension module, by uncommenting the approritae lines.
> >
> > Lastly i run 'make' at the top of my Python-2.2.1 directory but
> i get this
> > error:
> >
> > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include
> > -DHAVE_CONFIG_H   -DWITH_APPINIT -I/usr/local/include
> -I/usr/X11R6/bin -c
> > ./Modules/_tkinter.c -o Modules/_tkinter.o
> > In file included from ./Modules/_tkinter.c:49:
> > /usr/include/tk.h:83:29: X11/Xlib.h: No such file or directory
> >
> > i have the Xlib.h in the Python-2.2.1/Include directory
> >
> > the tkinter part of my setup file looks like this and everything was
> > installed in the default places
>
> The standard Python 2.2 configuration system should automatically add tk
> support if all components are there.  Your error is because you don't have
> the X11 development RPM(s) installed.  Get out your Mandrake install set
> and add any RPM's which are specifically for X11 development (I run SuSE
> so I don't know what RPM's you need for Mandrake).
>
> The Xlib.h in the Python-2.2.1/Include directory isn't the right one.  You
> need the X11 version.
>
> >
> > # *** Always uncomment this (leave the leading underscore in!):
> >  _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
> > # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
> >         -L/usr/local/lib \
> > # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
> >         -I/usr/local/include \
> > # *** Uncomment and edit to reflect where your X11 header files are:
> >         -I/usr/X11R6/bin \
>
> X11 header files are conventionally in /usr/X11R6/include or in
> /usr/include/X11, and on many distro's both exist, one being a link to the
> other.  /usr/X11R6/bin is almost certainly NOT the right location.
>
> > # *** Or uncomment this for Solaris:
> > #       -I/usr/openwin/include \
> > # *** Uncomment and edit for Tix extension only:
> > #       -DWITH_TIX -ltix8.1.8.2 \
> > # *** Uncomment and edit for BLT extension only:
> > #       -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
> > # *** Uncomment and edit for PIL (TkImaging) extension only:
> > #     (See http://www.pythonware.com/products/pil/ for more info)
> > #       -DWITH_PIL -I../Extensions/Imaging/libImaging  tkImaging.c \
> > # *** Uncomment and edit for TOGL extension only:
> > #       -DWITH_TOGL togl.c \
> > # *** Uncomment and edit to reflect your Tcl/Tk versions:
> >         -ltk8.3 -ltcl8.3 \
> > # *** Uncomment and edit to reflect where your X11 libraries are:
> >         -L/usr/X11R6/lib \
> > # *** Or uncomment this for Solaris:
> > #       -L/usr/openwin/lib \
> > # *** Uncomment these for TOGL extension only:
> > #       -lGL -lGLU -lXext -lXmu \
> > # *** Uncomment for AIX:
> > #       -lld \
> > # *** Always uncomment this; X11 libraries to link with:
> >         -lX11
> >
> > Any help would be much appreciated!
>
> Install the missing RPM's and correct your setup file as noted, and
> all should build fine.
>
> > Thanks
>
> You're welcome.  Hope this helps.
>
> Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
> http://newcenturycomputers.net
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list