[GRASS-user] g.extension lipo problem

Hi,
I am running os x snow leopard (10.6.7). I have tried to install an extension in GRASS 6.4.1 (2011), but it throws a compilation error. I have searched the lists, with no luck, could anyone help me with this problem.
Thanks
Jason

g.extension extension=i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Checked out revision 46186.
Compiling <i.landsat.toar>...
test -d OBJ.i386-apple-darwin10.7.0 || mkdir -p OBJ.i386-apple-darwin10.7.0
gcc -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -Os -fexceptions -arch i386 -arch x86_64 -DPACKAGE=\""grassmods"\" -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -o OBJ.i386-apple-darwin10.7.0/earth_sun.o -c earth_sun.c
gcc -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -Os -fexceptions -arch i386 -arch x86_64 -DPACKAGE=\""grassmods"\" -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -o OBJ.i386-apple-darwin10.7.0/landsat.o -c landsat.c
landsat.c:4:23: error: grass/gis.h: No such file or directory
landsat.c:4:23: error: grass/gis.h: No such file or directory
lipo: can't figure out the architecture type of: /Users/jasonlessels/git/muttama/gis/muttama/muttama/.tmp/macintosh-3.localdomain/29713.0/ccdiXykN.out
make: *** [OBJ.i386-apple-darwin10.7.0/landsat.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

Known issue - g.extension doesn't work on a Mac (or other systems?) without the original compiled source.

I have a "modbuild" in /Library/GRASS/6.4, see the readme there for details. One aditional thing to do before using it is copy all the static *.a libraries from the GRASS application (/Applications/GRASS-6.4.app/Contents/MacOS/lib) to the modbuild/Modules/lib folder. Note that modbuild does not install the module, just compiles it, you must do that manually.

You will also need to download the addon source manually. This should do it (do it in the modbuild/module) folder):

svn co https://svn.osgeo.org/grass/grass-addons/\[moduleclass\]/\[module\] [module]

where [moduleclass] is the named type of module (from the first dotted part of the module name, ie "imagery" for "i", and [module] is the full module name, ie "i.landsat.toar".

On May 4, 2011, at 1:11 PM, Jason Lessels wrote:

Hi,
I am running os x snow leopard (10.6.7). I have tried to install an extension in GRASS 6.4.1 (2011), but it throws a compilation error. I have searched the lists, with no luck, could anyone help me with this problem.
Thanks
Jason

g.extension extension=i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Checked out revision 46186.
Compiling <i.landsat.toar>...
test -d OBJ.i386-apple-darwin10.7.0 || mkdir -p OBJ.i386-apple-darwin10.7.0
gcc -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -Os -fexceptions -arch i386 -arch x86_64 -DPACKAGE=\""grassmods"\" -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -o OBJ.i386-apple-darwin10.7.0/earth_sun.o -c earth_sun.c
gcc -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -Os -fexceptions -arch i386 -arch x86_64 -DPACKAGE=\""grassmods"\" -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include -o OBJ.i386-apple-darwin10.7.0/landsat.o -c landsat.c
landsat.c:4:23: error: grass/gis.h: No such file or directory
landsat.c:4:23: error: grass/gis.h: No such file or directory
lipo: can't figure out the architecture type of: /Users/jasonlessels/git/muttama/gis/muttama/muttama/.tmp/macintosh-3.localdomain/29713.0/ccdiXykN.out
make: *** [OBJ.i386-apple-darwin10.7.0/landsat.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages._______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

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

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

On Thu, May 5, 2011 at 2:09 AM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

Known issue - g.extension doesn't work on a Mac (or other systems?) without the original compiled source.

There is positive feedback about the extension manager which has been integrated
into wxGUI. The person used it on Windows:

http://gis.stackexchange.com/questions/9259/win7-grass-7-i-landsat-toar/9276#9276

Please try it also on MacOSX (requires 6.4.svn).

Markus