Open petrasovaa opened 3 years ago
Can you pls specify more? On which Linux distro does it fail with which error?
Debian:
https://grass.osgeo.org/grass7/manuals/addons/ --> r.pi present
It also compiles on my Fedora box.
Sorry, I clarified in the description.
Next try on my Fedora 33 box: I am not able to reproduce the problem. Maybe you have different compiler flags?
g.extension r.pi --verbose
Type of source identified as 'official'.
Fetching <r.pi> from GRASS GIS Addons repository (be patient)...
A r.pi
A r.pi/FIXES_markus.txt
A r.pi/Makefile
A r.pi/TODO.txt
A r.pi/r.pi.corearea
A r.pi/r.pi.corearea/Makefile
A r.pi/r.pi.corearea/func.c
...
gcc -O2 -march=native -std=gnu99 -fexceptions -fstack-protector -m64 -fdiagnostics-color -D_FORTIFY_SOURCE=1 -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DPACKAGE=\""grassmods"\" -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DRELDIR=\"/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.fnn\" -o OBJ.x86_64-pc-linux-gnu/parser.o -c parser.c
: && gcc -L/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib -L/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib -Wl,--no-undefined -Wl,-z,now -Wl,--export-dynamic -Wl,-rpath-link,/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib -o /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin/r.pi.fnn OBJ.x86_64-pc-linux-gnu/func.o OBJ.x86_64-pc-linux-gnu/heap.o OBJ.x86_64-pc-linux-gnu/main.o OBJ.x86_64-pc-linux-gnu/matrix.o OBJ.x86_64-pc-linux-gnu/parser.o -lgrass_stats.7.8 -lgrass_raster.7.8 -lgrass_gis.7.8 -lgrass_rpi -lm
if [ "/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin/r.pi.fnn" != "" ] ; then GISRC=/home/mneteler/tmp/grass7-mneteler-1479941/gisrc GISBASE=/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu PATH="/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/scripts:$PATH" PYTHONPATH="/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/etc/python:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython:$PYTHONPATH" LD_LIBRARY_PATH="/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/scripts:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib" LC_ALL=C LANG=C LANGUAGE=C /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin/r.pi.fnn --html-description < /dev/null | grep -v '</body>\|</html>' > r.pi.fnn.tmp.html ; fi
VERSION_NUMBER=7.8.6dev VERSION_DATE=2021 MODULE_TOPDIR=/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu \
python3 /home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/tools/mkhtml.py r.pi.fnn > /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/docs/html/r.pi.fnn.html
VERSION_NUMBER=7.8.6dev /home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/tools/g.html2man.py "/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/docs/html/r.pi.fnn.html" "/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/docs/man/man1/r.pi.fnn.1"
rm r.pi.fnn.tmp.html
make[1]: Leaving directory '/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.fnn'
make -C r.pi.graph || echo /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph >> /home/mneteler/software/grass78/error.log
make[1]: Entering directory '/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph'
test -d OBJ.x86_64-pc-linux-gnu || mkdir -p OBJ.x86_64-pc-linux-gnu
gcc -O2 -march=native -std=gnu99 -fexceptions -fstack-protector -m64 -fdiagnostics-color -D_FORTIFY_SOURCE=1 -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DPACKAGE=\""grassmods"\" -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DRELDIR=\"/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph\" -o OBJ.x86_64-pc-linux-gnu/draw.o -c draw.c
gcc -O2 -march=native -std=gnu99 -fexceptions -fstack-protector -m64 -fdiagnostics-color -D_FORTIFY_SOURCE=1 -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DPACKAGE=\""grassmods"\" -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DRELDIR=\"/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph\" -o OBJ.x86_64-pc-linux-gnu/func.o -c func.c
gcc -O2 -march=native -std=gnu99 -fexceptions -fstack-protector -m64 -fdiagnostics-color -D_FORTIFY_SOURCE=1 -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DPACKAGE=\""grassmods"\" -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DRELDIR=\"/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph\" -o OBJ.x86_64-pc-linux-gnu/hull.o -c hull.c
gcc -O2 -march=native -std=gnu99 -fexceptions -fstack-protector -m64 -fdiagnostics-color -D_FORTIFY_SOURCE=1 -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DPACKAGE=\""grassmods"\" -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -I/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/include -DRELDIR=\"/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph\" -o OBJ.x86_64-pc-linux-gnu/main.o -c main.c
: && gcc -L/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib -L/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib -Wl,--no-undefined -Wl,-z,now -Wl,--export-dynamic -Wl,-rpath-link,/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib -o /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin/r.pi.graph OBJ.x86_64-pc-linux-gnu/draw.o OBJ.x86_64-pc-linux-gnu/func.o OBJ.x86_64-pc-linux-gnu/hull.o OBJ.x86_64-pc-linux-gnu/main.o -lgrass_stats.7.8 -lgrass_raster.7.8 -lgrass_gis.7.8 -lgrass_rpi -lm
if [ "/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin/r.pi.graph" != "" ] ; then GISRC=/home/mneteler/tmp/grass7-mneteler-1479941/gisrc GISBASE=/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu PATH="/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/scripts:$PATH" PYTHONPATH="/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/etc/python:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/gui/wxpython:$PYTHONPATH" LD_LIBRARY_PATH="/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/bin:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/scripts:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib:/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/lib" LC_ALL=C LANG=C LANGUAGE=C /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/bin/r.pi.graph --html-description < /dev/null | grep -v '</body>\|</html>' > r.pi.graph.tmp.html ; fi
VERSION_NUMBER=7.8.6dev VERSION_DATE=2021 MODULE_TOPDIR=/home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu \
python3 /home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/tools/mkhtml.py r.pi.graph > /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/docs/html/r.pi.graph.html
VERSION_NUMBER=7.8.6dev /home/mneteler/software/grass78/dist.x86_64-pc-linux-gnu/tools/g.html2man.py "/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/docs/html/r.pi.graph.html" "/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/docs/man/man1/r.pi.graph.1"
rm r.pi.graph.tmp.html
make[1]: Leaving directory '/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph'
make -C r.pi.graph.dec || echo /home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph.dec >> /home/mneteler/software/grass78/error.log
make[1]: Entering directory '/home/mneteler/tmp/grass7-mneteler-1479941/tmpsrxjg_4m/r.pi/r.pi.graph.dec
...
Manual page for <r.pi.graph.dec> updated
Manual page for <r.pi.graph.red> updated
Manual page for <r.pi.odc> updated
Manual page for <r.pi.corr.mw> updated
Manual page for <r.pi.energy.pr> updated
Manual page for <r.pi.fnn> updated
Installation of <r.pi> successfully finished
...
It also compiles on Mac OSX 10.15.7 in GRASS7.9dev (binary from Michael from Jan 11), it just gives the same warnings. Helena
GRASS nc_spm_08_grass7/assignments:~ > g.extension r.pi
Fetching <r.pi> from GRASS GIS Addons repository (be patient)...
Compiling...
matrix.c:42:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
G_fatal_error(msg);
^~~
matrix.c:42:20: note: treat the string as an argument to avoid this
G_fatal_error(msg);
^
"%s",
1 warning generated.
matrix.c:44:20: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
G_fatal_error(msg);
^~~
matrix.c:44:20: note: treat the string as an argument to avoid this
G_fatal_error(msg);
^
"%s",
1 warning generated.
Installing...
make[1]: *** No rule to make target install'. Stop. Updating extensions metadata file... Updating extension modules metadata file... WARNING: No metadata available for module 'r.pi'. Installation of <r.pi> successfully finished
Still valid for Windows.
@petrasovaa Please check https://github.com/OSGeo/grass-addons/pull/840
Name of the addon r.pi
Describe the bug Compilation fails Windows, see e.g. log here
Additionally,
g.extension r.pi
fails on Ubuntu with the following although r.pi can be compiled directly.