Compiling Wxpython


zapman

Member
Joined
Jul 23, 2009
Messages
324
Age
46
Location
EU
Hi,

I didn't find anything about wxPython on the Pandora so I tried to compile it myself. After about 2h of working, my Pandora gives me this error message, that I can't understand:

Code:
 /bld/bk-deps g++ -c -o mediadll_unix_mediactrl.o -I./.pch/wxprec_mediadll -D__WXGTK__      -DWXBUILDING      -I/test/wxPython-src-2.9.3.1/src/regex  -DWXUSINGDLL -DWXMAKINGDLL_MEDIA -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/bld/lib/wx/include/gtk2-unicode-2.9 -I/test/wxPython-src-2.9.3.1/include -pthread -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include -pthread -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libxml2 -I/usr/local/include -DWX_PRECOMP -pthread -O2 -fno-strict-aliasing -pthread -I/usr/local/include/gtk-unix-print-2.0 -I/usr/local/include/gtk-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -fvisibility=hidden -fvisibility-inlines-hidden /test/wxPython-src-2.9.3.1/src/unix/mediactrl.cpp
 /test/wxPython-src-2.9.3.1/src/unix/mediactrl.cpp:21:61: fatal error: gst/gst.h: No such file or directory
 compilation terminated.
 make: *** [mediadll_unix_mediactrl.o] Error 1
 Error building
 ERROR: failed building wxWidgets
 Traceback (most recent call last):
   File "/test/wxPython-src-2.9.3.1/wxPython/build-wxpython.py", line 352, in <module>
     wxbuild.main(wxscript, build_options)
   File "/test/wxPython-src-2.9.3.1/build/tools/build-wxwidgets.py", line 438, in main
     exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building")
   File "/test/wxPython-src-2.9.3.1/build/tools/build-wxwidgets.py", line 62, in exitIfError
     raise builder.BuildError, msg
 BuildError
 tusters_kasten:/$

Is that an error that tells you what is the problem? It sais that it can't find "gst/gst.h" but I have no clue why that is.. Could you tell me how to proceed?

Thx!
 
zapman said:
Is that an error that tells you what is the problem? It sais that it can't find "gst/gst.h" but I have no clue why that is.. Could you tell me how to proceed?
gst/gst.h is part of one the gstreamer header package. get that ;)
 
Last edited by a moderator:
I did that (gstreamer as well as gstreamer-dev) from the angstrom repo but I got still the same error. Now I'm trying to compile it without mediastr.. will see how that turns out..
 
/usr/include/gstreamer-0.10 is not part of your -I list for gcc. thuss it cannot find gst/gst.h.
Does pkg-config actually found gstreamer ? If so that sound like a bug in wxPython configure script.
you might want to add a symlink to /usr/include/gstreamer-0.10/gst as /usr/include/gst as a work-around ;)
 
sebt3 said:
/usr/include/gstreamer-0.10 is not part of your -I list for gcc. thuss it cannot find gst/gst.h.
Does pkg-config actually found gstreamer ? If so that sound like a bug in wxPython configure script.
you might want to add a symlink to /usr/include/gstreamer-0.10/gst as /usr/include/gst as a work-around ;)

yes, that's a good idea.
In the meantime I was successful compiling wxPython without mediactrl and installed it also without any error messages to my SD card (which is root). After install I get this message:

Code:
   ------------------------------------------------------
   
   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.
   
   ------------------------------------------------------

'sudo ldconfig' gives back

Code:
  tusters_kasten:/test/wxPython-src-2.9.3.1$ sudo ldconfig
  ldconfig: Can't open configuration file /etc/ld.so.conf: No such file or directory
  ldconfig: /usr/lib/libpnd.so.1 is not a symbolic link
  
  ldconfig: /usr/lib/libGLES2D.so.1 is not a symbolic link

How does the pandora handle its libraries if there is no /etc/ld.so.conf ?

The python program that I want to be able to run also tells me that

Code:
WX is not installed. This program requires WX to run.
  Traceback (most recent call last):
    File "pronterface.py", line 28, in <module>
      import wx
  ImportError: No module named wx
:(

starting the python script with 'LD_LIBRARY_PATH="/usr/lib" python pronterface.py' doesn't help either. 'ldconfig -v' gives back this output.


What could I try next?
 
Last edited by a moderator:
In your run-script, specify LD_LIBRARY_PATH (which is the user override for ld conf); or you could change the ENV in the top of your pytnon code which should do it (before you do the import of the lib.)

Its probably a Bad Idea to change ld conf to point ot removable media anyway :) (ie: it might not be there, so caching coudl get confused, but it also opens you to an attack vector for people putting in an evil lib; probably not a concern for you, but still :)

jeff
 
skeezix said:
Its probably a Bad Idea to change ld conf to point ot removable media anyway
but when running a PND it's not running from a removable device, but from a virtual point... well maybe that's even worst ;)
 
Last edited by a moderator:
skeezix said:
In your run-script, specify LD_LIBRARY_PATH (which is the user override for ld conf); or you could change the ENV in the top of your pytnon code which should do it (before you do the import of the lib.)

