[GRASS-dev] build fails on mac osx
William Kyngesburye
woklist at kyngchaos.com
Sat Jan 17 11:21:14 EST 2009
I don't know about the tcltk errors, but for the rest...
On Jan 17, 2009, at 6:20 AM, massimo di stefano wrote:
> Hi All
>
> tring to build on osx on a fresh svn checkout :
>
> export CXXFLAGS="-arch ppc -arch i386"
> export CFLAGS="-arch ppc -arch i386"
Note: when setting CFLAGS and CXXFLAGS, it overrides the default
optimization in configure, so you should add optimization to these. I
suggest -Os for OSX, or that default which is -O2.
see below for missing LDFLAGS note...
> then :
>
> open -a textmate include/make/platform.make
> BEFORE RUNNNING MAKE i changed the TCLTKLIBS line to: -framework Tcl
> -framework Tk
> and i removed render.c
>
render.c should compile now, though nviz_cmd won't work. No need to
delete render.c.
> macbook-pro-15-di-sasha:form sasha$ cd /opt/gis/grass6_devel/lib/
> vector/diglib
> macbook-pro-15-di-sasha:diglib sasha$ make
> make OBJ.i386-apple-darwin9.6.0/test
> echo "==============TEST============="
> ==============TEST=============
> gcc -L/opt/gis/grass6_devel/dist.i386-apple-darwin9.6.0/lib -L/usr/
> local/pgsql/lib/ -arch ppc -arch i386 -I/Library/Frameworks/
> GDAL.framework/Versions/1.6/Headers -I/opt/gis/grass6_devel/
> dist.i386-apple-darwin9.6.0/include -o OBJ.i386-apple-darwin9.6.0/
> test test.c -lgrass_dig2 -lgrass_gis -lgrass_datetime -lz -
> lgrass_rtree -lgrass_rtree \
> -lgrass_gis -lgrass_datetime -lz -lgrass_datetime -lz
> ld warning: in /opt/gis/grass6_devel/dist.i386-apple-darwin9.6.0/lib/
> libgrass_dig2.dylib, file is not of required architecture
> ld warning: in /opt/gis/grass6_devel/dist.i386-apple-darwin9.6.0/lib/
> libgrass_gis.dylib, file is not of required architecture
> ld warning: in /opt/gis/grass6_devel/dist.i386-apple-darwin9.6.0/lib/
> libgrass_datetime.dylib, file is not of required architecture
> ld warning: in /opt/gis/grass6_devel/dist.i386-apple-darwin9.6.0/lib/
> libgrass_rtree.dylib, file is not of required architecture
When compiling as a universal binary (ppc + i386) you must also set
LDFLAGS. The libraries need that for linking. Only source compile
and program linking use C/CXX-FLAGS.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Theory of the Universe
There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.
-Hitchhiker's Guide to the Galaxy 2nd season intro
More information about the grass-dev
mailing list