[GRASS-user] make fails to find Platform.make

Hi all,

I am compiling GRASS 7.6 in an HPC cluster running Scientific Linux. make is failing to find the folder or file …/…/include/Make/Platform.make, I don’t recall seeing this before.

This is the configuration command:

./configure \

-prefix=/home/WUR/duque004/grass/ \

–enable-64bit --with-fftw-includes=/cm/shared/apps/fftw/openmpi/gcc/64/3.3.7/include/ \

–with-freetype-includes=/home/WUR/duque004/grass/freetypes/freetype-2.9.1/include/ \

–with-postgres=yes \

–with-netcdf --with-geos --with-blas --with-lapack

And its output:

GRASS is now configured for: x86_64-pc-linux-gnu

Source directory: /home/WUR/duque004/grass/grass-7.6.0

Build directory: /home/WUR/duque004/grass/grass-7.6.0

Installation directory: ${prefix}/grass-7.6.0

Startup script in directory:${exec_prefix}/bin

C compiler: gcc -g -O2

C++ compiler: c++ -g -O2

Building shared libraries: yes

OpenGL platform: X11

MacOSX application: no

MacOSX architectures:

MacOSX SDK:

BLAS support: yes

BZIP2 support: no

C++ support: yes

Cairo support: yes

DWG support: no

FFTW support: yes

FreeType support: yes

GDAL support: yes

GEOS support: yes

LAPACK support: yes

Large File support (LFS): yes

libLAS support: no

MySQL support: no

NetCDF support: yes

NLS support: no

ODBC support: no

OGR support: yes

OpenCL support: no

OpenGL support: yes

OpenMP support: no

PDAL support: no

PNG support: yes

POSIX thread support: no

PostgreSQL support: yes

Readline support: no

Regex support: yes

SQLite support: yes

TIFF support: yes

X11 support: yes

Zstandard support: no

using old PROJ 4 API

make then fails for about 50 modules, of all kinds. Running make individually always yields the same error:

$ cd /home/WUR/duque004/grass/grass-7.6.0/lib/gmath

$ make

…/…/include/Make/Vars.make:1: …/…/include/Make/Platform.make: No such file or directory

…/…/include/Make/Shlib.make:10: warning: overriding recipe for target `/dist./lib/grass_gmath…’

…/…/include/Make/Stlib.make:5: warning: ignoring old recipe for target `/dist./lib/grass_gmath…’

make: *** No rule to make target `…/…/include/Make/Platform.make’. Stop.

$ cd /home/WUR/duque004/grass/grass-7.6.0/lib/rst/interp_float

$ make

…/…/…/include/Make/Vars.make:1: …/…/…/include/Make/Platform.make: No such file or directory

…/…/…/include/Make/Shlib.make:10: warning: overriding recipe for target `/dist./lib/grass_interpfl…’

…/…/…/include/Make/Stlib.make:5: warning: ignoring old recipe for target `/dist./lib/grass_interpfl…’

make: *** No rule to make target `…/…/…/include/Make/Platform.make’. Stop.

$ cd /home/WUR/duque004/grass/grass-7.6.0/raster/r.sun

$ make

…/…/include/Make/Vars.make:1: …/…/include/Make/Platform.make: No such file or directory

