[gdal-dev] gdal-grass on mac osx, build errors

William Kyngesburye woklist at kyngchaos.com
Mon May 11 13:15:18 EDT 2009


OK, try this.

This is the GDAL 1.6 GRASS source with the patches from trunk so that  
it works with GRASS 7.  It includes my makefile modified to build for  
GRASS 7.  But, you need to build GRASS 7 as a Mac application, though  
it could be modified to use a unix GRASS build.

It builds for my GDAL 1.6 framework, and uses my PROJ framework.

cd to this source folder and just type 'make'.  It builds the GRASS  
plugins into a 'distLEO' subfolder.  You can leave them there.

To override the builtin GRASS plugins in my framework, set the  
GDAL_DRIVER_PATH before running any commands (GDAL or GRASS) that use  
GDAL (fill in the path to your distLEO folder mentioned above):

export GDAL_DRIVER_PATH=/path/to/distLEO


-------------- next part --------------
A non-text attachment was scrubbed...
Name: grass7.zip
Type: application/zip
Size: 29460 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090511/c764ce1a/grass7-0001.zip
-------------- next part --------------


On May 11, 2009, at 9:35 AM, William Kyngesburye wrote:

> You should be able to build the GRASS plugin off my GDAL framework,  
> to avoid unnecessary duplication, and retain all the other formats  
> built into my framework.  Though there might be a version issue  
> between GDAL 1.7/GRASS plugin and my GDAL 1.6 framework.
>
> I'll look into and get back to you.  I have a makefile that I use  
> myself that I can adapt.
>
> On May 11, 2009, at 9:04 AM, massimo di stefano wrote:
>
>> hi i'm tring to have gdal-grass installed on osx using grass7+gdal  
>> svn,
>> i compiled gdal, then grass,
>>
>> then cd in the gdal source/frmts/grass
>>
>> run make dist to create the tar.gz package.
>>
>> i configured it using : ./configure --with-gdal=/usr/local/gdal/bin/ 
>> gdal-config --with-grass=/usr/local/grass-7.0.svn/
>>
>> but iget these error :
>>
>> cd /Users/Shared/source/gdal-grass-1.7.0
>> macbook-pro-15-di-sasha:gdal-grass-1.7.0 sasha$ ./configure --with- 
>> gdal=/usr/local/gdal/bin/gdal-config --with-grass=/usr/local/ 
>> grass-7.0.svn/
>> checking for gcc... gcc
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... yes
>> checking whether we are cross compiling... no
>> checking for suffix of executables...
>> checking for suffix of object files... o
>> checking whether we are using the GNU C compiler... yes
>> checking whether gcc accepts -g... yes
>> checking for gcc option to accept ANSI C... none needed
>> checking for g++... g++
>> checking whether we are using the GNU C++ compiler... yes
>> checking whether g++ accepts -g... yes
>> checking for ranlib... ranlib
>> Undefined symbols:
>> "_main", referenced from:
>>     start in crt1.10.5.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> checking for g++ -dynamiclib ... yes
>> user supplied gdal-config (/usr/local/gdal/bin/gdal-config)
>> using /usr/local/gdal//lib/gdalplugins as GDAL shared library  
>> autoload directory
>> checking for G_asprintf in -lgrass_gis... no
>> checking for G_putenv in -lgrass_gis... yes
>> configure: creating ./config.status
>> config.status: creating Makefile
>> macbook-pro-15-di-sasha:gdal-grass-1.7.0 sasha$ make
>> g++ -Wall -fPIC  -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/ 
>> grass-7.0.svn/\" -I/usr/local/gdal//include -I/usr/local/ 
>> grass-7.0.svn//include   -c -o grass57dataset.o grass57dataset.cpp
>> In file included from grass57dataset.cpp:45:
>> /usr/local/grass-7.0.svn//include/grass/gprojects.h:21:22: error:  
>> proj_api.h: No such file or directory
>> /usr/local/grass-7.0.svn//include/grass/gprojects.h:35: error:  
>> ?projPJ? does not name a type
>> make: *** [grass57dataset.o] Error 1
>>
>>
>>
>> need i to configure and build gdal giving the proj path ?
>>
>> i've proj installed as framework in : /Library/Frameworks/ 
>> PROJ.framework/
>>
>> i tried to work around the problem adding
>> in the gdal-grass makefile,
>> -L and -I path to where i've proj installed
>>
>> but don't fix the problem instead give me an other error
>>
>> macbook-pro-15-di-sasha:gdal-grass-1.7.0 sasha$ make
>> g++ -Wall -fPIC  -DUSE_CPL -DGRASS_GISBASE=\"/usr/local/ 
>> grass-7.0.svn/\" -I/usr/local/gdal//include -I/usr/local/ 
>> grass-7.0.svn//include   -c -o grass57dataset.o grass57dataset.cpp
>> g++ -dynamiclib grass57dataset.o -L/usr/local/grass-7.0.svn//lib - 
>> lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj - 
>> lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl - 
>> lgrass_dig2 -lgrass_rtree -lgrass_linkm -L/usr/local/gdal//lib - 
>> lgdal  -o gdal_GRASS.so
>> Undefined symbols:
>> "_I_get_group_ref", referenced from:
>>     GRASSDataset::Open(GDALOpenInfo*)       in grass57dataset.o
>> "_I_init_group_ref", referenced from:
>>     GRASSDataset::Open(GDALOpenInfo*)       in grass57dataset.o
>> "_I_free_group_ref", referenced from:
>>     GRASSDataset::Open(GDALOpenInfo*)       in grass57dataset.o
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make: *** [gdal_GRASS.so] Error 1
>>
>>
>>
>> ... restoring the original Makefile and installig proj from source  
>> in /usr/local
>> give me the exacltly same error ad i hadd adding -L and -I in the  
>> makefile
>>
>>
>>
>>
>>
>> have you any suggestion ?
>>
>> thaks!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Massimo Di Stefano
>> massimodisasha at yahoo.it
>>
>> epifanio on   irc.freenode.net  /join gfoss
>>
>>
>>
>>
>>
>>
>>
>> Chiacchiera con i tuoi amici in tempo reale!
>> http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "The beast is actively interested only in now, and, as it is always  
> now and always shall be, there is an eternity of time for the  
> accomplishment of objects."
>
> - the wisdom of Tarzan
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of  
the allied nations devoted an entire year exclusively to hating the  
____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war



More information about the gdal-dev mailing list