[GRASS-dev] undefined reference to `va_ri'

Hi,

I'm attempting to compile current svn (r34142) following the guideline at
http://grass.osgeo.org/wiki/Compile_and_Install on Ubntu 8.10 amd64. At the
"make" stage I'm getting the error

  "make[1]: Entering directory `/usr/local/src/grass_trunk/imagery/i.vi'
gcc -L/usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/lib
-Wl,--export-dynamic -L/usr/lib64
-Wl,-rpath-link,/usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/lib
-o /usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/i.vi
OBJ.x86_64-unknown-linux-gnu/arvi.o OBJ.x86_64-unknown-linux-gnu/dvi.o
OBJ.x86_64-unknown-linux-gnu/evi.o OBJ.x86_64-unknown-linux-gnu/gari.o
OBJ.x86_64-unknown-linux-gnu/gemi.o OBJ.x86_64-unknown-linux-gnu/gvi.o
OBJ.x86_64-unknown-linux-gnu/ipvi.o OBJ.x86_64-unknown-linux-gnu/main.o
OBJ.x86_64-unknown-linux-gnu/msavi2.o OBJ.x86_64-unknown-linux-gnu/msavi.o
OBJ.x86_64-unknown-linux-gnu/ndvi.o OBJ.x86_64-unknown-linux-gnu/pvi.o
OBJ.x86_64-unknown-linux-gnu/savi.o OBJ.x86_64-unknown-linux-gnu/sr.o
OBJ.x86_64-unknown-linux-gnu/wdvi.o -lgrass_gis -lgrass_datetime -lz
-lm -lz
OBJ.x86_64-unknown-linux-gnu/main.o: In function `main':
/usr/local/src/grass_trunk/imagery/i.vi/main.c:366: undefined reference to
`va_ri'
collect2: ld returned 1 exit status
make[1]: ***
[/usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/i.vi] Error 1
"

Commenting out imagery/i.vi/main.c lines 355 & 366 let make continue but I
don't know what is missing as a result.

-matt
--
View this message in context: http://www.nabble.com/undefined-reference-to-`va_ri'-tp20295173p20295173.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Matt,

it appears that Yann seems to not have submitted
vari.c
to SVN:

grep VARI *
main.c: * Added VARI on 20081014 (Yann)

I have added an empty stub to get code compiled, just update
from SVN.

Markus

On Mon, Nov 3, 2008 at 12:37 AM, matt wilkie <maphew@gmail.com> wrote:

Hi,

I'm attempting to compile current svn (r34142) following the guideline at
http://grass.osgeo.org/wiki/Compile_and_Install on Ubntu 8.10 amd64. At the
"make" stage I'm getting the error

"make[1]: Entering directory `/usr/local/src/grass_trunk/imagery/i.vi'
gcc -L/usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/lib
-Wl,--export-dynamic -L/usr/lib64
-Wl,-rpath-link,/usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/lib
-o /usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/i.vi
OBJ.x86_64-unknown-linux-gnu/arvi.o OBJ.x86_64-unknown-linux-gnu/dvi.o
OBJ.x86_64-unknown-linux-gnu/evi.o OBJ.x86_64-unknown-linux-gnu/gari.o
OBJ.x86_64-unknown-linux-gnu/gemi.o OBJ.x86_64-unknown-linux-gnu/gvi.o
OBJ.x86_64-unknown-linux-gnu/ipvi.o OBJ.x86_64-unknown-linux-gnu/main.o
OBJ.x86_64-unknown-linux-gnu/msavi2.o OBJ.x86_64-unknown-linux-gnu/msavi.o
OBJ.x86_64-unknown-linux-gnu/ndvi.o OBJ.x86_64-unknown-linux-gnu/pvi.o
OBJ.x86_64-unknown-linux-gnu/savi.o OBJ.x86_64-unknown-linux-gnu/sr.o
OBJ.x86_64-unknown-linux-gnu/wdvi.o -lgrass_gis -lgrass_datetime -lz
-lm -lz
OBJ.x86_64-unknown-linux-gnu/main.o: In function `main':
/usr/local/src/grass_trunk/imagery/i.vi/main.c:366: undefined reference to
`va_ri'
collect2: ld returned 1 exit status
make[1]: ***
[/usr/local/src/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/i.vi] Error 1
"

Commenting out imagery/i.vi/main.c lines 355 & 366 let make continue but I
don't know what is missing as a result.

-matt

matt wilkie wrote:

I'm attempting to compile current svn (r34142) following the guideline at
http://grass.osgeo.org/wiki/Compile_and_Install on Ubntu 8.10 amd64. At the
"make" stage I'm getting the error

  "make[1]: Entering directory `/usr/local/src/grass_trunk/imagery/i.vi'

OBJ.x86_64-unknown-linux-gnu/main.o: In function `main':
/usr/local/src/grass_trunk/imagery/i.vi/main.c:366: undefined reference to `va_ri'

Commenting out imagery/i.vi/main.c lines 355 & 366 let make continue but I
don't know what is missing as a result.

It appears that Yann made the changes to main.c but forgot to commit
the file which actually defines the function.

The feature in question is the "viname=vari" option (Visible
Atmospherically Resistant Index), which won't work until the relevant
file is committed.

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