Subject: [Thuban-list] installing Thuban locally fails

From: Tim Michelsen <[email-masked]>
Date: Fri, 23 May 2008 00:57:01 +0200

Hello,
I tried to install Thuban locally as written in the README.

It fails:

$ python setup.py install_local
sh: wx-config: not found
"wx-config --cflags " failed
sh: gdal-config: not found
"gdal-config --cflags " failed
running install_local
running build_py
running build_ext
building 'Lib.wxproj' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -Ilibraries/shapelib -I/usr/local/include 
-Ilibraries/pyshapelib/ -I/usr/include/python2.5 -c 
libraries/thuban/wxproj.cpp -o 
build/temp.linux-i686-2.5/libraries/thuban/wxproj.o
cc1plus: Warnung: Kommandozeilenoption "-Wstrict-prototypes" ist gültig 
für Ada/C/ObjC, aber nicht für C++
libraries/thuban/wxproj.cpp:23:19: Fehler: wx/wx.h: No such file or 
directory
libraries/thuban/wxproj.cpp:32:34: Fehler: wx/wxPython/wxPython.h: No 
such file or directory
libraries/thuban/wxproj.cpp: In function »bool 
wxPyConvertSwigPtr(PyObject*, void**, char*)«:
libraries/thuban/wxproj.cpp:54: Fehler: »wxPyCoreAPIPtr« wurde in diesem 
Gültigkeitsbereich nicht definiert
libraries/thuban/wxproj.cpp:55: Fehler: »wxPyCoreAPI_IMPORT« wurde in 
diesem Gültigkeitsbereich nicht definiert
libraries/thuban/wxproj.cpp:57: Fehler: »SWIG_GetPtrObj« wurde in diesem 
Gültigkeitsbereich nicht definiert
libraries/thuban/wxproj.cpp: At global scope:
libraries/thuban/wxproj.cpp:180: Fehler: expected initializer before »*« 
token
libraries/thuban/wxproj.cpp:68: Warnung: »pyshapelib_api« definiert, 
aber nicht verwendet
libraries/thuban/wxproj.cpp:126: Warnung: »void project_point(double*, 
double*, void**, void**, double, double, double, double, double, 
double)« definiert, aber nicht verwendet
error: command 'gcc' failed with exit status 1

I use Ubuntu 8.04.

I'd be happy to receive some help here.

Thanks for your help in advance.

Regards,

Timmie

---

From: Bernhard Reiter <[email-masked]>
Date: Fri, 23 May 2008 14:33:20 +0200

Hello Tim,

> "gdal-config --cflags " failed

thanks for trying and reporting here.
It seem the README was not clear enough about a few things.
I just improved it, here are some of the new lines:

Requirements for building and running Thuban.
------------
Building and installing
-----------------------

(First make sure the development variants of the software listed
in the "Requirements" section above is installed.)

So you would need to install the development packages
for the things listed in "Requirements".
E.g. stuff like libwxbase2.8-dev.

> I use Ubuntu 8.04.

There is a posting which shows the process for Debian Etch,
it might serve as an example for Ubuntu, of course you would need
to use package names and versiono from Ubuntu.
http://intevation.de/pipermail/thuban-list/2007-December/000697.html

Best,
Bernhard

