[GRASS-dev] what dependencies does GRASS actually need to run?

It would be useful to know for binary installations which dependencies that GRASS actually needs to run as a binary (i.e., not dependencies needed to compile).

AFAICT, it must have PROJ and PROJ requires GDAL (though I don’t think GRASS requires GDAL)

Some other dependencies may be for specific I/O

Anything else it needs just to run if is is already a compiled binary?

Michael


C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

On 15/04/09 17:13, Michael Barton wrote:

It would be useful to know for binary installations which dependencies that GRASS actually needs to *run* as a binary (i.e., not dependencies needed to compile).

AFAICT, it must have PROJ and PROJ requires GDAL (though I don't think GRASS requires GDAL)

r.*.gdal, v.*.ogr require GDAL...

Some other dependencies may be for specific I/O

Anything else it needs just to run if is is already a compiled binary?

Well, that kind of depends on how you compile it, i.e. the configure statement before compilation.

AFAIK, most libraries used in GRASS (including the system libraries) are used as dynamic libraries, so you need those. It also depends on what parts of GRASS you want to use, as, for example, the gdal example shows. nviz has specific requirements and so do some other modules.

As an example, check the required packages for the installation of the GRASS Debian package:

http://packages.debian.org/lenny/grass

Not all of these packages are actually required to run the grass binary, as long as you don't use all of the modules.

Moritz

On 15/04/09 18:40, Michael Barton wrote:

On Apr 15, 2009, at 8:40 AM, Moritz Lennert wrote:

On 15/04/09 17:13, Michael Barton wrote:

It would be useful to know for binary installations which dependencies that GRASS actually needs to *run* as a binary (i.e., not dependencies needed to compile).
AFAICT, it must have PROJ and PROJ requires GDAL (though I don't think GRASS requires GDAL)

r.*.gdal, v.*.ogr require GDAL...

I thought that GRASS now compiles its own r.out.gdal and r.in.gdal and so doesn't need GDAL for these.

It doesn't need the GDAL binary tools (gdal_translate, etc), but it still needs the GDAL libaries which is what r.out.gdal is based on.

I don't know about v.*.ogr

ditto.

Some other dependencies may be for specific I/O
Anything else it needs just to run if is is already a compiled binary?

Well, that kind of depends on how you compile it, i.e. the configure statement before compilation.

Even if you compile with libtif do you need to have libtif to run? On Windows? On Mac?

You can use libraries in a static or in a dynamic way. If you use them statically, then all of the library is compiled into your executable, making it easy to install without many dependencies, but often making it fairly big, especially since your dependencies might depend on something else and so on. And you have to do the same for all programs, even if they use the same libaries (e.g. GDAL for GRASS, QGIS, etc, etc)

So, generally, the choice is to compile with dynamic libraries, meaning that the executable finds the relevant command in the libary binary during execution. This allows different programs to share one version of the library, which reduces size, but can lead to dependency issues, especially if you compile against a different version of the library than the one you use for running the program.

AFAIK, most libraries used in GRASS (including the system libraries) are used as dynamic libraries, so you need those. It also depends on what parts of GRASS you want to use, as, for example, the gdal example shows. nviz has specific requirements and so do some other modules.

As an example, check the required packages for the installation of the GRASS Debian package:

http://packages.debian.org/lenny/grass

Not all of these packages are actually required to run the grass binary, as long as you don't use all of the modules.

This is what I'm asking about. What is a minimal set of dependencies to do most things?

Define "most things" :wink:

You definitely will need libc, I guess proj, don't know about zlib. Don't know if you could create a working GRASS installation (working, but stripped down in its functionality) with just those... If you want some sort of output, you probably need libnpng.

But I'll leave this to the experts. Glynn ?

Moritz

Thanks Moritz,

This is the kind of information I was trying to get at. Trying to get a feel for what is really necessary to make an installable binary on Mac and Windows.

Michael
______________________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Apr 15, 2009, at 9:58 AM, Moritz Lennert wrote:

On 15/04/09 18:40, Michael Barton wrote:

On Apr 15, 2009, at 8:40 AM, Moritz Lennert wrote:

On 15/04/09 17:13, Michael Barton wrote:

It would be useful to know for binary installations which dependencies that GRASS actually needs to *run* as a binary (i.e., not dependencies needed to compile).
AFAICT, it must have PROJ and PROJ requires GDAL (though I don't think GRASS requires GDAL)

r.*.gdal, v.*.ogr require GDAL...

I thought that GRASS now compiles its own r.out.gdal and r.in.gdal and so doesn't need GDAL for these.

It doesn't need the GDAL binary tools (gdal_translate, etc), but it still needs the GDAL libaries which is what r.out.gdal is based on.

I don't know about v.*.ogr

ditto.

Some other dependencies may be for specific I/O
Anything else it needs just to run if is is already a compiled binary?

Well, that kind of depends on how you compile it, i.e. the configure statement before compilation.

Even if you compile with libtif do you need to have libtif to run? On Windows? On Mac?

You can use libraries in a static or in a dynamic way. If you use them statically, then all of the library is compiled into your executable, making it easy to install without many dependencies, but often making it fairly big, especially since your dependencies might depend on something else and so on. And you have to do the same for all programs, even if they use the same libaries (e.g. GDAL for GRASS, QGIS, etc, etc)

So, generally, the choice is to compile with dynamic libraries, meaning that the executable finds the relevant command in the libary binary during execution. This allows different programs to share one version of the library, which reduces size, but can lead to dependency issues, especially if you compile against a different version of the library than the one you use for running the program.

AFAIK, most libraries used in GRASS (including the system libraries) are used as dynamic libraries, so you need those. It also depends on what parts of GRASS you want to use, as, for example, the gdal example shows. nviz has specific requirements and so do some other modules.

As an example, check the required packages for the installation of the GRASS Debian package:

Debian -- Error

Not all of these packages are actually required to run the grass binary, as long as you don't use all of the modules.

This is what I'm asking about. What is a minimal set of dependencies to do most things?

Define "most things" :wink:

You definitely will need libc, I guess proj, don't know about zlib. Don't know if you could create a working GRASS installation (working, but stripped down in its functionality) with just those... If you want some sort of output, you probably need libnpng.

But I'll leave this to the experts. Glynn ?

Moritz

OSX generally uses dynamic libraries. There are a few static libraries available, but frameworks are *always* dynamic. Any (dynamic) libraries used from the system will always be available on all Mac systems of the same version, so there is no need to worry about those as requirements for the end user to worry about.

For OSX, everything in the General Requirements (REQUIREMENTS.html), except GDAL and PROJ, is available in the system (though X11 is an optional install for OSX). So, you could get a basic functional CLI/X11-based (no GUIs, a few missing/nonfunctional modules) GRASS with only GDAL and PROJ.

Many of the optional requirements are not available in the OSX system and others are quite old, and must be installed separately.

When you build the OSX application, you can bundle extra libraries in the application, so the user doesn't have to worry about downloading and installing them - this is what I do for my binaries, except that the frameworks are separate installs. Add install commands to macosx/pkg/bundle.make and use make bindist to generate a bundled application and installer.

On Apr 15, 2009, at 12:06 PM, Michael Barton wrote:

Thanks Moritz,

This is the kind of information I was trying to get at. Trying to get a feel for what is really necessary to make an installable binary on Mac and Windows.

Michael
______________________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Apr 15, 2009, at 9:58 AM, Moritz Lennert wrote:

On 15/04/09 18:40, Michael Barton wrote:

On Apr 15, 2009, at 8:40 AM, Moritz Lennert wrote:

On 15/04/09 17:13, Michael Barton wrote:

It would be useful to know for binary installations which dependencies that GRASS actually needs to *run* as a binary (i.e., not dependencies needed to compile).
AFAICT, it must have PROJ and PROJ requires GDAL (though I don't think GRASS requires GDAL)

r.*.gdal, v.*.ogr require GDAL...

I thought that GRASS now compiles its own r.out.gdal and r.in.gdal and so doesn't need GDAL for these.

It doesn't need the GDAL binary tools (gdal_translate, etc), but it still needs the GDAL libaries which is what r.out.gdal is based on.

I don't know about v.*.ogr

ditto.

Some other dependencies may be for specific I/O
Anything else it needs just to run if is is already a compiled binary?

Well, that kind of depends on how you compile it, i.e. the configure statement before compilation.

Even if you compile with libtif do you need to have libtif to run? On Windows? On Mac?

You can use libraries in a static or in a dynamic way. If you use them statically, then all of the library is compiled into your executable, making it easy to install without many dependencies, but often making it fairly big, especially since your dependencies might depend on something else and so on. And you have to do the same for all programs, even if they use the same libaries (e.g. GDAL for GRASS, QGIS, etc, etc)

So, generally, the choice is to compile with dynamic libraries, meaning that the executable finds the relevant command in the libary binary during execution. This allows different programs to share one version of the library, which reduces size, but can lead to dependency issues, especially if you compile against a different version of the library than the one you use for running the program.

AFAIK, most libraries used in GRASS (including the system libraries) are used as dynamic libraries, so you need those. It also depends on what parts of GRASS you want to use, as, for example, the gdal example shows. nviz has specific requirements and so do some other modules.

As an example, check the required packages for the installation of the GRASS Debian package:

http://packages.debian.org/lenny/grass

Not all of these packages are actually required to run the grass binary, as long as you don't use all of the modules.

This is what I'm asking about. What is a minimal set of dependencies to do most things?

Define "most things" :wink:

You definitely will need libc, I guess proj, don't know about zlib. Don't know if you could create a working GRASS installation (working, but stripped down in its functionality) with just those... If you want some sort of output, you probably need libnpng.

But I'll leave this to the experts. Glynn ?

Moritz

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."

- the wisdom of Tarzan

Moritz Lennert wrote:

> This is what I'm asking about. What is a minimal set of dependencies to
> do most things?

Define "most things" :wink:

You definitely will need libc, I guess proj, don't know about zlib.
Don't know if you could create a working GRASS installation (working,
but stripped down in its functionality) with just those... If you want
some sort of output, you probably need libnpng.

But I'll leave this to the experts. Glynn ?

libgis (and thus all of GRASS) requires zlib.

If you use --without-opengl, --without-x11, --without-wxwidgets and
--without-tcltk, that eliminates a lot of dependencies at the expense
of NVIZ, vdigit, xganim, and ximgview. For the GUI, wxPython will need
some of those libraries, but you aren't hard-coding dependencies on
specific versions into the package.

If you still want NVIZ, building --without-ffmpeg may significantly
reduce the number of dependencies.

Building --without-cairo gets rid of a few more, as does
--without-blas/lapack and --without-fftw (both of these add
dependencies to the gmath library, which is used by ~34 modules).

The PNG driver can be built --without-png; the GUI only needs PNM
output, which doesn't require any libraries.

Once you've done all of that, you're left with PROJ, GDAL, and
whatever libraries GDAL requires. The main issue is that GDAL can
require an almost open-ended set of libraries, depending upon which
options it was built with.

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