[GRASS5] d.info: flag added for approximate screen scale

Hi,

I have added a new flag to d.info to print the
approximate map scale in GRASS monitor. I know that
it's not very precise, but an approximate figure
is better than nothing:

Example:

d.info -s
Approximate map scale in GRASS monitor <x0> 1:11000

I remember that this was removed in GRASS 5 (not by me)
but IMHO a GIS should be able to give such information.

The algorithm takes the monitor size, the map size within
the monitor and the screen resolution (x DPI and y DPI)
into account. The latter may not be precise, depending on
the X server software, video card or monitor. The
figure is therefore given rounded.

It still needs to be make optional in the Makefile
in case of X absences. Hints for a test are welcome.

I hope the flag survives this time :slight_smile:

Markus

Markus Neteler wrote:

I have added a new flag to d.info to print the
approximate map scale in GRASS monitor. I know that
it's not very precise, but an approximate figure
is better than nothing:

Example:

d.info -s
Approximate map scale in GRASS monitor <x0> 1:11000

I remember that this was removed in GRASS 5 (not by me)

It was removed for a reason, namely that it relied upon a whole bunch
of assumptions (e.g. you have X libraries installed, you are using X,
the monitor being queried is XDRIVER, you know which X display the
monitor is using, etc) which aren't guaranteed to be true.

but IMHO a GIS should be able to give such information.

The driver protocol doesn't include the necessary support.

The feature relied upon assuming that you can find X display, querying
the resolution of that display, and assuming that display is the one
which the monitor is using.

The algorithm takes the monitor size, the map size within
the monitor and the screen resolution (x DPI and y DPI)
into account. The latter may not be precise, depending on
the X server software, video card or monitor. The
figure is therefore given rounded.

It still needs to be make optional in the Makefile
in case of X absences. Hints for a test are welcome.

