2.9.2.4 on Ubuntu 10.10 install

I like to check here before I go down the road of trial-error install process.

- Got 2.9.2.4 and extracted it
- cd to wxPython-src-2.9.2.4/wxpython
- python2.7 build-wxpython.py --build_dir=../bld

I get some warnings and a BuildError:
checking for png.h... (cached) no
configure: WARNING: system png library not found or too old, will use built-in instead
checking for jpeglib.h... no
configure: WARNING: system jpeg library not found, will use built-in instead
checking for tiffio.h... no
configure: WARNING: system tiff library not found, will use built-in instead
checking for expat.h... no
configure: WARNING: system expat library not found, will use built-in instead
checking for GTK+ version...
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.4.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
   File "build-wxpython.py", line 352, in <module>
     wxbuild.main(wxscript, build_options)
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 328, in main
     "Error running configure")
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 62, in exitIfError
     raise builder.BuildError, msg

Used Synaptic to install libglib2.0-cil-dev and libgtk2.0-cil-dev both version 2.12.10 and tried the build again, but same failure.

Anyone can give me some tips on what I am doing wrong or what else I am missing?

Werner

I like to check here before I go down the road of trial-error install process.

- Got 2.9.2.4 and extracted it
- cd to wxPython-src-2.9.2.4/wxpython
- python2.7 build-wxpython.py --build_dir=../bld

...

Used Synaptic to install libglib2.0-cil-dev and libgtk2.0-cil-dev both version 2.12.10 and tried the build again, but same failure.

Oops, above are not needed!

Installed the following:

- libgtk2.0-dev
- also loaded the tiff, jpeg, png and expat dev stuff to get rid of some warnings

Now I am stuck on "gstreamer":

checking what is the type of the fifth argument of getsockopt... socklen_t
checking for linux/joystick.h... yes
configure: WARNING: wxMetafile is not available on this system... disabled
checking for python... /usr/bin/python
checking for CAIRO... yes
checking for cairo_push_group... yes
checking for GST... configure: WARNING: GStreamer 0.10 not available, falling back to 0.8
checking for GST... configure: WARNING: GStreamer 0.8/0.10 not available.
configure: error: GStreamer not available
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
   File "build-wxpython.py", line 352, in <module>
     wxbuild.main(wxscript, build_options)
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 328, in main
     "Error running configure")
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 62, in exitIfError
     raise builder.BuildError, msg
BuildError

I had libgstreamer0.10.0 but not libgstreamer0.10dev, so installed that but still same error.

Werner

···

On 10/04/2011 12:09 PM, werner wrote:

Le 04/10/2011 14:51, werner a �crit :

···

On 10/04/2011 12:09 PM, werner wrote:

I like to check here before I go down the road of trial-error install process.

- Got 2.9.2.4 and extracted it
- cd to wxPython-src-2.9.2.4/wxpython
- python2.7 build-wxpython.py --build_dir=../bld

...

Used Synaptic to install libglib2.0-cil-dev and libgtk2.0-cil-dev both version 2.12.10 and tried the build again, but same failure.

Oops, above are not needed!

Installed the following:

- libgtk2.0-dev
- also loaded the tiff, jpeg, png and expat dev stuff to get rid of some warnings

Now I am stuck on "gstreamer":

checking what is the type of the fifth argument of getsockopt... socklen_t
checking for linux/joystick.h... yes
configure: WARNING: wxMetafile is not available on this system... disabled
checking for python... /usr/bin/python
checking for CAIRO... yes
checking for cairo_push_group... yes
checking for GST... configure: WARNING: GStreamer 0.10 not available, falling back to 0.8
checking for GST... configure: WARNING: GStreamer 0.8/0.10 not available.
configure: error: GStreamer not available
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build-wxpython.py", line 352, in <module>
    wxbuild.main(wxscript, build_options)
  File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 328, in main
    "Error running configure")
  File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 62, in exitIfError
    raise builder.BuildError, msg
BuildError

I had libgstreamer0.10.0 but not libgstreamer0.10dev, so installed that but still same error.

Werner

I had this problem in the past.
Now I install too "libgstreamer-plugins-base0.10-devel"
I'm not sure because, now I install many others packages to be sure nothing missing ...

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

...

I had libgstreamer0.10.0 but not libgstreamer0.10dev, so installed that but still same error.

Werner

I had this problem in the past.
Now I install too "libgstreamer-plugins-base0.10-devel"
I'm not sure because, now I install many others packages to be sure nothing missing ...

Thanks

I didn't need that one, but need libgconfmm2.6-dev (gconf was mentioned by Robin in some post I found with google), at the moment it is building, lets see how far I get.

Werner

···

On 10/04/2011 03:10 PM, Hugues JEAN-BAPTISTE wrote:

