[GRASS-user] Building grass version grass-7.8.5

Hi,

I am trying to build the version of GRASS listed in the subject line. However, when I run configure, it does not produce a “Makefile” even though configure appears to complete without error. The closest thing I see to a Makefile is this file: include/Make/Platform.make. I am not running configure in the source code directory as one is always told this is a bad idea (for ex., when building gcc). I am running configure in a separate directory (“/build-grass”). Let me know what I should try next as I am excited to get GRASS running!

Best regards,
Steve

Hi Steve,

I’m no expert in compiling at all, but I always run configure in the source code directory. Have you tried?

Once configure runs without errors, just run make, if no errors at the end, you are good to go

Here’s a wiki with instructions for diverse linux platforms: https://grasswiki.osgeo.org/wiki/Compile_and_Install

hth,

Vero

El vie, 26 mar 2021 a las 18:07, Stephen Kirby (<thinjogger@gmail.com>) escribió:

Hi,

I am trying to build the version of GRASS listed in the subject line. However, when I run configure, it does not produce a “Makefile” even though configure appears to complete without error. The closest thing I see to a Makefile is this file: include/Make/Platform.make. I am not running configure in the source code directory as one is always told this is a bad idea (for ex., when building gcc). I am running configure in a separate directory (“/build-grass”). Let me know what I should try next as I am excited to get GRASS running!

Best regards,
Steve


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Thanks Veronica for that good information. I’ve made some progress by ensuring I had the libs it needs ready (GDAL, etc.). Now it is giving me a Python error :

File “/home/me/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py”, line 305,
**options,
SyntaxError: invalid syntax

I am not a Python user so this is throwing me. I assume I need to install a Python (Python3?) module, via “pip install …” I suppose. Can someone tell me which module can fix this?

For reference, the whole Python block of code containing the offending line, from core.py is:
def make_command(
prog,
flags=“”,
overwrite=False,
quiet=False,
verbose=False,
superquiet=False,
errors=None,
**options,
);

Thanks for any ideas.

Best,
Steve

On Fri, Mar 26, 2021 at 12:25 PM Veronica Andreo <veroandreo@gmail.com> wrote:

Hi Steve,

I’m no expert in compiling at all, but I always run configure in the source code directory. Have you tried?

Once configure runs without errors, just run make, if no errors at the end, you are good to go

Here’s a wiki with instructions for diverse linux platforms: https://grasswiki.osgeo.org/wiki/Compile_and_Install

hth,

Vero

El vie, 26 mar 2021 a las 18:07, Stephen Kirby (<thinjogger@gmail.com>) escribió:

Hi,

I am trying to build the version of GRASS listed in the subject line. However, when I run configure, it does not produce a “Makefile” even though configure appears to complete without error. The closest thing I see to a Makefile is this file: include/Make/Platform.make. I am not running configure in the source code directory as one is always told this is a bad idea (for ex., when building gcc). I am running configure in a separate directory (“/build-grass”). Let me know what I should try next as I am excited to get GRASS running!

Best regards,
Steve


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Stephen,

Let’s see if I can help you. I always compile GRASS from source and in my experience whenever there is a problem the most probable reason is that a library is lacking. Seldom is GRASS itself the problem.

The instructions Vero linked work of course but these are general and you need to change them to adapt to your system or preferred setup. So that depends on you.

I do not see what exactly you are doing or in which OS you are. It seems that you may need to ensure that python 3 is installed with its relevant modules. How that is done depends on your exact system. Pay attention that the GRASS GUI needs python wxWidgets bindings.

Assuming you are in Linux and that you have all the required libraries (including dev packages) installed, this should work:

  • open a terminal and log in as root user

  • change dir to /usr/local/src

  • get the package file

wget https://github.com/OSGeo/grass/archive/refs/tags/7.8.5.tar.gz

  • untar and uncompress the package file

tar -xvf 7.8.5.tar.gz

  • change dir to grass-7.8.5

cd grass-7.8.5 (or whatever is called)

  • configure, this depends on what exactly you have and what you want to do. The following is the line I use often. You need to edit this to suit your system and needs:

./configure --enable-shared --with-odbc --with-fftw --with-readline --with-curses --with-proj-share=/usr/local/share/proj --enable-largefile --with-motif --with-freetype --with-freetype-includes=/usr/include/freetype2 --with-sqlite --enable-64bit --with-geos --with-python --with-netcdf --with-blas
``

-make (use the N = number of cores in your processor to parallelize and make it complete in less time)

make -j N

- install (this will put a script called grass78 in /usr/local/bin):

make install

  • as normal user, type in a terminal:

grass78

GRASS should then start.

Good luck

Hernán

···

On 2021-03-26 23:13, Stephen Kirby wrote:

Thanks Veronica for that good information. I’ve made some progress by ensuring I had the libs it needs ready (GDAL, etc.). Now it is giving me a Python error :

File “/home/me/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py”, line 305,
**options,
SyntaxError: invalid syntax

I am not a Python user so this is throwing me. I assume I need to install a Python (Python3?) module, via “pip install …” I suppose. Can someone tell me which module can fix this?

For reference, the whole Python block of code containing the offending line, from core.py is:
def make_command(
prog,
flags=“”,
overwrite=False,
quiet=False,
verbose=False,
superquiet=False,
errors=None,
**options,
);

Thanks for any ideas.

Best,
Steve

On Fri, Mar 26, 2021 at 12:25 PM Veronica Andreo <veroandreo@gmail.com> wrote:

Hi Steve,

I’m no expert in compiling at all, but I always run configure in the source code directory. Have you tried?

Once configure runs without errors, just run make, if no errors at the end, you are good to go

Here’s a wiki with instructions for diverse linux platforms: https://grasswiki.osgeo.org/wiki/Compile_and_Install

hth,

Vero

El vie, 26 mar 2021 a las 18:07, Stephen Kirby (<thinjogger@gmail.com>) escribió:

Hi,

I am trying to build the version of GRASS listed in the subject line. However, when I run configure, it does not produce a “Makefile” even though configure appears to complete without error. The closest thing I see to a Makefile is this file: include/Make/Platform.make. I am not running configure in the source code directory as one is always told this is a bad idea (for ex., when building gcc). I am running configure in a separate directory (“/build-grass”). Let me know what I should try next as I am excited to get GRASS running!

Best regards,
Steve


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)

Am 26. März 2021 23:13:18 MEZ schrieb Stephen Kirby <thinjogger@gmail.com>:

Thanks Veronica for that good information. I've made some progress by
ensuring I had the libs it needs ready (GDAL, etc.). Now it is giving me a
Python error :

File
"/home/me/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 305,
**options,
SyntaxError: invalid syntax

I am not a Python user so this is throwing me. I assume I need to install
a Python (Python3?) module, via "pip install ..." I suppose. Can someone
tell me which module can fix this?

For reference, the whole Python block of code containing the offending
line, from core.py is:
def make_command(
prog,
flags="",
overwrite=False,
quiet=False,
verbose=False,
superquiet=False,
errors=None,
**options,
);

AFAICT there should not be a comma after **options. This would explain the syntax error.

Moritz

Actually, the trailing comma after **kwargs is a feature introduced in recent Python 3 versions. It was recently introduced into our code through Black [1].

So, make sure you have Python 3.6+ installed on your system and that this is the Python version called during compilation.

Moritz

[1] https://github.com/OSGeo/grass/pull/1382

Am 27. März 2021 11:07:02 MEZ schrieb Moritz Lennert <mlennert@club.worldonline.be>:

Am 26. März 2021 23:13:18 MEZ schrieb Stephen Kirby <thinjogger@gmail.com>:

Thanks Veronica for that good information. I've made some progress by
ensuring I had the libs it needs ready (GDAL, etc.). Now it is giving me a
Python error :

File
"/home/me/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 305,
**options,
SyntaxError: invalid syntax

I am not a Python user so this is throwing me. I assume I need to install
a Python (Python3?) module, via "pip install ..." I suppose. Can someone
tell me which module can fix this?

For reference, the whole Python block of code containing the offending
line, from core.py is:
def make_command(
prog,
flags="",
overwrite=False,
quiet=False,
verbose=False,
superquiet=False,
errors=None,
**options,
);

AFAICT there should not be a comma after **options. This would explain the syntax error.

Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Thanks for all of the great pointers. Updating Python3 to version 3.9.2 made it possible for me to build GRASS finally.

A couple of small issues now have me slightly puzzled:

  1. when I ran “grass79”, the GUI popped up just fine the first time. However, the GUI did not entirely fit the screen (I can’t see the bottom of the GUI, where the “start GRASS” button is). I am running a Debian Linux virtual machine (via virtualbox).
  2. for some reason, I am now getting a new error whereby the GUI no longer pops up: “wxnviz.py: No module named grass.lib.ogsf” followed by “No such file or directory: /usr/local/grass79/gui/wxpython/xml/menudata.xml”. I checked and I do have the /usr/local/grass79/gui/wxpython/xml directory with lots of files but not that one.

Any ideas greatly appreciated.

(Note; when the GUI did work the first time, I used the GRASS download capability to obtain the North Carolina dataset, Can’t wait to visualize the weather dataset contained therein.)

Best regards,
Steve

On Sat, Mar 27, 2021 at 4:25 AM Moritz Lennert <mlennert@club.worldonline.be> wrote:

Actually, the trailing comma after **kwargs is a feature introduced in recent Python 3 versions. It was recently introduced into our code through Black [1].

So, make sure you have Python 3.6+ installed on your system and that this is the Python version called during compilation.

Moritz

[1] https://github.com/OSGeo/grass/pull/1382

Am 27. März 2021 11:07:02 MEZ schrieb Moritz Lennert <mlennert@club.worldonline.be>:

Am 26. März 2021 23:13:18 MEZ schrieb Stephen Kirby <thinjogger@gmail.com>:

Thanks Veronica for that good information. I’ve made some progress by
ensuring I had the libs it needs ready (GDAL, etc.). Now it is giving me a
Python error :

File
“/home/me/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py”,
line 305,
**options,
SyntaxError: invalid syntax

I am not a Python user so this is throwing me. I assume I need to install
a Python (Python3?) module, via “pip install …” I suppose. Can someone
tell me which module can fix this?

For reference, the whole Python block of code containing the offending
line, from core.py is:
def make_command(
prog,
flags=“”,
overwrite=False,
quiet=False,
verbose=False,
superquiet=False,
errors=None,
**options,
);

AFAICT there should not be a comma after **options. This would explain the syntax error.

Moritz


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user