[GRASS-dev] WinGrass65 + import gui_modules.nviz_tools as nviz_tools: ImportError

Glynn Clements glynn at gclements.plus.com
Sun Jun 6 04:01:04 EDT 2010


Helmut Kudrnovsky wrote:

> >> I haven't been paying too much attention, but it would seem to me that if
> >> you are moving libraries out of the private $GISBASE tree and into the
> >> public osgeo4w lib dir, removing the versioning from the files is the last
> >> thing you'd want to do.
> >
> >Helmut is trying to do the opposite thing. He is moving grass libs
> >from public osgeo4w lib dir into the private $GISBASE tree. It's quite
> >reasonable approach for WinGRASS installer.
> 
> I will revert r42490, because WinGrass7 (from the WinGrass-installer)
> seems to need versioned libgrass_*.7.0.svn.dll in C:\Program
> Files\GRASS-70-SVN\extralib for starting and unversioned
> libgrass_*.dll C:\Program Files\GRASS-70-SVN\lib for wxnviz. with
> r42490 WinGrass7 isn't starting, with reverted r42490 WinGrass7 is
> starting but wxnviz (3D view mode) isn't working.

Should the ctypes wrappers be changed to use the versioned library
name?

> I will open a ticket because a duplication of files should be avoided.

The unversioned names are supposed to be symlinks. Windows doesn't
have symlinks, so MinGW's "ln" just copies the file.

When binaries (execuables and shared libraries) are linked against a
shared library, the unversioned name is used in the linking command
(e.g. -lgrass_gis).

However: on Windows, the name used to create the DLL (e.g. 
libgrass_gis.7.0.svn.dll) is stored in the DLL, and this is preserved
when the file is copied. When linking against a DLL, the name which is
stored in the target (library or executable) is the name stored in the
library, not the name of the file. So linking with -lgrass_gis links
against libgrass_gis.dll, but the resulting executable or library
depends upon libgrass_gis.7.0.svn.dll.

On Linux, this behaviour only occurs if the library was built with the
-soname linker switch, which isn't the case for GRASS (it is the case
for most system libraries, though).

> "WARNING: Nviz extension (3D view mode) disabled. Reason: intl not found."

It's odd that this only occurs when loading libraries dynamically via
Python.

libintl is required by all GRASS modules; not only is it used directly
by G_gettext(), but <libintl.h> (which is included from
<grass/glocale.h>) defines printf() etc as macros which refer to
libintl_printf() etc.

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


More information about the grass-dev mailing list