Still some errors:-( .

At the end of running "sudo python2.7 build-wxpython.py --build_dir=../bld --install" I see this:

copying wx/tools/Editra/THANKS -> /usr/local/lib/python2.7/site-packages/wx-2.9.2-gtk2/wx/tools/Editra
running install_egg_info
Writing /usr/local/lib/python2.7/site-packages/wx-2.9.2-gtk2/wxPython-2.9.2.4-py2.7.egg-info
warning: wx_install: path file '/usr/local/lib/python2.7/site-packages/wx-2.9.2-gtk2.pth' not created

package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
writing list of installed files to 'installed_files.txt'
**** /usr/local/bin/python2.7 -u /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/distrib/makemo.py

If I try the demo I get:

python2.7 demo/demo.py
Traceback (most recent call last):
   File "demo/demo.py", line 3, in <module>
     import Main
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/demo/Main.py", line 59, in <module>
     import wx
   File "/usr/local/lib/python2.7/site-packages/wx-2.9.2-gtk2/wx/__init__.py", line 45, in <module>
     from wx._core import *
   File "/usr/local/lib/python2.7/site-packages/wx-2.9.2-gtk2/wx/_core.py", line 4, in <module>
     import _core_
ImportError: libwx_gtk2u_xrc-2.9.so.2: cannot open shared object file: No such file or directory

After setting PYTHONPATH:
export PYTHONPATH='/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython'

I then get:

  python2.7 demo/demo.py
Traceback (most recent call last):
   File "demo/demo.py", line 3, in <module>
     import Main
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/demo/Main.py", line 59, in <module>
     import wx
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/wx/__init__.py", line 45, in <module>
     from wx._core import *
   File "/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/wx/_core.py", line 4, in <module>
     import _core_
ImportError: No module named _core_

Remove PYTHONPATH and do:
python2.7
>>> import sys
>>> sys.path
['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/wx-2.9.2-gtk2']
>>>
>>> import wx
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "wx/__init__.py", line 45, in <module>
     from wx._core import *
   File "wx/_core.py", line 4, in <module>
     import _core_
ImportError: No module named _core_

wx-2.9.2-gtk2 contains both _core.py and _core_.so

In "/usr/local/lib" I also have a bunch of "libwx_something" files.

Is this due to "site-packages/wx-2.9.2-gtk2.pth" not being created? If yes, what should that file contain?

Werner

It seems not to find "libwx_gtk2u_xrc-2.9.so.2" which has been put into "/usr/local/lib" by the install with all its friends. What is the correct folder on Ubuntu for these files?

Werner

It seems not to find "libwx_gtk2u_xrc-2.9.so.2" which has been put into "/usr/local/lib" by the install with all its friends. What is the correct folder on Ubuntu for these files?

that got resolved by doing

sudo ldconfig

As the Python I had manually installed missed zlib support and as Ubuntu now has a Py 2.7 in its repo I got rid of my manually installed version and installed the one from Ubuntu using Synaptic.

Now I get this exception:

>>> import wx
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python2.7/dist-packages/wx/__init__.py", line 45, in <module>
     from wx._core import *
   File "/usr/local/lib/python2.7/dist-packages/wx/_core.py", line 4, in <module>
     import _core_
ImportError: /usr/local/lib/python2.7/dist-packages/wx/_core_.so: undefined symbol: PyUnicodeUCS2_FromEncodedObject

Googling a bit I found some reference that it could be a mismatch:

>>> import sys
>>> sys.maxunicode
1114111

So, I did:

python2.7 build-wxpython.py --build_dir=../bld --clean

sudo python2.7 build-wxpython.py --build_dir=../bld --install

But I still get the PyUnicode error.

So, deinstalled Python 2.7 and made sure that folders where gone, reinstalled it.

sudo ldconfig

ldconfig -p | grep "libwx" only showed the 2.8 libraries

did another clean build of wxPython, when I try to import wx I get the error the _core_ is not found.

sudo ldconfig

start Python2.7 again and on import I again get the PyUnicode exception shown above.

Any hints on what else I need to look at are very much welcome:-)

Werner

···

On 10/04/2011 04:35 PM, werner wrote:

You've had a busy morning... :wink:

Python 2's unicode support can be built two different options, where the unicode objects are either based on UCS2 or they are UCS4. The source code unifies the two options by creating a set of macros in the API that calls one or the other sets of real functions based on how Python was built. Extension modules like wxPython use those macros and in a perfect world it all just works all the time. However, in the real world it's possible for an extension to be compiled thinking that Python is built the one way, but then at runtime it turns out that it is the other and you get errors like that. And on top of that, Python's default is the opposite of what linux distros usually use.

So in other words, the Python being used at runtime is either not the same Python that was used at build time, or the Python header files used at wxPython's build time do not match the build mode of the Python binary.

To further complicate things Python on Linux is usually built with the main interpreter and built-in modules being in a shared library, similar to the Python DLL on Windows. So that means that it is possible that running one Python executable could actually load the shared library from another build, if they happen to have the same names and the other shared lib is the first one found in the shared library path.

So here are the things that I would try to confirm this theory:

* Check if there is more than one Python2.7 installed, such as the one from the Ubuntu repository and one that you may have built yourself in the past.

* figure out which one of those is executed when you run "python" on the command line, and also check if perhaps a different python is being used to run setup.py

* use the ldd tool to see what shared libraries are being loaded by that python, and see if it's different than expected based on the prefix where that python executable is located

* You can also use ldd on one of the wxPython extension modules to see what it is loading.

If there is a custom built Python 2.7 then try to remove all traces of it and then clean and build wxPython again.

···

On 10/4/11 10:40 AM, werner wrote:

On 10/04/2011 04:35 PM, werner wrote:

It seems not to find "libwx_gtk2u_xrc-2.9.so.2" which has been put
into "/usr/local/lib" by the install with all its friends. What is the
correct folder on Ubuntu for these files?

that got resolved by doing

sudo ldconfig

As the Python I had manually installed missed zlib support and as Ubuntu
now has a Py 2.7 in its repo I got rid of my manually installed version
and installed the one from Ubuntu using Synaptic.

Now I get this exception:

>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/wx/__init__.py", line 45,
in <module>
from wx._core import *
File "/usr/local/lib/python2.7/dist-packages/wx/_core.py", line 4, in
<module>
import _core_
ImportError: /usr/local/lib/python2.7/dist-packages/wx/_core_.so:
undefined symbol: PyUnicodeUCS2_FromEncodedObject

--
Robin Dunn
Software Craftsman

It seems not to find "libwx_gtk2u_xrc-2.9.so.2" which has been put
into "/usr/local/lib" by the install with all its friends. What is the
correct folder on Ubuntu for these files?

that got resolved by doing

sudo ldconfig

As the Python I had manually installed missed zlib support and as Ubuntu
now has a Py 2.7 in its repo I got rid of my manually installed version
and installed the one from Ubuntu using Synaptic.

Now I get this exception:

>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/wx/__init__.py", line 45,
in <module>
from wx._core import *
File "/usr/local/lib/python2.7/dist-packages/wx/_core.py", line 4, in
<module>
import _core_
ImportError: /usr/local/lib/python2.7/dist-packages/wx/_core_.so:
undefined symbol: PyUnicodeUCS2_FromEncodedObject

You've had a busy morning... :wink:

Actually it is been more of a busy afternoon:-)

Python 2's unicode support can be built two different options, where the unicode objects are either based on UCS2 or they are UCS4. The source code unifies the two options by creating a set of macros in the API that calls one or the other sets of real functions based on how Python was built. Extension modules like wxPython use those macros and in a perfect world it all just works all the time. However, in the real world it's possible for an extension to be compiled thinking that Python is built the one way, but then at runtime it turns out that it is the other and you get errors like that. And on top of that, Python's default is the opposite of what linux distros usually use.

So in other words, the Python being used at runtime is either not the same Python that was used at build time, or the Python header files used at wxPython's build time do not match the build mode of the Python binary.

To further complicate things Python on Linux is usually built with the main interpreter and built-in modules being in a shared library, similar to the Python DLL on Windows. So that means that it is possible that running one Python executable could actually load the shared library from another build, if they happen to have the same names and the other shared lib is the first one found in the shared library path.

So here are the things that I would try to confirm this theory:

* Check if there is more than one Python2.7 installed, such as the one from the Ubuntu repository and one that you may have built yourself in the past.

* figure out which one of those is executed when you run "python" on the command line, and also check if perhaps a different python is being used to run setup.py

if I run python I get 2.6, I have to run python2.7 or python3.0 to run the "non" default one. Within setup.py there is the line "#!/usr/bin/env python" does this come into play here?

Is this a problem when doing:

python2.7 build-wxpython.py --build_dir=../bld --install

* use the ldd tool to see what shared libraries are being loaded by that python, and see if it's different than expected based on the prefix where that python executable is located

$ ldd python2.7
     linux-vdso.so.1 => (0x00007fff3fdff000)
     libpthread.so.0 => /lib/libpthread.so.0 (0x00007fed3c237000)
     libdl.so.2 => /lib/libdl.so.2 (0x00007fed3c033000)
     libutil.so.1 => /lib/libutil.so.1 (0x00007fed3be2f000)
     libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007fed3bbdd000)
     libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007fed3b851000)
     libz.so.1 => /lib/libz.so.1 (0x00007fed3b638000)
     libm.so.6 => /lib/libm.so.6 (0x00007fed3b3b5000)
     libc.so.6 => /lib/libc.so.6 (0x00007fed3b032000)
     /lib64/ld-linux-x86-64.so.2 (0x00007fed3c474000)
$ ldd python
     linux-vdso.so.1 => (0x00007fff751ff000)
     libpthread.so.0 => /lib/libpthread.so.0 (0x00007fdb4bf74000)
     libdl.so.2 => /lib/libdl.so.2 (0x00007fdb4bd70000)
     libutil.so.1 => /lib/libutil.so.1 (0x00007fdb4bb6c000)
     libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007fdb4b91a000)
     libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007fdb4b58e000)
     libz.so.1 => /lib/libz.so.1 (0x00007fdb4b375000)
     libm.so.6 => /lib/libm.so.6 (0x00007fdb4b0f2000)
     libc.so.6 => /lib/libc.so.6 (0x00007fdb4ad6f000)
     /lib64/ld-linux-x86-64.so.2 (0x00007fdb4c1b1000)

* You can also use ldd on one of the wxPython extension modules to see what it is loading.