make: *** No rule to make target `…/…/include/Make/Platform.make’. Stop.

Any clues on what may be causing this? Thank you.

···

Luís

Hi Luí­s,

On Thu, Sep 19, 2019 at 11:24 AM Luí­s Moreira de Sousa <luis.de.sousa@protonmail.ch> wrote:

Hi all,

I am compiling GRASS 7.6

Please consider to switch to 7.8.
https://trac.osgeo.org/grass/wiki/Release/7.8.0-News

If you have to stick to Python 2, then this modification is needed in the source code (run in the main source code directory):

find -name ‘.py’ | xargs sed -i ‘s,#!/usr/bin/env python3,#!/usr/bin/env python2,’ && find -name '.py’ | xargs sed -i ‘s,python3,python2,’

in an HPC cluster running Scientific Linux. make is failing to find the folder or file …/…/include/Make/Platform.make, I don’t recall seeing this before.

It should be produced by the “configure” step.
Is the file present after having run “configure”?

Best,
Markus

Hi Markus,

thank you for the swift reply. I still do not have all the dependencies for GRASS 7.8 in this cluster, I’ll try that later. The Platform.make file is being created by the configure command:

$ find . -name “Platform.make”

./include/Make/Platform.make

Thank you.

···

Luís

Hi Luí­s,

On Thu, Sep 19, 2019 at 3:49 PM Luí­s Moreira de Sousa
<luis.de.sousa@protonmail.ch> wrote:

Hi Markus,

thank you for the swift reply. I still do not have all the dependencies for GRASS 7.8 in this cluster, I'll try that later. The Platform.make file is being created by the configure command:

$ find . -name "Platform.make"
./include/Make/Platform.make

ok, good.

"make distclean" you had obviously done before, right?

Any unusual soft links there?

Markus

--
Luís

--
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog

Hello again,

I started the process from the beginning, running configure on a fresh source folder. I confirmed that indeed the Platform.make was present. This time make completed without errors:

GRASS GIS 7.6.0 exported compilation log
--------------------------------------------------
Started compilation: vr sep 20 08:58:53 CEST 2019
--
Errors in:
No errors detected.
--
Finished compilation: vr sep 20 09:07:06 CEST 2019

However, make install fails, again because the Platform.make file is missing. Interestingly, make itself is deleting the file, note the rm command below:

$ make install
/home/WUR/duque004/grass/grass-7.6.0/bin.x86_64-pc-linux-gnu/grass76
make install-check-built
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make install-check-parent
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make install-check-writable
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make install-check-prefix
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make real-install
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
tar cBCf /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu - . | tar xBCf /home/WUR/duque004/grass//grass-7.6.0 - 2>/dev/null
make[1]: [real-install] Error 2 (ignored)
rm /home/WUR/duque004/grass//grass-7.6.0/grass76.tmp
make /home/WUR/duque004/grass//bin/grass76
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
sed -e 's#'@GISBASE@'#'/home/WUR/duque004/grass//grass-7.6.0'#g' \
    -e 's#'@LD_LIBRARY_PATH_VAR@'#'LD_LIBRARY_PATH'#g' \
    -e 's#'@CONFIG_PROJSHARE@'#'/usr/share/proj'#g' \
    /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/grass76.tmp > /home/WUR/duque004/grass//bin/grass76
chmod a+x /home/WUR/duque004/grass//bin/grass76
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
rm /home/WUR/duque004/grass//grass-7.6.0/etc/fontcap
make /home/WUR/duque004/grass//grass-7.6.0/etc/fontcap
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
sed -e 's#/home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu#/home/WUR/duque004/grass//grass-7.6.0#g' /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/etc/fontcap > /home/WUR/duque004/grass//grass-7.6.0/etc/fontcap
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
rm /home/WUR/duque004/grass//grass-7.6.0/demolocation/.grassrc76
make /home/WUR/duque004/grass//grass-7.6.0/demolocation/.grassrc76
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
sed -e 's#/home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu#/home/WUR/duque004/grass//grass-7.6.0#g' /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/demolocation/.grassrc76 > /home/WUR/duque004/grass//grass-7.6.0/demolocation/.grassrc76
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
rm /home/WUR/duque004/grass//grass-7.6.0/include/Make/Platform.make
make /home/WUR/duque004/grass//grass-7.6.0/include/Make/Platform.make
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
include/Make/Vars.make:1: include/Make/Platform.make: No such file or directory
make[2]: *** No rule to make target `include/Make/Platform.make'. Stop.
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: *** [real-install] Error 2
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make: *** [install] Error 2

How can I prevent make from deleting this file? I can try playing around with permissions, but that would be just a workaround.

Thank you.

--
Luís

Hi,

On Fri, Sep 20, 2019 at 9:54 AM Luí­s Moreira de Sousa
<luis.de.sousa@protonmail.ch> wrote:

Hello again,

I started the process from the beginning, running configure on a fresh source folder. I confirmed that indeed the Platform.make was present. This time make completed without errors:

GRASS GIS 7.6.0 exported compilation log
--------------------------------------------------
Started compilation: vr sep 20 08:58:53 CEST 2019
--
Errors in:
No errors detected.
--
Finished compilation: vr sep 20 09:07:06 CEST 2019

so, at this point the
/home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/include/Make/Platform.make
is still there, right?

And then...

However, make install fails, again because the Platform.make file is missing. Interestingly, make itself is deleting the file, note the rm command below:

$ make install
/home/WUR/duque004/grass/grass-7.6.0/bin.x86_64-pc-linux-gnu/grass76
make install-check-built
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make install-check-parent
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make install-check-writable
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make install-check-prefix
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
make[1]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
make real-install
make[1]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
tar cBCf /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu - . | tar xBCf /home/WUR/duque004/grass//grass-7.6.0 - 2>/dev/null
make[1]: [real-install] Error 2 (ignored)
rm /home/WUR/duque004/grass//grass-7.6.0/grass76.tmp
make /home/WUR/duque004/grass//bin/grass76
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
sed -e 's#'@GISBASE@'#'/home/WUR/duque004/grass//grass-7.6.0'#g' \
    -e 's#'@LD_LIBRARY_PATH_VAR@'#'LD_LIBRARY_PATH'#g' \
    -e 's#'@CONFIG_PROJSHARE@'#'/usr/share/proj'#g' \
    /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/grass76.tmp > /home/WUR/duque004/grass//bin/grass76
