[GRASS-dev] make in g.extension (G6 vs G7)
Martin Landa
landa.martin at gmail.com
Thu Jun 23 11:37:41 EDT 2011
Hi all,
comparing g.extension's compiling approach in G6 (bash) and G7
(python). In G6 is set external GISBASE which requires to define bunch
of ARCH_ variables.
make MODULE_TOPDIR="$GISBASE" ARCH_INC="-I$GISBASE/include
-I${MYINST_DIR}/include -I$TMPDIR/dist/include"
ARCH_LIBPATH="-L$GISBASE/lib -L${MYINST_DIR}/lib -L$TMPDIR/dist/lib"
ARCH_LIBDIR="$GISBASE/lib" ARCH_DISTDIR="$TMPDIR/dist"
Notes: there are also some unsolved problems
if [ "/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/bin/r.area"
!= "" ] ; then GISRC=/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/demolocation/.grassrc64
GISBASE=~/smetiste/grass6/grass-6.4.2svn
PATH="/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/bin:$PATH"
LD_LIBRARY_PATH="/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/bin:/home/landa/smetiste/grass6/grass-6.4.2svn/lib:/home/landa/smetiste/grass6/grass-6.4.2svn/lib"
LC_ALL=C /home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/bin/r.area
--html-description < /dev/null | grep -v '</body>\|</html>' >
r.area.tmp.html ; true ; fi
ERROR: G_getenv(): Variable LOCATION_NAME not set
and
GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2svn sh
/home/landa/smetiste/grass6/grass-6.4.2svn/tools/g.html2man
/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/docs/html/r.area.html
/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/man/man1/r.area.1
1
make[2]: *** [/home/landa/grassdata/nc_spm_08/sqlite/.tmp/geo102/9408.0/dist/man/man1/r.area.1]
Error 127
In G7 no extra GISBASE is set, in the result
ret = grass.call(['make',
'MODULE_TOPDIR=%s' % gisbase.replace(' ', '\ '),
'BIN=%s' % bin_dir,
'HTMLDIR=%s' % html_dir,
'MANDIR=%s' % man1_dir,
'SCRIPTDIR=%s' % script_dir],
g.extension in G7 should work without problems compared to g.extension in G6.
It will be good at least to sync these approaches.
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
More information about the grass-dev
mailing list