cd /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
$ ldd _core_.so
     linux-vdso.so.1 => (0x00007fffc717f000)
     libwx_gtk2u_xrc-2.9.so.2 => /usr/local/lib/libwx_gtk2u_xrc-2.9.so.2 (0x00007f9dd8711000)
     libwx_gtk2u_html-2.9.so.2 => /usr/local/lib/libwx_gtk2u_html-2.9.so.2 (0x00007f9dd840c000)
     libwx_gtk2u_adv-2.9.so.2 => /usr/local/lib/libwx_gtk2u_adv-2.9.so.2 (0x00007f9dd804e000)
     libwx_gtk2u_core-2.9.so.2 => /usr/local/lib/libwx_gtk2u_core-2.9.so.2 (0x00007f9dd77f6000)
     libwx_baseu_xml-2.9.so.2 => /usr/local/lib/libwx_baseu_xml-2.9.so.2 (0x00007f9dd75e4000)
     libwx_baseu_net-2.9.so.2 => /usr/local/lib/libwx_baseu_net-2.9.so.2 (0x00007f9dd7393000)
     libwx_baseu-2.9.so.2 => /usr/local/lib/libwx_baseu-2.9.so.2 (0x00007f9dd6ebf000)
     libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f9dd6bb9000)
     libm.so.6 => /lib/libm.so.6 (0x00007f9dd6935000)
     libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f9dd671f000)
     libpthread.so.0 => /lib/libpthread.so.0 (0x00007f9dd6502000)
     libc.so.6 => /lib/libc.so.6 (0x00007f9dd617e000)
     /lib64/ld-linux-x86-64.so.2 (0x00007f9dd8e4e000)
     libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007f9dd5b60000)
     libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007f9dd58b1000)
     libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007f9dd5690000)
     libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007f9dd5385000)
     libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f9dd515c000)
     libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f9dd4f4f000)
     libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007f9dd4d33000)
     libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f9dd4a77000)
     libpng12.so.0 => /lib/libpng12.so.0 (0x00007f9dd4850000)
     libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f9dd4608000)
     libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f9dd4381000)
     libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f9dd414b000)
     libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f9dd3eff000)
     libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f9dd3cfb000)
     libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f9dd3af5000)
     librt.so.1 => /lib/librt.so.1 (0x00007f9dd38ed000)
     libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007f9dd360b000)
     libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f9dd32d4000)
     libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f9dd30cb000)
     libz.so.1 => /lib/libz.so.1 (0x00007f9dd2eb3000)
     libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f9dd2c8e000)
     libtiff.so.4 => /usr/lib/libtiff.so.4 (0x00007f9dd2a2c000)
     libdl.so.2 => /lib/libdl.so.2 (0x00007f9dd2828000)
     libexpat.so.1 => /lib/libexpat.so.1 (0x00007f9dd25fe000)
     libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f9dd23eb000)
     libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f9dd21e1000)
     libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f9dd1fde000)
     libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f9dd1dcd000)
     libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f9dd1bc4000)
     libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f9dd19ba000)
     libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f9dd17b6000)
     libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f9dd15b3000)
     libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f9dd13ad000)
     libpcre.so.3 => /lib/libpcre.so.3 (0x00007f9dd117b000)
     libresolv.so.2 => /lib/libresolv.so.2 (0x00007f9dd0f62000)
     libselinux.so.1 => /lib/libselinux.so.1 (0x00007f9dd0d43000)
     libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f9dd0ae4000)
     libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f9dd08e0000)
     libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f9dd06d7000)
     libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f9dd04ba000)
     libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f9dd029e000)
     libuuid.so.1 => /lib/libuuid.so.1 (0x00007f9dd0099000)
     libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f9dcfe95000)
     libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f9dcfc8f000)

If there is a custom built Python 2.7 then try to remove all traces of it and then clean and build wxPython again.

I only have one python2.7 executable on the whole file system which is in /usr/bin.