The configure script only determines which libraries are available. It
cannot determine whether or not you want to use them. In the case of
the d.info hack, it's entirely possible that you won't want it even if
the X libraries are available on the build system (e.g. because you
want to build a package for distribution, and don't want to include a
version of d.info which simply won't run on systems without Xlib).

I hope the flag survives this time :slight_smile:

Not if I have anything to do with it.

The reasons for its removal remain valid. Primarily, the fact that it
caused the d.info executable to have an Xlib dependency. The other
problems don't matter so long as you don't use the -s switch.

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

On Thu, Jan 05, 2006 at 03:19:55PM +0000, Glynn Clements wrote:

Markus Neteler wrote:

> I have added a new flag to d.info to print the
> approximate map scale in GRASS monitor. I know that
> it's not very precise, but an approximate figure
> is better than nothing:
>
> Example:
>
> d.info -s
> Approximate map scale in GRASS monitor <x0> 1:11000
>
> I remember that this was removed in GRASS 5 (not by me)

It was removed for a reason, namely that it relied upon a whole bunch
of assumptions (e.g. you have X libraries installed, you are using X,
the monitor being queried is XDRIVER, you know which X display the
monitor is using, etc) which aren't guaranteed to be true.

As suggested: It could be made optional.

> but IMHO a GIS should be able to give such information.

The driver protocol doesn't include the necessary support.

This is not clear to me. If I
- have the map extent in pixel
- have the dots per pixel of the monitor (ok, an approximation)

why cannot an *approximate* scale be given? How to all the
other GIS solve it?

The feature relied upon assuming that you can find X display, querying
the resolution of that display, and assuming that display is the one
which the monitor is using.

The algorithm gives the name of the monitor. I agree that this
won't work if the monitor is shown on a different machine.
But I am sure that this could be tested as well beforehand.

> The algorithm takes the monitor size, the map size within
> the monitor and the screen resolution (x DPI and y DPI)
> into account. The latter may not be precise, depending on
> the X server software, video card or monitor. The
> figure is therefore given rounded.
>
> It still needs to be make optional in the Makefile
> in case of X absences. Hints for a test are welcome.

The configure script only determines which libraries are available. It
cannot determine whether or not you want to use them. In the case of
the d.info hack, it's entirely possible that you won't want it even if
the X libraries are available on the build system (e.g. because you
want to build a package for distribution, and don't want to include a
version of d.info which simply won't run on systems without Xlib).

What about XDRIVER then?

neteler 3672 1 0 12:52 pts/6 00:00:03 /hardmnt/bartok0/ssi/software/cvsgrass61/dist.x86_64-unk
nown-linux-gnu/driver/XDRIVER x0 dev/fifo.1a dev/fifo.1b

/usr/sbin/lsof -p 3672 | grep libX11
XDRIVER 3672 neteler mem REG 9,0 922040 755424 /usr/X11R6/lib64/libX11.so.6.2

It's at least a similar case. I don't see in the Makefile that it
is optional (maybe I am wrong).

> I hope the flag survives this time :slight_smile:

Not if I have anything to do with it.

OK, I can always extract it to a private module.

The reasons for its removal remain valid. Primarily, the fact that it
caused the d.info executable to have an Xlib dependency.

I have conditionalized upon X11 presence now.
Only the Makefile test fails surprisingly.

The other
problems don't matter so long as you don't use the -s switch.

Right. And there are a couple of other problems in GRASS which
I would like to see to be taken out - but I simply don't use
them.

Markus

On 05/01/06 14:06, Markus Neteler wrote:

It still needs to be make optional in the Makefile
in case of X absences. Hints for a test are welcome.

use configure --enable switch. something like this:

AC_ARG_ENABLE(scale,
    AC_HELP_STRING([--enable-scale],
  [Enable d.info to display an approximate scale]),
   [
    ENABLE_SCALE="${enableval}"
    AC_MSG_RESULT([yes])
   ],
   [
    ENABLE_SCALE="no"
   ])
if test x$ENABLE_SCALE==xyes; then $CFLAGS +=" -DENABLE_SCALE=1"

--W

--

<:3 )---- Wolf Bergenheim ----( 8:>

Markus Neteler wrote:

> > but IMHO a GIS should be able to give such information.
>
> The driver protocol doesn't include the necessary support.

This is not clear to me. If I
- have the map extent in pixel
- have the dots per pixel of the monitor (ok, an approximation)

Which monitor?

Leaving aside the fact that different XDRIVER monitors could use
different X servers, a single X server can use multiple monitors in a
variety of configurations (multiple screens, Xinerama, duplication).
It can also use hardware other than monitors (e.g. projectors, for
which you don't usually know the physical resolution).

And what makes you think there is a monitor? From the point that the
hack was removed from d.info to the point it was re-introduced, d.info
worked fine with the PNG driver on a system with no Xlib, no X server
and no graphics hardware.

why cannot an *approximate* scale be given? How to all the
other GIS solve it?

I don't have any experience with other GIS.

If d.info was interacting with the OS' display mechanism directly,
rather than via the "monitor" abstraction, it could at least reliably
determine the OS' opinion of the display resolution (that isn't likely
to be accurate, but at least it would be consistent with other
applications).

> > The algorithm takes the monitor size, the map size within
> > the monitor and the screen resolution (x DPI and y DPI)
> > into account. The latter may not be precise, depending on
> > the X server software, video card or monitor. The
> > figure is therefore given rounded.
> >
> > It still needs to be make optional in the Makefile
> > in case of X absences. Hints for a test are welcome.
>
> The configure script only determines which libraries are available. It
> cannot determine whether or not you want to use them. In the case of
> the d.info hack, it's entirely possible that you won't want it even if
> the X libraries are available on the build system (e.g. because you
> want to build a package for distribution, and don't want to include a
> version of d.info which simply won't run on systems without Xlib).

What about XDRIVER then?

neteler 3672 1 0 12:52 pts/6 00:00:03 /hardmnt/bartok0/ssi/software/cvsgrass61/dist.x86_64-unk
nown-linux-gnu/driver/XDRIVER x0 dev/fifo.1a dev/fifo.1b

/usr/sbin/lsof -p 3672 | grep libX11
XDRIVER 3672 neteler mem REG 9,0 922040 755424 /usr/X11R6/lib64/libX11.so.6.2

It's at least a similar case. I don't see in the Makefile that it
is optional (maybe I am wrong).

XDRIVER inherently requires Xlib. If you don't have Xlib, you have no
use for XDRIVER. But you may still have a use for d.info.

The situation is very similar to the use of PostgreSQL in binary
distributions of 5.3, i.e. including the pg.* modules but building
NVIZ without PostgreSQL support.

> > I hope the flag survives this time :slight_smile:
>
> Not if I have anything to do with it.

OK, I can always extract it to a private module.

I would suggest that the changes aren't committed until they are done
in such a way that they are harmless (i.e. can be disabled).

> The reasons for its removal remain valid. Primarily, the fact that it
> caused the d.info executable to have an Xlib dependency.

I have conditionalized upon X11 presence now.

That's the wrong test. The issue isn't whether X is present on the
build system, but whether it will be present on the target system, and
you can't test for that.

Also, whether you want XDRIVER to be built and whether you want a
version of d.info which simply won't run on a system without Xlib are
two different things. In the former case, there is no significant
difference between not building XDRIVER and building it even though
you won't be able to use it. In the latter case, there /is/ a
difference between building a version of d.info which works on all
systems and building a version which only works on some systems.

It would be best to avoid having to build GRASS twice for a binary
distribution (build with X to get XDRIVER and NVIZ, build without X
and replace d.info) for such a minor feature.

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

On Fri, Jan 06, 2006 at 11:19:50AM +0000, Glynn Clements wrote:

Markus Neteler wrote:

> > > but IMHO a GIS should be able to give such information.
> >
> > The driver protocol doesn't include the necessary support.
>
> This is not clear to me. If I
> - have the map extent in pixel
> - have the dots per pixel of the monitor (ok, an approximation)

Which monitor?

Leaving aside the fact that different XDRIVER monitors could use
different X servers, a single X server can use multiple monitors in a
variety of configurations (multiple screens, Xinerama, duplication).
It can also use hardware other than monitors (e.g. projectors, for
which you don't usually know the physical resolution).

And what makes you think there is a monitor? From the point that the
hack was removed from d.info to the point it was re-introduced, d.info
worked fine with the PNG driver on a system with no Xlib, no X server
and no graphics hardware.

> why cannot an *approximate* scale be given? How to all the
> other GIS solve it?

I don't have any experience with other GIS.

If d.info was interacting with the OS' display mechanism directly,
rather than via the "monitor" abstraction, it could at least reliably
determine the OS' opinion of the display resolution (that isn't likely
to be accurate, but at least it would be consistent with other
applications).

> > > The algorithm takes the monitor size, the map size within
> > > the monitor and the screen resolution (x DPI and y DPI)
> > > into account. The latter may not be precise, depending on
> > > the X server software, video card or monitor. The
> > > figure is therefore given rounded.
> > >
> > > It still needs to be make optional in the Makefile
> > > in case of X absences. Hints for a test are welcome.
> >
> > The configure script only determines which libraries are available. It
> > cannot determine whether or not you want to use them. In the case of
> > the d.info hack, it's entirely possible that you won't want it even if
> > the X libraries are available on the build system (e.g. because you
> > want to build a package for distribution, and don't want to include a
> > version of d.info which simply won't run on systems without Xlib).
>
> What about XDRIVER then?
>
> neteler 3672 1 0 12:52 pts/6 00:00:03 /hardmnt/bartok0/ssi/software/cvsgrass61/dist.x86_64-unk
> nown-linux-gnu/driver/XDRIVER x0 dev/fifo.1a dev/fifo.1b
>
> /usr/sbin/lsof -p 3672 | grep libX11
> XDRIVER 3672 neteler mem REG 9,0 922040 755424 /usr/X11R6/lib64/libX11.so.6.2
>
> It's at least a similar case. I don't see in the Makefile that it
> is optional (maybe I am wrong).

XDRIVER inherently requires Xlib. If you don't have Xlib, you have no
use for XDRIVER. But you may still have a use for d.info.

I assume that you did not look at d.info? The -s flag was only
compiled into *if* XLIB is present (#ifdefs in the C code).
In absence of XLIB the previous d.info was generated, just without
the -s flag.

I am still not sure if the XDRIVER is excluded from compilation if
XLIB is not available.

The situation is very similar to the use of PostgreSQL in binary
distributions of 5.3, i.e. including the pg.* modules but building
NVIZ without PostgreSQL support.

> > > I hope the flag survives this time :slight_smile:
> >
> > Not if I have anything to do with it.
>
> OK, I can always extract it to a private module.

I would suggest that the changes aren't committed until they are done
in such a way that they are harmless (i.e. can be disabled).

That was my last version.

> > The reasons for its removal remain valid. Primarily, the fact that it
> > caused the d.info executable to have an Xlib dependency.
>
> I have conditionalized upon X11 presence now.

That's the wrong test. The issue isn't whether X is present on the
build system, but whether it will be present on the target system, and
you can't test for that.

Also, whether you want XDRIVER to be built and whether you want a
version of d.info which simply won't run on a system without Xlib are
two different things. In the former case, there is no significant
difference between not building XDRIVER and building it even though
you won't be able to use it. In the latter case, there /is/ a
difference between building a version of d.info which works on all
systems and building a version which only works on some systems.

Agreed.

Stuff removed in CVS.

It would be best to avoid having to build GRASS twice for a binary
distribution (build with X to get XDRIVER and NVIZ, build without X
and replace d.info) for such a minor feature.

Can you explain this comment? For years we are distributing a single
GRASS version (at least for Linux).

Markus

Markus Neteler wrote:

> > It's at least a similar case. I don't see in the Makefile that it
> > is optional (maybe I am wrong).
>
> XDRIVER inherently requires Xlib. If you don't have Xlib, you have no
> use for XDRIVER. But you may still have a use for d.info.

I assume that you did not look at d.info? The -s flag was only
compiled into *if* XLIB is present (#ifdefs in the C code).
In absence of XLIB the previous d.info was generated, just without
the -s flag.

The issue is whether Xlib will exist on all of the systems on which
d.info is to be run.

I am still not sure if the XDRIVER is excluded from compilation if
XLIB is not available.

It will fail to compile/link if Xlib doesn't exist.

> It would be best to avoid having to build GRASS twice for a binary
> distribution (build with X to get XDRIVER and NVIZ, build without X
> and replace d.info) for such a minor feature.

Can you explain this comment? For years we are distributing a single
GRASS version (at least for Linux).

IIRC, the standard procedure for building binary distributions of 5.x
was roughly:

1. configure --with-postgres, compile, install.

2. configure --without-postgres, compile NVIZ, replace the installed
NVIZ (which has a libpq dependency) with the new version (which
doesn't have a libpq dependency).

3. make bindist.

The end result is one package which includes the pg.* modules plus a
version of NVIZ which doesn't require libpq.

The general idea is to provide as many modules as possible, but for
each module to work on as many systems as possible (by disabling
optional features where necessary).

If d.info automatically used X whenever it was enabled, you would need
to do something similar to get a package which includes both XDRIVER
and a version of d.info which will work without Xlib.

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

Bob, All,

Building today'd Grass 6.1 CVS I have following error whwn compling
NVIZ:

maciek@sorbus:~/src/straight/grass6/visualization/nviz$ make
cd src ; make
make[1]: Entering directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
gcc -Wl,--export-dynamic -L/home/maciek/src/straight/grass6/dist./lib
-Wl,-rpath-link,/home/maciek/src/straight/grass6/dist./lib
-o /home/maciek/src/straight/grass6/dist./bin/nviz OBJ./nvizAppInit.o
OBJ./change_view.o OBJ./draw.o OBJ./exag.o OBJ./glwrappers.o
OBJ./init_commands.o OBJ./lights.o OBJ./map_obj.o OBJ./misc.o
OBJ./nviz_init.o OBJ./position.o OBJ./quick_draw.o OBJ./anim_support.o
OBJ./cutplane_obj.o OBJ./script_support.o OBJ./do_zoom.o OBJ./label.o
OBJ./nvizMain.o OBJ./togl.o OBJ./togl_cb.o OBJ./query_vect.o
OBJ./volume.o OBJ./togl_flythrough.o -lgrass_ogsf -lgrass_image \
-lgrass_bitmap -lgrass_linkm -lgrass_vect -lgrass_dig2 -lgrass_dgl
-lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase
-L/usr/local/lib -lgdal -lgrass_sites -lgrass_form -lgrass_dbmiclient
-lgrass_dbmibase \
-lgrass_gis -lgrass_datetime -lz -lm -lz \
-lgrass_datetime -ltk8.3 -lm -ltcl8.3 -lm -lGLU -lGL -lpthread -lSM
-lICE -lX11 -lXmu -lXext -lm -ldl -lz -L/usr/X11R6/lib -ltiff \
  -lSM -lICE -lX11 -lgrass_g3d
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2eea): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeQueryVersion'
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2f1a): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
make[1]: *** [/home/maciek/src/straight/grass6/dist./bin/nviz] Error 1
make[1]: Leaving directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
make: *** [nvwish] Error 2

Using Ubuntu Hoary. ./configure was:
--with-cxx
--without-odbc
--enable-largefile
--with-sqlite
--with-tcltk-includes="/usr/include/tcl8.3/" "/usr/include/tk8.3/"
--with-postgres-includes="/usr/include/postgresql/"
--with-freetype
--with-freetype-includes="/usr/include/freetype2/"

The last succesfull Grass 6.1 CVS build on my machine was 2005-11-16.

Maciek

--------------------
W polskim Internecie s± setki milionów stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

On Fri, Jan 06, 2006 at 10:31:34PM +0100, Maciek Sieczka wrote:

Bob, All,

Building today'd Grass 6.1 CVS I have following error whwn compling
NVIZ:

maciek@sorbus:~/src/straight/grass6/visualization/nviz$ make
cd src ; make
make[1]: Entering directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
gcc -Wl,--export-dynamic -L/home/maciek/src/straight/grass6/dist./lib
-Wl,-rpath-link,/home/maciek/src/straight/grass6/dist./lib
-o /home/maciek/src/straight/grass6/dist./bin/nviz OBJ./nvizAppInit.o
OBJ./change_view.o OBJ./draw.o OBJ./exag.o OBJ./glwrappers.o
OBJ./init_commands.o OBJ./lights.o OBJ./map_obj.o OBJ./misc.o
OBJ./nviz_init.o OBJ./position.o OBJ./quick_draw.o OBJ./anim_support.o
OBJ./cutplane_obj.o OBJ./script_support.o OBJ./do_zoom.o OBJ./label.o
OBJ./nvizMain.o OBJ./togl.o OBJ./togl_cb.o OBJ./query_vect.o
OBJ./volume.o OBJ./togl_flythrough.o -lgrass_ogsf -lgrass_image \
-lgrass_bitmap -lgrass_linkm -lgrass_vect -lgrass_dig2 -lgrass_dgl
-lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase
-L/usr/local/lib -lgdal -lgrass_sites -lgrass_form -lgrass_dbmiclient
-lgrass_dbmibase \
-lgrass_gis -lgrass_datetime -lz -lm -lz \
-lgrass_datetime -ltk8.3 -lm -ltcl8.3 -lm -lGLU -lGL -lpthread -lSM
-lICE -lX11 -lXmu -lXext -lm -ldl -lz -L/usr/X11R6/lib -ltiff \
  -lSM -lICE -lX11 -lgrass_g3d
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2eea): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeQueryVersion'
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2f1a): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
make[1]: *** [/home/maciek/src/straight/grass6/dist./bin/nviz] Error 1
make[1]: Leaving directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
make: *** [nvwish] Error 2

Using Ubuntu Hoary. ./configure was:
--with-cxx
--without-odbc
--enable-largefile
--with-sqlite
--with-tcltk-includes="/usr/include/tcl8.3/" "/usr/include/tk8.3/"
--with-postgres-includes="/usr/include/postgresql/"
--with-freetype
--with-freetype-includes="/usr/include/freetype2/"

The last succesfull Grass 6.1 CVS build on my machine was 2005-11-16.

Maciek,

using google I found this one:

http://vtk.org/Bug/bug.php?op=show&bugid=1777&pos=0
"VTK build failed due to:

bin/libvtkRendering.so: undefined reference to `XF86VidModeQueryVersion'
bin/libvtkRendering.so: undefined reference to `XF86VidModeGetModeLine'

Those symbols are defined in
/usr/X11R6/lib/libXxf86vm.so.1

Problem #1:
There is no: /usr/X11R6/lib/libXxf86vm.so
Problem #2:
We need to setup proper dependency

Posted by: ******
Date: 11:19 AM 04-18-2005
Need a special package for that:

sudo apt-get install libxxf86vm-dev

Posted by: ******
Date: 3:16 AM 04-24-2005
Also Assign:

/usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libXxf86vm.so

as the new value to the variable: X11_Xext_LIB
"

Maybe it helps?

Markus

On pi±, 2006-01-06 at 23:38 +0100, Markus Neteler wrote:

On Fri, Jan 06, 2006 at 10:31:34PM +0100, Maciek Sieczka wrote:
> Bob, All,
>
> Building today'd Grass 6.1 CVS I have following error whwn compling
> NVIZ:

<snip>

> The last succesfull Grass 6.1 CVS build on my machine was 2005-11-16.
>

Maciek,

using google I found this one:

http://vtk.org/Bug/bug.php?op=show&bugid=1777&pos=0
"VTK build failed due to:

bin/libvtkRendering.so: undefined reference to `XF86VidModeQueryVersion'
bin/libvtkRendering.so: undefined reference to `XF86VidModeGetModeLine'

Those symbols are defined in
/usr/X11R6/lib/libXxf86vm.so.1

Problem #1:
There is no: /usr/X11R6/lib/libXxf86vm.so
Problem #2:
We need to setup proper dependency

Posted by: ******
Date: 11:19 AM 04-18-2005
Need a special package for that:

sudo apt-get install libxxf86vm-dev

Posted by: ******
Date: 3:16 AM 04-24-2005
Also Assign:

/usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libXxf86vm.so

as the new value to the variable: X11_Xext_LIB
"

Maybe it helps?

Markus,

Thanks. Unfortunatelly this doesn't help. I've already had
libxxf86vm-dev installed when compilation errors in NVIZ poped up.

See:

maciek@sorbus:~$ sudo apt-get install libxxf86vm-dev
Password:
Reading package lists... Done
Building dependency tree... Done
libxxf86vm-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Maciek

--------------------
W polskim Internecie s± setki milionów stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

On Sat, Jan 07, 2006 at 09:32:45PM +0100, Maciek Sieczka wrote:

On pi?, 2006-01-06 at 23:38 +0100, Markus Neteler wrote:
> On Fri, Jan 06, 2006 at 10:31:34PM +0100, Maciek Sieczka wrote:
> > Bob, All,
> >
> > Building today'd Grass 6.1 CVS I have following error whwn compling
> > NVIZ:

<snip>

> > The last succesfull Grass 6.1 CVS build on my machine was 2005-11-16.
> >
>
> Maciek,
>
> using google I found this one:
>
> http://vtk.org/Bug/bug.php?op=show&bugid=1777&pos=0
> "VTK build failed due to:
>
> bin/libvtkRendering.so: undefined reference to `XF86VidModeQueryVersion'
> bin/libvtkRendering.so: undefined reference to `XF86VidModeGetModeLine'
>
> Those symbols are defined in
> /usr/X11R6/lib/libXxf86vm.so.1
>
> Problem #1:
> There is no: /usr/X11R6/lib/libXxf86vm.so
> Problem #2:
> We need to setup proper dependency
>
> Posted by: ******
> Date: 11:19 AM 04-18-2005
> Need a special package for that:
>
> sudo apt-get install libxxf86vm-dev
>
> Posted by: ******
> Date: 3:16 AM 04-24-2005
> Also Assign:
>
> /usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libXxf86vm.so
>
> as the new value to the variable: X11_Xext_LIB
> "
>
> Maybe it helps?

Markus,

Thanks. Unfortunatelly this doesn't help. I've already had
libxxf86vm-dev installed when compilation errors in NVIZ poped up.

See:

maciek@sorbus:~$ sudo apt-get install libxxf86vm-dev
Password:
Reading package lists... Done
Building dependency tree... Done
libxxf86vm-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Did you also try the other trick suggested there?
It seems to be a distro problem.

Markus

On sob, 2006-01-07 at 21:36 +0100, Markus Neteler wrote:

On Sat, Jan 07, 2006 at 09:32:45PM +0100, Maciek Sieczka wrote:
> On pi?, 2006-01-06 at 23:38 +0100, Markus Neteler wrote:
> > On Fri, Jan 06, 2006 at 10:31:34PM +0100, Maciek Sieczka wrote:
> > > Bob, All,
> > >
> > > Building today'd Grass 6.1 CVS I have following error whwn compling
> > > NVIZ:
>
> <snip>
>
> > > The last succesfull Grass 6.1 CVS build on my machine was 2005-11-16.
> > >
> >
> > Maciek,
> >
> > using google I found this one:
> >
> > http://vtk.org/Bug/bug.php?op=show&bugid=1777&pos=0
> > "VTK build failed due to:
> >
> > bin/libvtkRendering.so: undefined reference to `XF86VidModeQueryVersion'
> > bin/libvtkRendering.so: undefined reference to `XF86VidModeGetModeLine'
> >
> > Those symbols are defined in
> > /usr/X11R6/lib/libXxf86vm.so.1
> >
> > Problem #1:
> > There is no: /usr/X11R6/lib/libXxf86vm.so
> > Problem #2:
> > We need to setup proper dependency
> >
> > Posted by: ******
> > Date: 11:19 AM 04-18-2005
> > Need a special package for that:
> >
> > sudo apt-get install libxxf86vm-dev
> >
> > Posted by: ******
> > Date: 3:16 AM 04-24-2005
> > Also Assign:
> >
> > /usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libXxf86vm.so
> >
> > as the new value to the variable: X11_Xext_LIB
> > "
> >
> > Maybe it helps?
>
> Markus,
>
> Thanks. Unfortunatelly this doesn't help. I've already had
> libxxf86vm-dev installed when compilation errors in NVIZ poped up.
>
> See:
>
> maciek@sorbus:~$ sudo apt-get install libxxf86vm-dev
> Password:
> Reading package lists... Done
> Building dependency tree... Done
> libxxf86vm-dev is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Did you also try the other trick suggested there?
It seems to be a distro problem.

Indeed I haven't. Now trying it I can't get it to work - neither as user nor as root:

root@sorbus:~/src/straight/grass6#
X11_Xext_LIB=/usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libXxf86vm.so
bash: /usr/X11R6/lib/libXxf86vm.so: Permission denied

Can you advice how to proceed?

P.S.
I can see this libxxf86vm-dev was installed on my system _after_ my last
successfull Grass build. Also my current kernel version was upgraded
then and kernel dev stuff was installed (for building alsa and ATI prop
driver most likely):

Commit Log for Sun Nov 27 14:15:33 2005

Installed the following packages:

libxxf86misc-dev (6.8.2-10.1)
libxxf86vm-dev (6.8.2-10.1)
linux-headers-2.6.10-6 (2.6.10-34.8)
linux-headers-2.6.10-6-686 (2.6.10-34.8)
linux-headers-686 (2.6.10-7.1)
linux-image-2.6.10-6-686 (2.6.10-34.8)

Upgraded the following packages:
linux-image-686 (2.6.10-7) to 2.6.10-7.1

Also the linux-image stuff was slightly upgraded on 2005.12.23:

Commit Log for Fri Dec 23 11:34:57 2005

Upgraded the following packages:
linux-headers-2.6.10-6 (2.6.10-34.8) to 2.6.10-34.9
linux-headers-2.6.10-6-686 (2.6.10-34.8) to 2.6.10-34.9
linux-image-2.6.10-6-686 (2.6.10-34.8) to 2.6.10-34.9

Maciek

--------------------
W polskim Internecie s± setki milionów stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

Hi,

No matter what I do, NVIZ deosn't build in any Grass 6.0 or 6.1 I try on
my Ubuntu Hoary. Can any Hoary user please check if it works for him?

The error I'm continously getting is:

maciek@sorbus:~/src/straight/grass6/visualization/nviz$ make
cd src ; make
make[1]: Entering directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
gcc -Wl,--export-dynamic -L/home/maciek/src/straight/grass6/dist./lib
-Wl,-rpath-link,/home/maciek/src/straight/grass6/dist./lib
-o /home/maciek/src/straight/grass6/dist./bin/nviz OBJ./nvizAppInit.o
OBJ./change_view.o OBJ./draw.o OBJ./exag.o OBJ./glwrappers.o
OBJ./init_commands.o OBJ./lights.o OBJ./map_obj.o OBJ./misc.o
OBJ./nviz_init.o OBJ./position.o OBJ./quick_draw.o OBJ./anim_support.o
OBJ./cutplane_obj.o OBJ./script_support.o OBJ./do_zoom.o OBJ./label.o
OBJ./nvizMain.o OBJ./togl.o OBJ./togl_cb.o OBJ./query_vect.o
OBJ./volume.o OBJ./togl_flythrough.o -lgrass_ogsf -lgrass_image \
-lgrass_bitmap -lgrass_linkm -lgrass_vect -lgrass_dig2 -lgrass_dgl
-lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase
-L/usr/local/lib -lgdal -lgrass_sites -lgrass_form -lgrass_dbmiclient
-lgrass_dbmibase \
-lgrass_gis -lgrass_datetime -lz -lm -lz \
-lgrass_datetime -ltk8.3 -lm -ltcl8.3 -lm -lGLU -lGL -lpthread -lSM
-lICE -lX11 -lXmu -lXext -lm -ldl -lz -L/usr/X11R6/lib -ltiff \
  -lSM -lICE -lX11 -lgrass_g3d
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2eea): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeQueryVersion'
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2f1a): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
make[1]: *** [/home/maciek/src/straight/grass6/dist./bin/nviz] Error 1
make[1]: Leaving directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
make: *** [nvwish] Error 2

The ./configure was:
--with-cxx
--without-odbc
--enable-largefile
--with-sqlite
--with-tcltk-includes="/usr/include/tcl8.3/" "/usr/include/tk8.3/"
--with-postgres-includes="/usr/include/postgresql/"
--with-freetype
--with-freetype-includes="/usr/include/freetype2/"

The last succesfull Grass 6.1 CVS build on my machine was on 2005-11-16.
However, now the 2005-11-16 CVS revision fails. Thus I assume something
that was introduced to my system since 2005-11-16 causes the problem. I
have no idea what this exactly could be though. Since then I have been
updating my machine several times, keeping it always up to date.

Eg. the kernel revision changed. On 2005-11-16 it was:
linux-image-2.6.10-5-686 (2.6.10-34.7)
Now it's:
linux-image-2.6.10-6-686 (2.6.10-34.8)

And I'm mentioning it because of what I learned form Markus Neteler:

Maciek Sieczka wrote:

> gcc -Wl,--export-dynamic
> -L/home/maciek/src/straight/grass6/dist./lib

Markus Neteler wrote:

isn't it strange that there is no architecture?
It should be
.../grass6/dist.i686-pc-linux-gnu/lib ...
                ^^^^^^^^^^^^^^^^^

What do you think of it?

I can't build NVIZ anymore which I have to use often. No good. Please
help.

Maciek

--------------------
W polskim Internecie s± setki milionów stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

Hi,

I do not know if this helps or not. I googled the OPenGL library eror listed below and found the following thread ...
http://ubuntuforums.org/archive/index.php/t-18977.html
among others

To solve the problem it sounds like they installed the xxf86mv-dev package, and added -lXxf86mv to the library list.

Hope this helps.

--
Bob

Maciek Sieczka wrote:

Hi,

No matter what I do, NVIZ deosn't build in any Grass 6.0 or 6.1 I try on
my Ubuntu Hoary. Can any Hoary user please check if it works for him?

The error I'm continously getting is:

maciek@sorbus:~/src/straight/grass6/visualization/nviz$ make
cd src ; make
make[1]: Entering directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
gcc -Wl,--export-dynamic -L/home/maciek/src/straight/grass6/dist./lib
-Wl,-rpath-link,/home/maciek/src/straight/grass6/dist./lib
-o /home/maciek/src/straight/grass6/dist./bin/nviz OBJ./nvizAppInit.o
OBJ./change_view.o OBJ./draw.o OBJ./exag.o OBJ./glwrappers.o
OBJ./init_commands.o OBJ./lights.o OBJ./map_obj.o OBJ./misc.o
OBJ./nviz_init.o OBJ./position.o OBJ./quick_draw.o OBJ./anim_support.o
OBJ./cutplane_obj.o OBJ./script_support.o OBJ./do_zoom.o OBJ./label.o
OBJ./nvizMain.o OBJ./togl.o OBJ./togl_cb.o OBJ./query_vect.o
OBJ./volume.o OBJ./togl_flythrough.o -lgrass_ogsf -lgrass_image \
-lgrass_bitmap -lgrass_linkm -lgrass_vect -lgrass_dig2 -lgrass_dgl
-lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase
-L/usr/local/lib -lgdal -lgrass_sites -lgrass_form -lgrass_dbmiclient
-lgrass_dbmibase \
-lgrass_gis -lgrass_datetime -lz -lm -lz \
-lgrass_datetime -ltk8.3 -lm -ltcl8.3 -lm -lGLU -lGL -lpthread -lSM
-lICE -lX11 -lXmu -lXext -lm -ldl -lz -L/usr/X11R6/lib -ltiff \
  -lSM -lICE -lX11 -lgrass_g3d
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2eea): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeQueryVersion'
/usr/X11R6/lib/libGL.a(glxcmds.o)(.text+0x2f1a): In function
`glXGetMscRateOML':: undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
make[1]: *** [/home/maciek/src/straight/grass6/dist./bin/nviz] Error 1
make[1]: Leaving directory
`/home/maciek/src/straight/grass6/visualization/nviz/src'
make: *** [nvwish] Error 2

