[GRASS-dev] ubuntu 8.10 compile error

Hi all, I’m currently trying to compile both grass 6.4 and grass7 on Ubuntu 8.10, and I am consistently getting a couple of compile errors for …/gui/wxwigits/vdigit and …/gui/wxwidgets/NVIS for that have really stumped me. here are the initial errors:

Errors in:
/home/iullah/grass6_source/grass6_devel/gui/wxpython/vdigit
/home/iullah/grass6_source/grass6_devel/gui/wxpython/nviz

When I cd to …/gui/wxwidgets/vdigit and run make, I get the following error:

In file included from cats.cpp:21:
driver.h: At global scope:
driver.h:84: error: field ‘color’ has incomplete type
driver.h:88: error: field ‘highlight’ has incomplete type
make: *** [OBJ.i686-pc-linux-gnu/cats.o] Error 1

This final error is preceeded by a long list of other errors. The intial place where it goes wrong is here:

cc1plus: warning: command line option “-Wstrict-prototypes” is valid for Ada/C/ObjC but not for C++
In file included from /usr/include/wx-2.8/wx/dc.h:22,
from driver.h:21,
from cats.cpp:21:
/usr/include/wx-2.8/wx/cursor.h: In constructor ‘wxBusyCursorSuspender::wxBusyCursorSuspender()’:
/usr/include/wx-2.8/wx/cursor.h:65: error: ‘wxIsBusy’ was not declared in this scope
/usr/include/wx-2.8/wx/cursor.h:67: error: ‘wxBusyCursor’ has not been declared
/usr/include/wx-2.8/wx/cursor.h:67: error: ‘wxSetCursor’ was not declared in this scope
/usr/include/wx-2.8/wx/cursor.h: In destructor ‘wxBusyCursorSuspender::~wxBusyCursorSuspender()’:
/usr/include/wx-2.8/wx/cursor.h:72: error: ‘wxIsBusy’ was not declared in this scope
/usr/include/wx-2.8/wx/cursor.h:74: error: ‘wxBusyCursor’ has not been declared
/usr/include/wx-2.8/wx/cursor.h:74: error: ‘wxSetCursor’ was not declared in this scope
In file included from driver.h:21,
from cats.cpp:21:
/usr/include/wx-2.8/wx/dc.h: At global scope:
/usr/include/wx-2.8/wx/dc.h:835: error: field ‘m_pen’ has incomplete type
/usr/include/wx-2.8/wx/dc.h:836: error: field ‘m_brush’ has incomplete type
/usr/include/wx-2.8/wx/dc.h:837: error: field ‘m_backgroundBrush’ has incomplete type

with maybe a hundred or so more lines in a similar vein.

When I run ./configure without --with-wxwidgets, both versions compile with no errors, and i’m able to install the resulting binaries just fine.

Is this a wx issue? I’ve read the latest few threads about other compile errors with wx enabling in ./configure options, and I’ve confirmed that my etc/alternatives/wx-config file is pointing to /usr/lib/wx/config/base-unicode-release-2.8, so I think i’m having a different issue than others are having. Any suggestions would be most welcome!

Isaac I Ullah, M.A.

Archaeology PhD Student,
ASU School of Evolution and Social Change

Research Assistant,
Mediterranean Landscape Dynamics Project


isaac.ullah@asu.edu
ullah@archaeologist.com

http://www.public.asu.edu/~iullah


Isaac Ullah wrote:

Hi all, I'm currently trying to compile both grass 6.4 and grass7 on Ubuntu
8.10, and I am consistently getting a couple of compile errors for
.../gui/wxwigits/vdigit and .../gui/wxwidgets/NVIS for that have really
stumped me. here are the initial errors:

Is this a wx issue?

Yes.

I've read the latest few threads about other compile
errors with wx enabling in ./configure options, and I've confirmed that my
etc/alternatives/wx-config file is pointing to
/usr/lib/wx/config/base-unicode-release-2.8,

FWIW, my /usr/lib/wx/config directory contains the following files:

  gtk2-ansi-release-2.6
  gtk2-unicode-release-2.6
  gtk2-unicode-release-2.8

I suspect that you haven't installed all of the necessary packages.
AFAICT, you need at least the following packages:

  libwxbase2.8-0
  libwxbase2.8-dev
  libwxgtk2.8-0
  libwxgtk2.8-dev
  wx-common
  wx2.8-headers

--
Glynn Clements <glynn@gclements.plus.com>

Hi Glynn, Thanks for the advice, it was partially successful. I was indeed missing the wx-gtk2 dev package (I had the wx-base dev package, so as a lesson to others, be very careful when searching through the ubuntu package repository!), and this allowed the NVIS compile error to resolve itself. I am still getting compile erros for “…gui/wxpython/vdigit”, albeit a different error than I was getting before. Here is the text of the error:

iullah@MEDLAND-2:~/grass6_source/grass6_devel/gui/wxpython/vdigit$ make
gcc -shared -o OBJ.i686-pc-linux-gnu/_grass6_wxvdigit.so -L/home/iullah/grass6_source/grass6_devel/dist.i686-pc-linux-gnu/lib -Wl,–export-dynamic -Wl,-rpath-link,/home/iullah/grass6_source/grass6_devel/dist.i686-pc-linux-gnu/lib OBJ.i686-pc-linux-gnu/cats.o OBJ.i686-pc-linux-gnu/digit.o OBJ.i686-pc-linux-gnu/driver.o OBJ.i686-pc-linux-gnu/driver_draw.o OBJ.i686-pc-linux-gnu/driver_select.o OBJ.i686-pc-linux-gnu/grass6_wxvdigit_wrap.o OBJ.i686-pc-linux-gnu/line.o OBJ.i686-pc-linux-gnu/message.o OBJ.i686-pc-linux-gnu/select.o OBJ.i686-pc-linux-gnu/undo.o OBJ.i686-pc-linux-gnu/vertex.o -lgrass_vect -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz -lgrass_dgl -lgrass_dig2 -lgrass_gis -lgrass_datetime -lz -lgrass_rtree -lgrass_gis -lgrass_datetime -lz -lgrass_linkm -lgrass_rtree -lgrass_dig2 -lgrass_gis -lgrass_datetime -lz -lgrass_rtree -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -L/usr/local/lib -lgdal -lgrass_gis -lgrass_datetime -lz -L/usr/local/lib -lgdal -lgrass_vedit -lgrass_gis -lgrass_datetime -lz -lgrass_vect -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz -lgrass_gis -lgrass_datetime -lz -lgrass_dgl -lgrass_dig2 -lgrass_gis -lgrass_datetime -lz -lgrass_rtree -lgrass_gis -lgrass_datetime -lz -lgrass_linkm -lgrass_rtree -pthread -Wl,-Bsymbolic-functions -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 -lgdi
/usr/bin/ld: cannot find -lgdi
collect2: ld returned 1 exit status
make: *** [OBJ.i686-pc-linux-gnu/_grass6_wxvdigit.so] Error 1

I thought that it must be something missing in my gtk install, so I went through the ubuntu repository and got absolutely everything gtk that I could find (over 140 packages), but to no avail… A web search hs yielded plenty of “/usr/bin/ld: cannot find -xxxxx” , but none for “-lgdi”. Most of the solutions to similar errors were of the “you need to install xxxx package” variety. Unfortuntately, none of these solutions were for a missing -lgdi nor were they even specific to GRASS… Thanks again in advance for any help you or others may offer to me.

Cheers,

Isaac

On Fri, Nov 7, 2008 at 3:50 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Isaac Ullah wrote:

Hi all, I’m currently trying to compile both grass 6.4 and grass7 on Ubuntu
8.10, and I am consistently getting a couple of compile errors for
…/gui/wxwigits/vdigit and …/gui/wxwidgets/NVIS for that have really
stumped me. here are the initial errors:

Is this a wx issue?

Yes.

I’ve read the latest few threads about other compile
errors with wx enabling in ./configure options, and I’ve confirmed that my
etc/alternatives/wx-config file is pointing to
/usr/lib/wx/config/base-unicode-release-2.8,

FWIW, my /usr/lib/wx/config directory contains the following files:

gtk2-ansi-release-2.6
gtk2-unicode-release-2.6
gtk2-unicode-release-2.8

I suspect that you haven’t installed all of the necessary packages.
AFAICT, you need at least the following packages:

libwxbase2.8-0
libwxbase2.8-dev
libwxgtk2.8-0
libwxgtk2.8-dev
wx-common
wx2.8-headers


Glynn Clements <glynn@gclements.plus.com>

Isaac I Ullah, M.A.

Archaeology PhD Student,
ASU School of Evolution and Social Change

Research Assistant,
Mediterranean Landscape Dynamics Project


isaac.ullah@asu.edu
ullah@archaeologist.com

http://www.public.asu.edu/~iullah


On 12/11/08 17:58, Isaac Ullah wrote:

Hi Glynn, Thanks for the advice, it was partially successful. I was indeed missing the wx-gtk2 dev package (I had the wx-base dev package, so as a lesson to others, be very careful when searching through the ubuntu package repository!), and this allowed the NVIS compile error to resolve itself. I am still getting compile erros for "...gui/wxpython/vdigit", albeit a different error than I was getting before. Here is the text of the error:

[...]

/usr/bin/ld: cannot find -lgdi
collect2: ld returned 1 exit status
make: *** [OBJ.i686-pc-linux-gnu/_grass6_wxvdigit.so] Error 1

Typing 'grass lgdi' in google brings up tons of messages with the response, which also is in the relevant directory of the source code (gui/wxpython/README):

"First, create a symlink to _gdi_.so shared library

$ sudo ln -s `locate _gdi_.so` /usr/local/lib/libgdi.so

e.g.

$ sudo ln -s /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so /usr/local/lib/libgdi.so

Then update LD_LIBRARY_PATH or add '/usr/local/lib' to /etc/ld.so.conf
(in this case run 'sudo ldconfig').

Then you can compile the driver."

Moritz