I have two python2.7 folders with .h files (same names but different dates, one in /usr/local/include and the other in /usr/include. Could that be the issue, as I suspect that the first one is the one from my manual install.

It is getting late over here. Tomorrow I will just get rid of 2.7 again and check that nothing is left from 2.7 is left in the filesystem and then start from there again.

Werner

···

On 10/04/2011 08:24 PM, Robin Dunn wrote:

On 10/4/11 10:40 AM, werner wrote:

On 10/04/2011 04:35 PM, werner wrote:

[...]

If there is a custom built Python 2.7 then try to remove all traces of
it and then clean and build wxPython again.

I only have one python2.7 executable on the whole file system which is
in /usr/bin.

I have two python2.7 folders with .h files (same names but different
dates, one in /usr/local/include and the other in /usr/include. Could
that be the issue, as I suspect that the first one is the one from my
manual install.

Yes, that could be the problem.

···

On 10/4/11 1:25 PM, werner wrote:

On 10/04/2011 08:24 PM, Robin Dunn wrote:

--
Robin Dunn
Software Craftsman

Robin,

[...]

If there is a custom built Python 2.7 then try to remove all traces of
it and then clean and build wxPython again.

I only have one python2.7 executable on the whole file system which is
in /usr/bin.

I have two python2.7 folders with .h files (same names but different
dates, one in /usr/local/include and the other in /usr/include. Could
that be the issue, as I suspect that the first one is the one from my
manual install.

Yes, that could be the problem.

Nope, still no joy. Just deleted that folder and did a clean/build/install again.

This morning I de-installed Py2.7 again and then did a build using Py 2.6 before installing Py 2.7 again.

Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxunicode
1114111
>>> import wx
>>> wx.version()
'2.9.2.4 gtk2 (classic)'
>>>

As you can see it works.

O.k. back to install Py 2.7

Still no joy.

python2.7
Python 2.7.0+ (r27:82500, May 9 2011, 20:36:12)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxunicode
1114111
>>> import wx
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python2.7/dist-packages/wx/__init__.py", line 45, in <module>
     from wx._core import *
   File "/usr/local/lib/python2.7/dist-packages/wx/_core.py", line 4, in <module>
     import _core_
ImportError: /usr/local/lib/python2.7/dist-packages/wx/_core_.so: undefined symbol: PyUnicodeUCS2_FromEncodedObject

I checked the sys.maxunicode for all my python installs and they all return the same value.

Looking at the "ldd" output (not sure what I look at on there) I see that both Python2.6 and Python2.7 point to the same "libwx etc" files.

Python2.7
ldd _core_.so
     linux-vdso.so.1 => (0x00007fffdd503000)
     libwx_gtk2u_xrc-2.9.so.2 => /usr/local/lib/libwx_gtk2u_xrc-2.9.so.2 (0x00007fdb8a789000)
     libwx_gtk2u_html-2.9.so.2 => /usr/local/lib/libwx_gtk2u_html-2.9.so.2 (0x00007fdb8a484000)
     libwx_gtk2u_adv-2.9.so.2 => /usr/local/lib/libwx_gtk2u_adv-2.9.so.2 (0x00007fdb8a0c6000)
     libwx_gtk2u_core-2.9.so.2 => /usr/local/lib/libwx_gtk2u_core-2.9.so.2 (0x00007fdb8986e000)
     libwx_baseu_xml-2.9.so.2 => /usr/local/lib/libwx_baseu_xml-2.9.so.2 (0x00007fdb8965c000)
     libwx_baseu_net-2.9.so.2 => /usr/local/lib/libwx_baseu_net-2.9.so.2 (0x00007fdb8940b000)
     libwx_baseu-2.9.so.2 => /usr/local/lib/libwx_baseu-2.9.so.2 (0x00007fdb88f37000)
     libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fdb88c31000)

Python2.6 (aka python on my machine)
$ ldd _core_.so
     linux-vdso.so.1 => (0x00007fff50bff000)
     libwx_gtk2u_xrc-2.9.so.2 => /usr/local/lib/libwx_gtk2u_xrc-2.9.so.2 (0x00007f64090ed000)
     libwx_gtk2u_html-2.9.so.2 => /usr/local/lib/libwx_gtk2u_html-2.9.so.2 (0x00007f6408de8000)
     libwx_gtk2u_adv-2.9.so.2 => /usr/local/lib/libwx_gtk2u_adv-2.9.so.2 (0x00007f6408a2a000)
     libwx_gtk2u_core-2.9.so.2 => /usr/local/lib/libwx_gtk2u_core-2.9.so.2 (0x00007f64081d2000)
     libwx_baseu_xml-2.9.so.2 => /usr/local/lib/libwx_baseu_xml-2.9.so.2 (0x00007f6407fc0000)
     libwx_baseu_net-2.9.so.2 => /usr/local/lib/libwx_baseu_net-2.9.so.2 (0x00007f6407d6f000)
     libwx_baseu-2.9.so.2 => /usr/local/lib/libwx_baseu-2.9.so.2 (0x00007f640789b000)
     libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6407595000)

Totally confused:-(

Werner

···

On 10/04/2011 11:53 PM, Robin Dunn wrote:

On 10/4/11 1:25 PM, werner wrote:

On 10/04/2011 08:24 PM, Robin Dunn wrote:

Robin,

Some additional info.

With Py 2.6 I run the wxPython demo, i.e. it starts I can select a demo, e.g. wx.AUI and run it and close it, but then I can't select another demo.

Don't see any traceback.

When I run Editra it runs fine, don't see any hang, but I see a lot of flickering, e.g. just typing in the pyShell.

Werner

Ok. Try running the build again and show me the command you use to execute build-wxpython.py, the first dozen or so lines of output from the script, and also a dozen or so lines starting where it executes setup.py up to the first couple gcc commands after that. You can use the prior wxWidgets part of the build if you want to save time (so don't clean its build dirs) as I'm just interested in the wxPython part of the build at this point.

···

On 10/5/11 3:29 AM, werner wrote:

Robin,

On 10/04/2011 11:53 PM, Robin Dunn wrote:

On 10/4/11 1:25 PM, werner wrote:

On 10/04/2011 08:24 PM, Robin Dunn wrote:

[...]

If there is a custom built Python 2.7 then try to remove all traces of
it and then clean and build wxPython again.

I only have one python2.7 executable on the whole file system which is
in /usr/bin.

I have two python2.7 folders with .h files (same names but different
dates, one in /usr/local/include and the other in /usr/include. Could
that be the issue, as I suspect that the first one is the one from my
manual install.

Yes, that could be the problem.

Nope, still no joy. Just deleted that folder and did a
clean/build/install again.

This morning I de-installed Py2.7 again and then did a build using Py
2.6 before installing Py 2.7 again.

Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxunicode
1114111
>>> import wx
>>> wx.version()
'2.9.2.4 gtk2 (classic)'
>>>

As you can see it works.

O.k. back to install Py 2.7

Still no joy.

--
Robin Dunn
Software Craftsman

Hi Robin,

...

Ok. Try running the build again and show me the command you use to execute build-wxpython.py, the first dozen or so lines of output from the script, and also a dozen or so lines starting where it executes setup.py up to the first couple gcc commands after that. You can use the prior wxWidgets part of the build if you want to save time (so don't clean its build dirs) as I'm just interested in the wxPython part of the build at this point.

sudo python2.7 build-wxpython.py --build_dir=../bld --install

If I run above with python or python2.6 it builds and I can run it but as mentioned in the latest post I think there are still problems. Unless there is an obvious solution to you this can wait as far as I am concerned - just wanted to start testing under Ubuntu work I am doing under 2.9 on Win7.

old_options = set(['--install', '--build_dir=../bld'])
sys.argv = ['--build_dir=../bld', '--install']
wxWidgets directory is: /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4
wxWidgets build options: ['--wxpython', '--jobs=4', '--prefix=/usr/local', '--unicode', '--no_config', '--installdir=', '--install', '--builddir=/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/bld']
Configure options: ['--enable-unicode', '--prefix=/usr/local', '--with-opengl', '--enable-sound', '--enable-graphics_ctx', '--enable-mediactrl', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--with-sdl', '--with-gnomeprint']
/usr/bin/make
make --jobs=4
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make all ; fi)
make[1]: Entering directory `/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/bld/utils/wxrc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/bld/utils/wxrc'
/usr/bin/make
make install
/usr/bin/install -c -d /usr/local/lib

If I don't do a clean/install I don't see any "gcc" compile lines, so following is from where setup.py is run to the end:

···

On 10/05/2011 07:37 PM, Robin Dunn wrote:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DESTDIR:
PREFIX: /usr/local
wxlocation: /usr/local
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
**** /usr/bin/python2.7 -u ./setup.py build UNICODE=1 BUILD_BASE=build WX_CONFIG="/usr/local/bin/wx-config --prefix=/usr/local"
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running build
running build_py
running build
running build_py
copying wx/__version__.py -> build/lib.linux-x86_64-2.7/wx
copying wx/build/build_options.py -> build/lib.linux-x86_64-2.7/wx/build
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
running build_scripts
**** /usr/bin/python2.7 -u ./setup.py install UNICODE=1 BUILD_BASE=build WX_CONFIG="/usr/local/bin/wx-config --prefix=/usr/local" --record installed_files.txt
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running install
running build
running build_py
running install_lib
copying build/lib.linux-x86_64-2.7/wx/_webkit.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_grid.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_misc_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/build/build_options.py -> /usr/local/lib/python2.7/dist-packages/wx/build
copying build/lib.linux-x86_64-2.7/wx/_gizmos.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_richtext.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_media.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_controls_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_xrc.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_glcanvas.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_aui.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_windows_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_gdi_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_combo.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_dataview.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_calendar.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_animate.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_html.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_propgrid.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_wizard.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/__version__.py -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_core_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_stc.so -> /usr/local/lib/python2.7/dist-packages/wx
byte-compiling /usr/local/lib/python2.7/dist-packages/wx/build/build_options.py to build_options.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/wx/__version__.py to __version__.pyc
running install_data
copying src/wx.pth -> /usr/local/lib/python2.7/dist-packages/
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/wxPython_common-2.9.2.4.egg-info
Writing /usr/local/lib/python2.7/dist-packages/wxPython_common-2.9.2.4.egg-info
writing list of installed files to 'installed_files.txt'
running install
running build
running build_py
copying wx/__version__.py -> build/lib.linux-x86_64-2.7/wx
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
running build_scripts
running install_lib
copying build/lib.linux-x86_64-2.7/wx/_webkit.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_grid.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_misc_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/build/build_options.py -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx/build
copying build/lib.linux-x86_64-2.7/wx/_gizmos.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_richtext.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_media.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_controls_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_xrc.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_glcanvas.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_aui.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_windows_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_gdi_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_combo.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_dataview.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_calendar.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_animate.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_html.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_propgrid.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_wizard.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/__version__.py -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_core_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_stc.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
byte-compiling /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx/build/build_options.py to build_options.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx/__version__.py to __version__.pyc
running install_headers
running install_scripts
changing mode of /usr/local/bin/pyshell to 755
changing mode of /usr/local/bin/xrced to 755
changing mode of /usr/local/bin/helpviewer to 755
changing mode of /usr/local/bin/img2png to 755
changing mode of /usr/local/bin/pywrap to 755
changing mode of /usr/local/bin/pyalacarte to 755
changing mode of /usr/local/bin/pywxrc to 755
changing mode of /usr/local/bin/img2py to 755
changing mode of /usr/local/bin/pycrust to 755
changing mode of /usr/local/bin/pyalamode to 755
changing mode of /usr/local/bin/img2xpm to 755
changing mode of /usr/local/bin/editra to 755
running install_data
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wxPython-2.9.2.4.egg-info
Writing /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wxPython-2.9.2.4.egg-info
warning: wx_install: path file '/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2.pth' not created

package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
writing list of installed files to 'installed_files.txt'
**** /usr/bin/python2.7 -u /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/distrib/makemo.py
------------ BUILD FINISHED ------------

To run the wxPython demo you may need to:
  - set your PYTHONPATH variable to /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython

And then:
  - Run python demo/demo.py

Ok, let's try it once more. Please remove the wxPython/build folder and run the build again, capturing the lines starting with the setup.py command.

One more thing to check, run this and copy the output to your reply:

   /usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"

···

On 10/5/11 10:55 AM, werner wrote:

If I don't do a clean/install I don't see any "gcc" compile lines, so
following is from where setup.py is run to the end:

--
Robin Dunn
Software Craftsman

/usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"
['',
  '/usr/lib/python2.7',
  '/usr/lib/python2.7/plat-linux2',
  '/usr/lib/python2.7/lib-tk',
  '/usr/lib/python2.7/lib-old',
  '/usr/lib/python2.7/lib-dynload',
  '/usr/local/lib/python2.7/dist-packages',
  '/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2',
  '/usr/lib/python2.7/dist-packages']

Hhm, still don't see and "gcc" lines. If I do "gcc -v" I get this:

gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)

As I did a "--clean" I now get tons of these:

/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/bld/bk-deps g++ -c -o wxscintilla_Selection.o -DNDEBUG -I/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/src/stc/scintilla/include -I/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -DWXUSINGDLL -D__WXGTK__ -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -I/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/bld/lib/wx/include/gtk2-unicode-2.9 -I/home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -DG_DISABLE_CAST_CHECKS -pthread -DORBIT2=1 -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -DWX_PRECOMP -pthread -O2 -fno-strict-aliasing -pthread -I/usr/include/gtk-unix-print-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -fvisibility=hidden -fvisibility-inlines-hidden /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/src/stc/scintilla/src/Selection.cxx

Following the output just before setup.py is run up to the end of the build, also it looks the same/similar to what I had before.

  wx/richtext/richtextborderspage.h wx/richtext/richtextbuffer.h wx/richtext/richtextbulletspage.h wx/richtext/richtextctrl.h wx/richtext/richtextdialogpage.h wx/richtext/richtextfontpage.h wx/richtext/richtextformatdlg.h wx/richtext/richtexthtml.h wx/richtext/richtextimagedlg.h wx/richtext/richtextindentspage.h wx/richtext/richtextliststylepage.h wx/richtext/richtextmarginspage.h wx/richtext/richtextprint.h wx/richtext/richtextsizepage.h wx/richtext/richtextstyledlg.h wx/richtext/richtextstylepage.h wx/richtext/richtextstyles.h wx/richtext/richtextsymboldlg.h wx/richtext/richtextuicustomization.h wx/richtext/richtextxml.h wx/stc/stc.h; do \
     if test ! -d /usr/local/include/wx-2.9/`dirname $f` ; then \
     /usr/bin/install -c -d /usr/local/include/wx-2.9/`dirname $f`; \
     fi; \
     /usr/bin/install -c -m 644 /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/include/$f /usr/local/include/wx-2.9/$f; \
     done

···

On 10/05/2011 08:28 PM, Robin Dunn wrote:

On 10/5/11 10:55 AM, werner wrote:

If I don't do a clean/install I don't see any "gcc" compile lines, so
following is from where setup.py is run to the end:

Ok, let's try it once more. Please remove the wxPython/build folder and run the build again, capturing the lines starting with the setup.py command.

One more thing to check, run this and copy the output to your reply:

  /usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"

  ------------------------------------------------------

  The installation of wxWidgets is finished. On certain
  platforms (e.g. Linux) you'll now have to run ldconfig
  if you installed a shared library and also modify the
  LD_LIBRARY_PATH (or equivalent) environment variable.

  wxWidgets comes with no guarantees and doesn't claim
  to be suitable for any purpose.

  Read the wxWindows Licence on licencing conditions.

  ------------------------------------------------------

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DESTDIR:
PREFIX: /usr/local
wxlocation: /usr/local
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
**** /usr/bin/python2.7 -u ./setup.py build UNICODE=1 BUILD_BASE=build WX_CONFIG="/usr/local/bin/wx-config --prefix=/usr/local"
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running build
running build_py
running build
running build_py
copying wx/__version__.py -> build/lib.linux-x86_64-2.7/wx
copying wx/build/build_options.py -> build/lib.linux-x86_64-2.7/wx/build
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
running build_scripts
**** /usr/bin/python2.7 -u ./setup.py install UNICODE=1 BUILD_BASE=build WX_CONFIG="/usr/local/bin/wx-config --prefix=/usr/local" --record installed_files.txt
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running install
running build
running build_py
running install_lib
copying build/lib.linux-x86_64-2.7/wx/_webkit.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_grid.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_misc_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/build/build_options.py -> /usr/local/lib/python2.7/dist-packages/wx/build
copying build/lib.linux-x86_64-2.7/wx/_gizmos.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_richtext.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_media.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_controls_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_xrc.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_glcanvas.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_aui.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_windows_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_gdi_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_combo.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_dataview.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_calendar.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_animate.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_html.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_propgrid.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_wizard.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/__version__.py -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_core_.so -> /usr/local/lib/python2.7/dist-packages/wx
copying build/lib.linux-x86_64-2.7/wx/_stc.so -> /usr/local/lib/python2.7/dist-packages/wx
byte-compiling /usr/local/lib/python2.7/dist-packages/wx/build/build_options.py to build_options.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/wx/__version__.py to __version__.pyc
running install_data
copying src/wx.pth -> /usr/local/lib/python2.7/dist-packages/
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/wxPython_common-2.9.2.4.egg-info
Writing /usr/local/lib/python2.7/dist-packages/wxPython_common-2.9.2.4.egg-info
writing list of installed files to 'installed_files.txt'
running install
running build
running build_py
copying wx/__version__.py -> build/lib.linux-x86_64-2.7/wx
copying wx/build/build_options.py -> build/lib.linux-x86_64-2.7/wx/build
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
running build_scripts
running install_lib
copying build/lib.linux-x86_64-2.7/wx/_webkit.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_grid.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_misc_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/build/build_options.py -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx/build
copying build/lib.linux-x86_64-2.7/wx/_gizmos.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_richtext.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_media.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_controls_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_xrc.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_glcanvas.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_aui.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_windows_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_gdi_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_combo.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_dataview.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_calendar.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_animate.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_html.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_propgrid.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_wizard.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/__version__.py -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_core_.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
copying build/lib.linux-x86_64-2.7/wx/_stc.so -> /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx
byte-compiling /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx/build/build_options.py to build_options.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx/__version__.py to __version__.pyc
running install_headers
running install_scripts
changing mode of /usr/local/bin/pyshell to 755
changing mode of /usr/local/bin/xrced to 755
changing mode of /usr/local/bin/helpviewer to 755
changing mode of /usr/local/bin/img2png to 755
changing mode of /usr/local/bin/pywrap to 755
changing mode of /usr/local/bin/pyalacarte to 755
changing mode of /usr/local/bin/pywxrc to 755
changing mode of /usr/local/bin/img2py to 755
changing mode of /usr/local/bin/pycrust to 755
changing mode of /usr/local/bin/pyalamode to 755
changing mode of /usr/local/bin/img2xpm to 755
changing mode of /usr/local/bin/editra to 755
running install_data
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wxPython-2.9.2.4.egg-info
Writing /usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wxPython-2.9.2.4.egg-info
warning: wx_install: path file '/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2.pth' not created

package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
writing list of installed files to 'installed_files.txt'
**** /usr/bin/python2.7 -u /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython/distrib/makemo.py
------------ BUILD FINISHED ------------

To run the wxPython demo you may need to:
  - set your PYTHONPATH variable to /home/wbruhin/devTools/wxSources/wxPython-src-2.9.2.4/wxPython

And then:
  - Run python demo/demo.py

Time to download the source package again and have another try?

Werner

If I don't do a clean/install I don't see any "gcc" compile lines, so
following is from where setup.py is run to the end:

Ok, let's try it once more. Please remove the wxPython/build folder
and run the build again, capturing the lines starting with the
setup.py command.

One more thing to check, run this and copy the output to your reply:

/usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"

/usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"
['',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2',
'/usr/lib/python2.7/dist-packages']

That looks ok...

Hhm, still don't see and "gcc" lines. If I do "gcc -v" I get this:

g++ qualifies too, however if the wxPython extensions are not being recompiled for some reason then it could be that you are still installing binaries that were built before you removed the extra Python 2.7... Did you try manually removing the wxPython/build dir?

There is yet another oddity in the setup.py output you shared. It seems to be installing wxPython extensions modules in two places. Here:

copying build/lib.linux-x86_64-2.7/wx/_core_.so ->
/usr/local/lib/python2.7/dist-packages/wx

and here:

copying build/lib.linux-x86_64-2.7/wx/_core_.so ->
/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx

I've never seen distutils do that before, but then I usually don't install my development versions of wxPython so it would be easy for me to miss it. It may also be something to do with Ubuntu's distutils customizations...

If you attempt another build you should manually remove those two destination folders before doing it, and then see if you end up with both of them again. If so then I'd be interested in whether they both have a complete copy of the wx pacakge.

I've got a 64-bit Ubuntu VM that I can upgrade to 10.10 later, I'll see if I also run into these issues there.

···

On 10/5/11 12:36 PM, werner wrote:

On 10/05/2011 08:28 PM, Robin Dunn wrote:

On 10/5/11 10:55 AM, werner wrote:

--
Robin Dunn
Software Craftsman

If I don't do a clean/install I don't see any "gcc" compile lines, so
following is from where setup.py is run to the end:

Ok, let's try it once more. Please remove the wxPython/build folder
and run the build again, capturing the lines starting with the
setup.py command.

One more thing to check, run this and copy the output to your reply:

/usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"

/usr/bin/python2.7 -c "import sys,pprint; pprint.pprint(sys.path)"
['',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2',
'/usr/lib/python2.7/dist-packages']

That looks ok...

Hhm, still don't see and "gcc" lines. If I do "gcc -v" I get this:

g++ qualifies too, however if the wxPython extensions are not being recompiled for some reason then it could be that you are still installing binaries that were built before you removed the extra Python 2.7... Did you try manually removing the wxPython/build dir?

There is yet another oddity in the setup.py output you shared. It seems to be installing wxPython extensions modules in two places. Here:

copying build/lib.linux-x86_64-2.7/wx/_core_.so ->
/usr/local/lib/python2.7/dist-packages/wx

and here:

copying build/lib.linux-x86_64-2.7/wx/_core_.so ->
/usr/local/lib/python2.7/dist-packages/wx-2.9.2-gtk2/wx

I noticed that the other day too, so before building again I removed all the wx stuff in dist-packages. It got created again and both these folders contain 71 items.

I've never seen distutils do that before, but then I usually don't install my development versions of wxPython so it would be easy for me to miss it. It may also be something to do with Ubuntu's distutils customizations...

If you attempt another build you should manually remove those two destination folders before doing it, and then see if you end up with both of them again. If so then I'd be interested in whether they both have a complete copy of the wx pacakge.

Just did (btw, I thought "--clean" would remove the wx and the wxPython build folders, but it only removes the first one) and now it builds and "import wx" works.

As noted above still have two copies of the "wx" folder under dist-packages.

When I run e.g. editra and type in the PyShell tab I see a "refresh flicker" on each key stroke and when I run demo.py I can only run one demo before it hangs - btw what is the trick to see the console window when one runs the demo on Ubuntu?

I've got a 64-bit Ubuntu VM that I can upgrade to 10.10 later, I'll see if I also run into these issues there.

The compile mistery is solved, maybe the build script default would remove both the wx and wxPython bld/build folders and one has to set an option if one does not want that behaviour.

There must still be something wrong otherwise the demo would work correctly - let me know if you want me to try anything else.

Werner

···

On 10/05/2011 11:34 PM, Robin Dunn wrote:

On 10/5/11 12:36 PM, werner wrote:

On 10/05/2011 08:28 PM, Robin Dunn wrote:

On 10/5/11 10:55 AM, werner wrote:

When I run e.g. editra and type in the PyShell tab I see a "refresh
flicker" on each key stroke

This is a known problem, and probably in the C++ code. I haven't tried to track it down yet myself though.

and when I run demo.py I can only run one
demo before it hangs -

Hmmm... It just happened here too. I'll see if I can find out what's going on.

btw what is the trick to see the console window
when one runs the demo on Ubuntu?

If you mean a terminal/command-line window then you can just run the demo from an existing terminal. Otherwise you can get a plain PyShell with F5, a WIT with F6, or turn on the stdout redirection with an option in the File menu, (which should be moved to the Options menu...)

···

On 10/6/11 2:51 AM, werner wrote:

--
Robin Dunn
Software Craftsman

Hi,

···

On Thu, Oct 6, 2011 at 2:25 PM, Robin Dunn <robin@alldunn.com> wrote:

On 10/6/11 2:51 AM, werner wrote:

When I run e.g. editra and type in the PyShell tab I see a "refresh
flicker" on each key stroke

This is a known problem, and probably in the C++ code. I haven't tried to
track it down yet myself though.

Would have to dig through my change history but I think that it was
related to when the buffer had the 'fold' property turned on. I had
committed some fixes to the main text buffer some time back that got
rid of the flickering there by turning off the folding.

Cody