chmod a+x /home/WUR/duque004/grass//bin/grass76
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
rm /home/WUR/duque004/grass//grass-7.6.0/etc/fontcap
make /home/WUR/duque004/grass//grass-7.6.0/etc/fontcap
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
sed -e 's#/home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu#/home/WUR/duque004/grass//grass-7.6.0#g' /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/etc/fontcap > /home/WUR/duque004/grass//grass-7.6.0/etc/fontcap
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
rm /home/WUR/duque004/grass//grass-7.6.0/demolocation/.grassrc76
make /home/WUR/duque004/grass//grass-7.6.0/demolocation/.grassrc76
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
sed -e 's#/home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu#/home/WUR/duque004/grass//grass-7.6.0#g' /home/WUR/duque004/grass/grass-7.6.0/dist.x86_64-pc-linux-gnu/demolocation/.grassrc76 > /home/WUR/duque004/grass//grass-7.6.0/demolocation/.grassrc76
make[2]: Leaving directory `/home/WUR/duque004/grass/grass-7.6.0'
rm /home/WUR/duque004/grass//grass-7.6.0/include/Make/Platform.make
make /home/WUR/duque004/grass//grass-7.6.0/include/Make/Platform.make
make[2]: Entering directory `/home/WUR/duque004/grass/grass-7.6.0'
include/Make/Vars.make:1: include/Make/Platform.make: No such file or directory

... it disappears?
I am quite surprised to see this error since the install part hasn't
been touched for years (as not needed).

History (last change in 2014):
https://github.com/OSGeo/grass/commits/releasebranch_7_6/include/Make/Install.make

Here it works smoothly:

[...]
make[1]: Leaving directory '/home/mneteler/software/grass76_git'
make manifests
make[1]: Entering directory '/home/mneteler/software/grass76_git'
make[1]: Nothing to be done for 'manifests'.
make[1]: Leaving directory '/home/mneteler/software/grass76_git'
GRASS GIS 7.6.2dev 0506cda42 compilation log
--------------------------------------------------
Started compilation: Fri 20 Sep 2019 01:34:01 PM CEST
--
Errors in:
No errors detected.
--
Finished compilation: Fri 20 Sep 2019 01:54:41 PM CEST

13:54 $ make install
/home/mneteler/software/grass76_git/bin.x86_64-pc-linux-gnu/grass76
make install-check-built
make[1]: Entering directory '/home/mneteler/software/grass76_git'
make[1]: Leaving directory '/home/mneteler/software/grass76_git'
make install-check-parent
make[1]: Entering directory '/home/mneteler/software/grass76_git'
make[1]: Leaving directory '/home/mneteler/software/grass76_git'
make install-check-writable
make[1]: Entering directory '/home/mneteler/software/grass76_git'
make[1]: Leaving directory '/home/mneteler/software/grass76_git'
make install-check-prefix
make[1]: Entering directory '/home/mneteler/software/grass76_git'
make[1]: Leaving directory '/home/mneteler/software/grass76_git'
make real-install
make[1]: Entering directory '/home/mneteler/software/grass76_git'
mkdir -p -m 755 /home/mneteler/tmp//grass76
tar cBCf /home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu
- . | tar xBCf /home/mneteler/tmp//grass76 - 2>/dev/null
rm /home/mneteler/tmp//grass76/grass76.tmp
make /home/mneteler/tmp//bin/grass76
make[2]: Entering directory '/home/mneteler/software/grass76_git'
sed -e 's#'@GISBASE@'#'/home/mneteler/tmp//grass76'#g' \
    -e 's#'@LD_LIBRARY_PATH_VAR@'#'LD_LIBRARY_PATH'#g' \
    -e 's#'@CONFIG_PROJSHARE@'#'/usr/share/proj'#g' \
    /home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/grass76.tmp

/home/mneteler/tmp//bin/grass76

chmod a+x /home/mneteler/tmp//bin/grass76
make[2]: Leaving directory '/home/mneteler/software/grass76_git'
rm /home/mneteler/tmp//grass76/etc/fontcap
make /home/mneteler/tmp//grass76/etc/fontcap
make[2]: Entering directory '/home/mneteler/software/grass76_git'
sed -e 's#/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu#/home/mneteler/tmp//grass76#g'
/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/etc/fontcap

/home/mneteler/tmp//grass76/etc/fontcap

make[2]: Leaving directory '/home/mneteler/software/grass76_git'
rm /home/mneteler/tmp//grass76/demolocation/.grassrc76
make /home/mneteler/tmp//grass76/demolocation/.grassrc76
make[2]: Entering directory '/home/mneteler/software/grass76_git'
sed -e 's#/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu#/home/mneteler/tmp//grass76#g'
/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/demolocation/.grassrc76

/home/mneteler/tmp//grass76/demolocation/.grassrc76

