[GRASS-user] How to compile r.example

Luisa Peña luisapena1979 at gmail.com
Mon Feb 6 10:23:01 EST 2012


Hi
Insider r.example I tried this :
make MODULE_TOPDIR=/home/opt/grass642RC2/grass-6.4.2RC2


and:

/home/opt/grass642RC2/grass-6.4.2RC2/include/Make/Module.make:25: warning:
overriding commands for target `install'

/home/opt/grass642RC2/grass-6.4.2RC2/include/Make/Rules.make:90: warning:
ignoring old commands for target `install'

gcc -L/opt/grass642RC2/grass-6.4.2RC2/lib -Wl,--export-dynamic
-Wl,-rpath-link,/opt/grass642RC2/grass-6.4.2RC2/lib -o
/opt/grass642RC2/grass-6.4.2RC2/bin/r.example
OBJ.x86_64-unknown-linux-gnu/main.o -lgrass_gis.6.4.2RC2
-lgrass_datetime.6.4.2RC2 -lz -lgrass_raster.6.4.2RC2
-lgrass_pngdriver.6.4.2RC2 -lgrass_driver.6.4.2RC2 -lgrass_gis.6.4.2RC2
-lgrass_datetime.6.4.2RC2 -lz -lfreetype -lgrass_gis.6.4.2RC2
-lgrass_datetime.6.4.2RC2 -lz -lpng -lz -lm -lgrass_psdriver.6.4.2RC2
-lgrass_driver.6.4.2RC2 -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz
-lfreetype -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz
-lgrass_driver.6.4.2RC2 -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz
-lfreetype -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lm -lz

OBJ.x86_64-unknown-linux-gnu/main.o: In function `main':

/home/EOAPPKA/r.example/main.c:83: undefined reference to `G_add_keyword'

/home/EOAPPKA/r.example/main.c:84: undefined reference to `G_add_keyword'

/home/EOAPPKA/r.example/main.c:85: undefined reference to `G_add_keyword'

/home/EOAPPKA/r.example/main.c:103: undefined reference to `G_find_raster2'

/home/EOAPPKA/r.example/main.c:108: undefined reference to `Rast_map_type'

/home/EOAPPKA/r.example/main.c:111: undefined reference to `Rast_open_old'

/home/EOAPPKA/r.example/main.c:114: undefined reference to `Rast_get_cellhd'

/home/EOAPPKA/r.example/main.c:119: undefined reference to
`Rast_allocate_buf'

/home/EOAPPKA/r.example/main.c:122: undefined reference to
`Rast_window_rows'

/home/EOAPPKA/r.example/main.c:123: undefined reference to
`Rast_window_cols'

/home/EOAPPKA/r.example/main.c:124: undefined reference to
`Rast_allocate_buf'

/home/EOAPPKA/r.example/main.c:127: undefined reference to `Rast_open_new'

/home/EOAPPKA/r.example/main.c:138: undefined reference to `Rast_get_row'

/home/EOAPPKA/r.example/main.c:163: undefined reference to `Rast_put_row'

/home/EOAPPKA/r.example/main.c:171: undefined reference to `Rast_close'

/home/EOAPPKA/r.example/main.c:172: undefined reference to `Rast_close'

/home/EOAPPKA/r.example/main.c:175: undefined reference to
`Rast_short_history'

/home/EOAPPKA/r.example/main.c:176: undefined reference to
`Rast_command_history'

/home/EOAPPKA/r.example/main.c:177: undefined reference to
`Rast_write_history'

collect2: ld returned 1 exit status

make: *** [/opt/grass642RC2/grass-6.4.2RC2/bin/r.example] Error 1
What might be missing here?
Thanks
Best regards,
Luisa

2012/2/6 Markus Neteler <neteler at osgeo.org>

> On Mon, Feb 6, 2012 at 10:25 AM, Luisa Peña <luisapena1979 at gmail.com>
> wrote:
> > Hi Markus
> > Already done that. I have compiled and installed from source code. So my
> > problem is to add and compile functions such as r.example.
> > What do I have to do?
> > Thanks
> > Luisa
>
> Now I see that you apparently copied it into your HOME directory.
>
> Hence, compile it with
>
> make MODULE_TOPDIR=/path/to/grass64
>
> to tell the compiler where the main compiled GRASS code is.
>
> Markus
>
>
>
> > 2012/2/3 Markus Neteler <neteler at osgeo.org>
> >>
> >> On Fri, Feb 3, 2012 at 4:36 PM, Luisa Peña <luisapena1979 at gmail.com>
> >> wrote:
> >> > Greetings
> >> > I'm running GRASS6.4.2 in a Linux machine and when I try to compile
> >> > r.example I get this:
> >> >
> >> > lp at earth1:~/r.example$ make
> >> > Makefile:10: ../../../include/Make/Module.make: No such file or
> >> > directory
> >> > make: *** No rule to make target `../../../include/Make/Module.make'.
> >> > Stop.
> >>
> >> You need to run "configure" first in the main source code directory.
> >>
> >> See for details for example
> >>
> >>
> http://grass.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure
> >>
> >> Markus
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20120206/4cf675b7/attachment.html


More information about the grass-user mailing list