Building wxPython [was Re: wxPython and DISLIN work nicely together]

Randall Hopper aa8vb at yahoo.com
Fri Nov 19 13:44:22 EST 1999


Robin Dunn:
 |>  |> If only wxPython would build on IRIX...
 |>
 |What is the output of "wx-config --cflags" ?  It should have the right
 |include directories for getting all the wxWindows headers.
 |
 |Oh wait a minute, it says "/bin/sh: wx-config:  not found" so it looks like
 |you didn't do a "make install" for wxGTK.

To the latter, I've already done "make install" for wxGTK:

     > ls ~/software/wxGTK-2.1.11/
     bin/      include/  lib/      share/

and wx-config does exist, in the $WXWIN directory:

    > python $WXWIN/utils/wxPython-2.1.11/distrib/build.py -b MAKE=gmake
    ...
    /bin/sh: wx-config:  not found
    ...
    > cd ../../..
    > find . -name wx-config
    ./wx-config

And to the former, here's my 'wx-config --cflags' output:
 
    > wx-config --cflags
    -I/home/rhh/software/wxGTK-2.1.11/include -I/home/rhh/software/wxGTK-2.1.11/lib/wx/include -D__WXMOTIF__ -I/usr/Motif-1.2/include


Leafing through build.py, the problem is that wxPython assumes wxGTK's
wx-config is in $PATH.  I don't have root so I don't install things in
/usr/local/*.  (I also don't like having package intermingle in a shared
directory tree; too hard to remove them later.)  So the change to hack
around this is to temporarily add $WXWIN's bin directory to $PATH:

     env PATH=$WXWIN/bin:$PATH /usr/local/bin/python \
         $WXWIN/utils/wxPython-2.1.11/distrib/build.py -b MAKE=gmake

Perhaps wxPython should have a --with-wxwindows= option, or take it's
queues off of $WXWIN?

It then went on a little further to try and compile helpers.cpp, but failed
with 84 errors, all (or almost all) due to a bad NULL comparisons in the
wxWindows header files.  NULL is defined as ((void*)0) and cannot be
assigned to / compared with another type without a cast in C++.  As this is
C++, I believe they should be using "0" for assignments and comparisons.

Odd that they even note this fact in wxWindows' defs.h file:

   #if defined(__SGI_CC__)
   // Okay this is bad styling, but the native SGI compiler is very picky, it
   // wont let you compare/assign between a NULL (void *) and another pointer
   // type. To be really clean we'd need to pass in another argument, the type
   // of p.

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list