[GRASS-dev] compile error with vdigit nviz

Hello all,

I’ve been compiling 6.4 locally for sometime, but ran into a problem after my last svn update.

Ubuntu 8.04 64-bit
revision 34829

./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python --enable-64bit --with-readline --with-readline-includes=/usr/include/readline --with-freetype --with-freetype-includes=/usr/include/freetype2/ --with-wxwidgets=/usr/bin/wx-config --with-postgres --with-postgres-includes=/usr/include/postgresql/


GRASS GIS compilation log


Started compilation: Thu Dec 11 10:10:26 PST 2008

Errors in:
/usr/local/work/build/grass6_devel/gui/wxpython/vdigit
/usr/local/work/build/grass6_devel/gui/wxpython/nviz

In case of errors please change into the directory with error and run ‘make’.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

Finished compilation: Thu Dec 11 10:15:22 PST 2008
make: *** [default] Error 1

cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
make
make: *** No rule to make target default', needed by first’. Stop.


The results are the same for nviz. What’s going wrong here?

-Jamie

Hi,

2008/12/11 Jamie Adams <jaadfoo@gmail.com>:

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

./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python
--enable-64bit --with-readline
--with-readline-includes=/usr/include/readline --with-freetype
--with-freetype-includes=/usr/include/freetype2/
--with-wxwidgets=/usr/bin/wx-config --with-postgres
--with-postgres-includes=/usr/include/postgresql/

--with-cxx is missing...

/usr/local/work/build/grass6_devel/gui/wxpython/vdigit
/usr/local/work/build/grass6_devel/gui/wxpython/nviz

make

make: *** No rule to make target `default', needed by `first'. Stop.

well, Makefile should be fixed, vdigit and nviz shouldn't be compiled
when support for cxx/python/wxwidgets is disabled.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Ok, that helped. Now I’m only getting an error with vdigit

cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
make

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

Thanks.

On Thu, Dec 11, 2008 at 11:19 AM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2008/12/11 Jamie Adams <jaadfoo@gmail.com>:


./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python
–enable-64bit --with-readline
–with-readline-includes=/usr/include/readline --with-freetype
–with-freetype-includes=/usr/include/freetype2/
–with-wxwidgets=/usr/bin/wx-config --with-postgres
–with-postgres-includes=/usr/include/postgresql/

–with-cxx is missing…

/usr/local/work/build/grass6_devel/gui/wxpython/vdigit
/usr/local/work/build/grass6_devel/gui/wxpython/nviz

make
make: *** No rule to make target default', needed by first’. Stop.

well, Makefile should be fixed, vdigit and nviz shouldn’t be compiled
when support for cxx/python/wxwidgets is disabled.

Martin


Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

2008/12/11 Jamie Adams <jaadfoo@gmail.com>:

Ok, that helped. Now I'm only getting an error with vdigit

cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
make

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

from

http://svn.osgeo.org/grass/grass/trunk/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').
"""

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Great, that did it. Thanks!

On Thu, Dec 11, 2008 at 12:02 PM, Martin Landa <landa.martin@gmail.com> wrote:

2008/12/11 Jamie Adams <jaadfoo@gmail.com>:

Ok, that helped. Now I’m only getting an error with vdigit

cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
make

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

from

http://svn.osgeo.org/grass/grass/trunk/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’).

“”"

Martin


Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa wrote:

>>> ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python
>>> --enable-64bit --with-readline
>>> --with-readline-includes=/usr/include/readline --with-freetype
>>> --with-freetype-includes=/usr/include/freetype2/
>>> --with-wxwidgets=/usr/bin/wx-config --with-postgres
>>> --with-postgres-includes=/usr/include/postgresql/

--with-cxx is missing...

> /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
> /usr/local/work/build/grass6_devel/gui/wxpython/nviz
>>> make
> make: *** No rule to make target `default', needed by `first'. Stop.

well, Makefile should be fixed, vdigit and nviz shouldn't be compiled
when support for cxx/python/wxwidgets is disabled.

This was introduced in r34791.

The trunk (7.0) has had a fair number of changes to the build system,
so 7.0 Makefiles won't necessarily work in 6.4.

In this case, 7.0 has an empty "default" rule in Rules.make. This was
added to simplify Makefiles for modules which depend upon an optional
feature.

E.g. gui/wxpython/vdigit/Makefile has:

  ifneq ($(USE_WXWIDGETS),)
  ifneq ($(USE_PYTHON),)
  ifneq ($(strip $(CXX)),)
  default: install_vdigit
  endif
  endif
  endif

If wxWidgets, Python and C++ are enabled, the "default" rule invokes
the "install_vdigit" rule. If any of those features are disabled, in
7.0 it will invoke the empty "default" rule from Rules.make. 6.4
doesn't have that rule, so you get the above error.

It should suffice to add an empty "default" rule to the vdigit and
nviz Makefiles. You can have multiple rules for the same target (it
gets awkward if you have multiple rules for a target and they all have
commands, but that isn't an issue here). Or you can add it to
Rules.make.

However, some of the other build system changes are more fundamental,
and can't easily be back-ported.

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

Hi,

2008/12/11 Glynn Clements <glynn@gclements.plus.com>:

This was introduced in r34791.

right.

However, some of the other build system changes are more fundamental,
and can't easily be back-ported.

hopefully fixed in r34832.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *