[GRASS-user] Re: [GRASS-dev] Compiling r.example in LINUX

António Rocha antonio.rocha at deimos.com.pt
Mon Jan 25 13:09:50 EST 2010


Ok
I have changed to
MODULE_TOPDIR = ../../..
to:
MODULE_TOPDIR = ../..

but since I'm defining MODULE_TOPDIR in my command this doesn't make any 
difference...
I'm using:
*sudo make -C Desktop/GRASS_dvp/r.example/ 
MODULE_TOPDIR=/usr/local/grass-6.4.0svn*

Still getting this error:
make: Entering directory `/home/anrr/Desktop/GRASS_dvp/r.example'
gcc 
-L/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/lib 
-Wl,--export-dynamic 
-Wl,-rpath-link,/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/lib    
-o 
/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/bin/r.example 
OBJ.i686-pc-linux-gnu/main.o  -lgrass_gis -lgrass_datetime -lz     
-lgrass_raster -lgrass_pngdriver -lgrass_driver -lgrass_gis 
-lgrass_datetime -lz     -lfreetype    -lgrass_gis -lgrass_datetime 
-lz     -lpng  -lz  -lm  -lgrass_psdriver -lgrass_driver -lgrass_gis 
-lgrass_datetime -lz     -lfreetype    -lgrass_gis -lgrass_datetime 
-lz      -lgrass_driver -lgrass_gis -lgrass_datetime -lz     
-lfreetype    -lgrass_gis -lgrass_datetime -lz      -lm  -lz
OBJ.i686-pc-linux-gnu/main.o: In function `main':
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:83: undefined reference to 
`G_add_keyword'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:84: undefined reference to 
`G_add_keyword'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:85: undefined reference to 
`G_add_keyword'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:103: undefined reference 
to `G_find_raster2'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:108: undefined reference 
to `Rast_map_type'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:111: undefined reference 
to `Rast_open_old'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:114: undefined reference 
to `Rast_get_cellhd'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:119: undefined reference 
to `Rast_allocate_buf'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:124: undefined reference 
to `Rast_allocate_buf'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:127: undefined reference 
to `Rast_open_new'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:138: undefined reference 
to `Rast_get_row'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:163: undefined reference 
to `Rast_put_row'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:171: undefined reference 
to `Rast_close'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:172: undefined reference 
to `Rast_close'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:175: undefined reference 
to `Rast_short_history'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:176: undefined reference 
to `Rast_command_history'
/home/anrr/Desktop/GRASS_dvp/r.example/main.c:177: undefined reference 
to `Rast_write_history'
collect2: ld returned 1 exit status
make: *** 
[/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/bin/r.example] 
Error 1
make: Leaving directory `/home/anrr/Desktop/GRASS_dvp/r.example

Jarek Jasiewicz wrote:
> António Rocha pisze:
>> Greetings
>>
>> I'm having a few difficulties in compiling modules (e.g. r.example).
>> *make -C r.example MODULE_TOPDIR=/usr/local/grass-6.4.0svn/*
>>
>> I got:
>> make: Entering directory `/home/anrr/Desktop/GRASS_dvp/r.example'
>> gcc 
>> -L/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/lib 
>> -Wl,--export-dynamic 
>> -Wl,-rpath-link,/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/lib    
>> -o 
>> /home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/bin/r.example 
>> OBJ.i686-pc-linux-gnu/main.o  -lgrass_gis -lgrass_datetime -lz     
>> -lgrass_raster -lgrass_pngdriver -lgrass_driver -lgrass_gis 
>> -lgrass_datetime -lz     -lfreetype    -lgrass_gis -lgrass_datetime 
>> -lz     -lpng  -lz  -lm  -lgrass_psdriver -lgrass_driver -lgrass_gis 
>> -lgrass_datetime -lz     -lfreetype    -lgrass_gis -lgrass_datetime 
>> -lz      -lgrass_driver -lgrass_gis -lgrass_datetime -lz     
>> -lfreetype    -lgrass_gis -lgrass_datetime -lz      -lm  -lz
>> OBJ.i686-pc-linux-gnu/main.o: In function `main':
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:83: undefined reference 
>> to `G_add_keyword'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:84: undefined reference 
>> to `G_add_keyword'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:85: undefined reference 
>> to `G_add_keyword'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:103: undefined 
>> reference to `G_find_raster2'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:108: undefined 
>> reference to `Rast_map_type'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:111: undefined 
>> reference to `Rast_open_old'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:114: undefined 
>> reference to `Rast_get_cellhd'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:119: undefined 
>> reference to `Rast_allocate_buf'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:124: undefined 
>> reference to `Rast_allocate_buf'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:127: undefined 
>> reference to `Rast_open_new'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:138: undefined 
>> reference to `Rast_get_row'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:163: undefined 
>> reference to `Rast_put_row'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:171: undefined 
>> reference to `Rast_close'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:172: undefined 
>> reference to `Rast_close'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:175: undefined 
>> reference to `Rast_short_history'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:176: undefined 
>> reference to `Rast_command_history'
>> /home/anrr/Desktop/GRASS_dvp/r.example/main.c:177: undefined 
>> reference to `Rast_write_history'
>> collect2: ld returned 1 exit status
>> make: *** 
>> [/home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2/dist.i686-pc-linux-gnu/bin/r.example] 
>> Error 1
>> make: Leaving directory `/home/anrr/Desktop/GRASS_dvp/r.example'
>>
>> It seems that it's not recognizing GRASS structures and functions.
>> Then I realized that my GRASS_HOME was pointing to:
>> GRASS_HOME          = 
>> /home/anrr/Downloads/grass-6.4.svn_src_snapshot_2010_01_16-2
>> This folder was from where I run /configure it's not where my /svn is 
>> (/usr/local/grass-6.4.0svn/).
>>
>> Question should I change GRASS_HOME to /usr/local/grass-6.4.0svn/ and 
>> and RUN_GISBASE
>> to /usr/local/grass-6.4.0svn//dist.i686-pc-linux-gnu ??
>> I know it's not suppose to change this files but, it's not running...
>>
>> Thanks for the (future) tips :)
>>
>> Best regards,
>> Antonio
>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus 
>> signature database 4804 (20100125) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
> change in Makefile:
>
> MODULE_TOPDIR = ../../..
> to:
> MODULE_TOPDIR = ../..
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 4805 (20100125) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




More information about the grass-user mailing list