The ./configure was:
--with-cxx
--without-odbc
--enable-largefile
--with-sqlite
--with-tcltk-includes="/usr/include/tcl8.3/" "/usr/include/tk8.3/"
--with-postgres-includes="/usr/include/postgresql/"
--with-freetype
--with-freetype-includes="/usr/include/freetype2/"

The last succesfull Grass 6.1 CVS build on my machine was on 2005-11-16.
However, now the 2005-11-16 CVS revision fails. Thus I assume something
that was introduced to my system since 2005-11-16 causes the problem. I
have no idea what this exactly could be though. Since then I have been
updating my machine several times, keeping it always up to date.

Eg. the kernel revision changed. On 2005-11-16 it was:
linux-image-2.6.10-5-686 (2.6.10-34.7)
Now it's:
linux-image-2.6.10-6-686 (2.6.10-34.8)

And I'm mentioning it because of what I learned form Markus Neteler:

Maciek Sieczka wrote:

gcc -Wl,--export-dynamic
-L/home/maciek/src/straight/grass6/dist./lib

Markus Neteler wrote:

isn't it strange that there is no architecture?
It should be .../grass6/dist.i686-pc-linux-gnu/lib ...
               ^^^^^^^^^^^^^^^^^

What do you think of it?

I can't build NVIZ anymore which I have to use often. No good. Please
help.

Maciek

--------------------
W polskim Internecie s± setki milionów stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5