-- 
Managing Director - Owner: www.intevation.net       (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

---

From: Tim Michelsen <[email-masked]>
Date: Fri, 23 May 2008 21:58:16 +0200

Hi,
thanks for your response.

I checkout out from SVN trunk.
> Requirements for building and running Thuban.
I installed these dependencies with

sudo apt-get build-dep thuban

now the program get's built with

python setup.py install_local

But when running

./thuban.py

I get the following warning:

################

$ ./thuban.py
/var/tmp/install/thuban/trunk/thuban/Thuban/UI/colordialog.py:25: 
DeprecationWarning: The wxPython compatibility package is no longer 
automatically generated or actively maintained.  Please switch to the wx 
package as soon as possible.
   from wxPython.lib.colourchooser import wxPyColourChooser

*******************************************************
  The following version errors were detected:
      Thuban was compiled with wx 2.6.3 but wxPython is 2.8.7.1
*******************************************************

###############

I run the tests:

#####
cd test
python ./runtests.py

#####

The message I get in the bash:

#############

======================================================================
FAIL: Extensions.ogr.test.test_OGRShapestore.TestOGRTable.test_Column
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/var/tmp/install/thuban/trunk/thuban/test/../Extensions/ogr/test/test_OGRShapestore.py", 
line 200, in test_Column
     self.assertEquals(self.table.Column(0).type, FIELDTYPE_INT)
AssertionError: 'double' != 'int'

======================================================================
FAIL: Extensions.ogr.test.test_OGRShapestore.TestOGRTable.test_Columns
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/var/tmp/install/thuban/trunk/thuban/test/../Extensions/ogr/test/test_OGRShapestore.py", 
line 194, in test_Columns
     self.assertEquals(self.table.Columns()[0].type, FIELDTYPE_INT)
AssertionError: 'double' != 'int'

----------------------------------------------------------------------
Ran 578 tests in 9.199s

FAILED (failures=2)
skipped = 171
XML validation attempts ignored because pyRXP is not available

############

Here is a list of wx packages on my system:

  dpkg -l|grep wx
ii  boa-constructor                            0.6.1-2 
                           RAD tool for Python and WxWindows applicatio
ii  libwxbase2.6-0                             2.6.3.2.2-2ubuntu4 
                           wxBase library (runtime) - non-GUI support c
ii  libwxbase2.6-dev                           2.6.3.2.2-2ubuntu4 
                           wxBase library (development) - non-GUI suppo
ii  libwxbase2.8-0                             2.8.7.1-0ubuntu3 
                           wxBase library (runtime) - non-GUI support c
rc  libwxgtk2.4-1                              2.4.5.1ubuntu2 
                           wxWindows Cross-platform C++ GUI toolkit (GT
ii  libwxgtk2.6-0                              2.6.3.2.2-2ubuntu4 
                           wxWidgets Cross-platform C++ GUI toolkit (GT
ii  libwxgtk2.6-dev                            2.6.3.2.2-2ubuntu4 
                           wxWidgets Cross-platform C++ GUI toolkit (GT
ii  libwxgtk2.8-0                              2.8.7.1-0ubuntu3 
                           wxWidgets Cross-platform C++ GUI toolkit (GT
ii  python-wxglade                             0.6.3-0.1ubuntu1 
                           GUI designer written in Python with wxPython
ii  python-wxgtk2.6                            2.6.3.2.2-2ubuntu4 
                           wxWidgets Cross-platform C++ GUI toolkit (wx
ii  python-wxgtk2.8                            2.8.7.1-0ubuntu3 
                           wxWidgets Cross-platform C++ GUI toolkit (wx
ii  python-wxtools                             2.8.7.1-0ubuntu3 
                           wxWidgets Cross-platform C++ GUI toolkit (wx
ii  python-wxversion                           2.8.7.1-0ubuntu3 
                           wxWidgets Cross-platform C++ GUI toolkit (wx
rc  pythoncard-tools                           0.8.1-8.1 
                           wxPython-based GUI construction framework (o
ii  wx2.6-headers                              2.6.3.2.2-2ubuntu4 
                           wxWidgets Cross-platform C++ GUI toolkit (he

May you please help me to get Thuban running?

Kind regards,
Timmie

---

From: Bernhard Reiter <[email-masked]>
Date: Sat, 24 May 2008 19:38:26 +0200

Hi Tim,

> sudo apt-get build-dep thuban

it might be that those dependencies are not entirely correct 
for your Ubuntu (which would be a problem of the package -
not Thuban itself) and they might prevent
you from building it correctly.

>       Thuban was compiled with wx 2.6.3 but wxPython is 2.8.7.1

This still means somehow the wrong packages are being picked up.
You have build Thuban with a different version of wx than
which you are trying to run it.

> FAILED (failures=2)

The two test failures are to be expected (as noted in the Releasenotes.txt).

> ii  libwxgtk2.6-dev                            2.6.3.2.2-2ubuntu4

This was probably picked up as there is no corresponding 2.8-dev package
as far as I can see. 

It seems like both wx versions are installed 

> ii  python-wxgtk2.8                            2.8.7.1-0ubuntu3

There probably is a way to make your python pick up the right one 
during runtime. Can you try if you have different python versions?
Maybe python2.4 and python2.5?
Start it and find out which wx version is will load at the beginning,
e.g. 
python2.3
Python 2.3.5 (#2, Oct 16 2006, 20:50:39)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
wx.>>> wx.VERSION
(2, 4, 2, 4, '')

If there is one that has 2.6, try this one like
python2.4 thuban.py

Another idea is to only install one version of wx, if possible.
Variant a)
Deinstall all wx2.8 packages.
Variant b) Install the wx2.8 dev packages and see if Thuban picks them up
           when rebuilding
Variant c) do b) an deinstall all wx 2.6 packages.

> May you please help me to get Thuban running?

We'll do our best to help of course. :)
As I do not have an Ubuntu system of your revision right sitting here,
it might take a few turnarounds, but we'll get there, I am sure!

Best,
Bernhard