Subject: [Thuban-list] Compile into oblivion

From: Adrian Custer <[email-masked]>
Date: Fri, 10 Oct 2003 01:15:13 -0700

Hey all,

I'm tring to give the infamous nordic diety a spin, and got caught in a
mess of install requirements. I plowed through a number of them,
including changing l.73 of setup.py to:
    wx_config_script = "/usr/lib/wxPython/bin/wx-config"

my last run of:

[acuster@tsetse Thuban-0.9.0]$ python setup.py install_local

stops after:

libraries/pyprojection/Projection_wrap.c: In function
`_wrap_new_Projection':
libraries/pyprojection/Projection_wrap.c:1283: error: invalid type
argument of `unary *'
libraries/pyprojection/Projection_wrap.c:1291: error: invalid type
argument of `unary *'
error: command 'gcc' failed with exit status 1

Any ideas?

thanks,
adrian

---

From: Bernhard Herzog <[email-masked]>
Date: Fri, 10 Oct 2003 11:00:59 +0200

> error: command 'gcc' failed with exit status 1

Which version of the proj library do you compile it with?

The problem seems to be the pj_get_errno_ref function which returns a
pointer to int and the code in question dereferences the return value.
This can lead to the above errors when e.g. the compiler didn't see the
prototype and assumes it returns int.

According to proj's ChangeLog this means Thuban needs at least version
4.4.4.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/

---

From: Adrian Custer <[email-masked]>
Date: Fri, 10 Oct 2003 12:14:47 -0700

Sorry to keep after you, I've fallen into mandrake library hell.

After much installing and re-installing, when I now run:

python setup.py install_local

I get:

...
libraries/thuban/wxproj.cpp: In function `wxPoint* project_points(int,
int, double*, double*, int*, PJ*, PJ*, double, double, double, double)':
libraries/thuban/wxproj.cpp:186: error: invalid application of `sizeof'
to an incomplete type
libraries/thuban/wxproj.cpp:200: error: invalid use of undefined type
`struct wxPoint'
...

wxPoint seems to be fundamental to wx* stuff but I can't figure out
which library is not being found or how I might go about pointing things
to the right location.

The wx stuff I have is:
[root@tsetse site-packages]# rpm -q -a | grep wx
libwxPythonGTK2.4-devel-2.4.1.2-3mdk
wxGTK-2.4.2-1mdk
libwxPythonGTK2.4-2.4.1.2-3mdk
libwx_base2.4_0-2.4.1-1mdk
libwxgtkgl2.4-2.4.2-1mdk
libwxgtk2.4-2.4.2-1mdk
wxPythonGTK-2.4.1.2-3mdk
libwx_base2.4_0-devel-2.4.1-1mdk
[root@tsetse site-packages]# 

any more ideas?

--adrian

---

From: Bernhard Herzog <[email-masked]>
Date: Mon, 13 Oct 2003 15:22:17 +0200

> libraries/thuban/wxproj.cpp:200: error: invalid use of undefined type

wxPoint is defined in wx/gdicmn.h which is currently only indirectly
included in wxproj.cpp. Your wx version is newer than the one we
currently use so I compiled a newer one to check whether something has
changed in this regard. Still works for me, though.

Nevertheless there must be a problem with the include files somewhere.
You can try two things:

 - add an #include <wx/gdicmn.h> to wxproj.cpp to make sure that
   headerfile is included

 - Add a -H to the options of gcc when compiling wxproj.cpp to see which
   headerfiles are actually used.

> libwxPythonGTK2.4-devel-2.4.1.2-3mdk

According to
http://rpms.mandrakeclub.com/rpms/mandrake/9.1/contrib/i586/libwxPythonGTK2.4-devel-2.4.0.6-1mdk.i586.html
this RPM contains all wxGTK headerfiles wx/gdicmn.h so at least gdicmn.h
is not missing.

Seems a bit strange to put those headerfiles in a
libwxPythonGTK2.4-devel RPM isntead of say a libwxGTK-2.4 devel, though.

> libwx_base2.4_0-devel-2.4.1-1mdk

Some of these RPMs have slightly different versions (e.g. 2.4.1.2 vs.
2.4.2) this may cause segfaults when trying to display shapefiles as
experience has unfortunately shown as there seem to be some binary
incompatibilities in some cases.

   Bernhard