make[2]: Leaving directory '/home/mneteler/software/grass76_git'
rm /home/mneteler/tmp//grass76/include/Make/Platform.make
make /home/mneteler/tmp//grass76/include/Make/Platform.make
make[2]: Entering directory '/home/mneteler/software/grass76_git'
sed -e 's#^\(GRASS_HOME.[^=]*\).*#\1= /home/mneteler/tmp//grass76#g'
-e 's#/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu#/home/mneteler/tmp//grass76#g'
/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/include/Make/Platform.make

/home/mneteler/tmp//grass76/include/Make/Platform.make

make[2]: Leaving directory '/home/mneteler/software/grass76_git'
rm /home/mneteler/tmp//grass76/include/Make/Grass.make
make /home/mneteler/tmp//grass76/include/Make/Grass.make
make[2]: Entering directory '/home/mneteler/software/grass76_git'
sed -e 's#^\(ARCH_DISTDIR.[^=]*\).*#\1= /home/mneteler/tmp//grass76#g'
-e 's#^\(ARCH_BINDIR.[^=]*\).*#\1= /home/mneteler/tmp//bin#g'
/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/include/Make/Grass.make

/home/mneteler/tmp//grass76/include/Make/Grass.make

make[2]: Leaving directory '/home/mneteler/software/grass76_git'
/usr/bin/install -c config.status /home/mneteler/tmp//grass76/config.status
chmod -R a+rX /home/mneteler/tmp//grass76 2>/dev/null
make[1]: Leaving directory '/home/mneteler/software/grass76_git'

Is this drive
/home/WUR/duque004/
on a network with "unusual" file systems? Just a wild guess...

Markus

Hi again Markus, thank you for following up.

In your example we can see this:

rm /home/mneteler/tmp//grass76/include/Make/Platform.make
make /home/mneteler/tmp//grass76/include/Make/Platform.make

How can it work? Is the file recreated somehow after the rm command? What happens if you run only make include/Make/Platform.make?

Regarding the volume: I think it is NFS, providing the user areas in the HPC cluster.

Thanks you.

--
Luís

On Fri, Sep 20, 2019 at 2:21 PM Luí­s Moreira de Sousa <luis.de.sousa@protonmail.ch> wrote:

Hi again Markus, thank you for following up.

In your example we can see this:

rm /home/mneteler/tmp//grass76/include/Make/Platform.make
make /home/mneteler/tmp//grass76/include/Make/Platform.make

How can it work? Is the file recreated somehow after the rm command? What happens if you run only make include/Make/Platform.make?

in this case “/home/mneteler/tmp//grass76” is the installation target, “make install” cleans up leftovers from a previous installation. The real Platform.make is in this example here:
/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/include/Make/Platform.make
to be installed to
/home/mneteler/tmp//grass76/include/Make/Platform.make

What is you install target, defined with configure --prefix= ?

Markus M

Regarding the volume: I think it is NFS, providing the user areas in the HPC cluster.

Thanks you.


Luís


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

On Fri, Sep 20, 2019 at 3:08 PM Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Fri, Sep 20, 2019 at 2:21 PM Luí­s Moreira de Sousa <luis.de.sousa@protonmail.ch> wrote:

Hi again Markus, thank you for following up.

In your example we can see this:

rm /home/mneteler/tmp//grass76/include/Make/Platform.make
make /home/mneteler/tmp//grass76/include/Make/Platform.make

How can it work? Is the file recreated somehow after the rm command? What happens if you run only make include/Make/Platform.make?

in this case “/home/mneteler/tmp//grass76” is the installation target, “make install” cleans up leftovers from a previous installation. The real Platform.make is in this example here:
/home/mneteler/software/grass76_git/dist.x86_64-pc-linux-gnu/include/Make/Platform.make
to be installed to
/home/mneteler/tmp//grass76/include/Make/Platform.make

What is you install target, defined with configure --prefix= ?

Ah, I see. You configured with

/configure \

-prefix=/home/WUR/duque004/grass/

which will install GRASS to

/home/WUR/duque004/grass/grass-7.6.0

but that is also your source and build directory. You need to move the grass source to somewhere else or use a different prefix

Markus M

Markus M

Regarding the volume: I think it is NFS, providing the user areas in the HPC cluster.

Thanks you.


Luís


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

Thank you both for your patience. The issue was indeed a wrong target path.

Cheers.

···

Luís

On Fri, 20 Sep 2019, Markus Metz wrote:

/configure \
-prefix=/home/WUR/duque004/grass/

which will install GRASS to
/home/WUR/duque004/grass/grass-7.6.0 but that is also your source and
build directory. You need to move the grass source to somewhere else or
use a different prefix

Specifying --prefix=/usr/local/ is a good place. Or, /usr/ depending on
where you want non-distribution executables to be found.

Regards,

Rich