Its probably a Bad Idea to change ld conf to point ot removable media anyway :) (ie: it might not be there, so caching coudl get confused, but it also opens you to an attack vector for people putting in an evil lib; probably not a concern for you, but still :)

jeff

I did that, running 'LD_LIBRARY_PATH="/usr/lib" python pronterface.py' but still there is no wx to be found. 'ldconfig -v' gives back this output (not '*ws*' string in all that output) but there are 32 files in /usr/lib/ that start with libwx_*
What is wrong with my install?
And I still don't get it, how there can be no /etc/ld.so.conf? How does the pandora handle its libraries if there is no such file?
 
Last edited by a moderator:
zapman said:
And I still don't get it, how there can be no /etc/ld.so.conf? How does the pandora handle its libraries if there is no such file?
/lib and /usr/lib are standard point for libraries. there is no need to tell the OS the libraries could be found there : the system will have a look there anyway.
You need to specify something when you have libraries in less common place (/usr/local/lib, /mnt/utmp/mypnd/lib etc). And then you have 2 ways to tell where to look at : a system-wide solution (/etc/ld.so.conf) an a per-user solution LD_LIBRARY_PATH

EDIT: where are your libwx_* files installed ?
 
Last edited by a moderator:
Theres more solutions too, for bins; you can mark a binary so the loader will look in other locations for libs as well .. look at flags to ld, you can stamp in extra searchpaths; pretty drned handy sometimes, but not for this, since it s apyscript and we're not marking up the python executable itself here. But in general, some cool options in ld, take a peek :)

Be clear.. are your libs in your pnd, or you putting them in /usr/lib, or /somewhere/else?

If you're dumping them in /usr/lib, you don't need any mods, they'll just be found; if not, then they are named improperly, or built for wrong architecture, or something else.

But for python libs, you need not just the lib*so bit in /usr/lib/wherever, you need the py-modules and such; are those not being found?

What actual error messages you getting?

Did you get a hello world C app working to wx? did you get hello world from py working?

Bit bi by, test by testm, which parts fail and what output?

jeff
 
sebt3 said:
zapman said:
And I still don't get it, how there can be no /etc/ld.so.conf? How does the pandora handle its libraries if there is no such file?
/lib and /usr/lib are standard point for libraries. there is no need to tell the OS the libraries could be found there : the system will have a look there anyway.
You need to specify something when you have libraries in less common place (/usr/local/lib, /mnt/utmp/mypnd/lib etc). And then you have 2 ways to tell where to look at : a system-wide solution (/etc/ld.so.conf) an a per-user solution LD_LIBRARY_PATH

EDIT: where are your libwx_* files installed ?

I found the libwx_* files mentioned in /usr/lib.

skeezix said:
Be clear.. are your libs in your pnd, or you putting them in /usr/lib, or /somewhere/else?

I installed them with 'make install' after I compiled the wxPython package myself (I used the developer environment from http://forum.gp2x.de...hp?f=24&t=11865 ). So the files got put in /usr/lib and other places by the installer I guess.

skeezix said:
But for python libs, you need not just the lib*so bit in /usr/lib/wherever, you need the py-modules and such; are those not being found?
Yes, that'S exactly the problem. The python program I want to use says
Code:
 WX is not installed. This program requires WX to run.
   Traceback (most recent call last):
     File "pronterface.py", line 28, in <module>
       import wx
   ImportError: No module named wx

I assume those modules should be there after I installed wxPython? Is there an extra step necessary to get the wx python modules as well?

Python 2.6 is available on all Pandodas and works without problems. Can you elaborate a bit more on the 'Bit bi by' test as well as 'Did you get a hello world C app working to wx'?


Thanks so far, skeezix and sebt3!
 
Last edited by a moderator:
Quick one -- "So the files got put in /usr/lib and other places by the installer I guess" Don't guess, be sure ;) Especially with union filesystem and overlays and so on .. I don't know which dev env you're using, but if you're for instance using one of the pnd based kits, maybe it is set up so make install is sending to SD .. perhaps in its appdata, and thus not visible if the dev enviornment is not up, or at least not in a place you're expecting .. ie: maybe you need to put into LD_LIBRARY_PATH to /nt/utmp/cdevtools/lib or something .. have to look into it. Poke around in your nand with the dir browser or ls etc to find out if the py modules got installed; use a one liner py script to sput out the module path so you knwo where it can look, and take a look :) It might take a few minutes of tedium, but theres not too much magic -- python can tell you where it looks, so check those locations; if the modules aren't there, the install for wxpython didn't work or whatever; etc :) Nto enough for us to go on .. you need to do some legwork :) jeff
 
My dev-SD card died on me, I may have ejected it too early while shutting down. :(
In order to play around with wxPython I have to set up my test-os again and recompile wxPython which I'm fed up with atm. I will have a break on this and resume when I regain my wits; that may take some time.. thanks for support so far, I'll let you know when I resume my quest
 
Back
Top