[GRASS-dev] Compilation errors in GRASS for Mac

Glynn Clements glynn at gclements.plus.com
Tue Jul 25 20:25:07 EDT 2006


Michael Barton wrote:

> D.PATH
> anthgradpc7:~/grass_dev/grass6/display cmbarton$ cd d.path
> anthgradpc7:~/grass_dev/grass6/display/d.path cmbarton$ make
> gcc -L/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/lib -L/usr/local/grasslib/lib  -L/usr/local/pgsql/lib -I/usr/local/grasslib/include     -DPACKAGE=\""grassmods"\" -o /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/bin/d.path OBJ.powerpc-apple-darwin8.7.0/main.o OBJ.powerpc-apple-darwin8.7.0/select.o -lgrass_display -lgrass_raster -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -L/usr/local/grasslib/lib -lgdal -lgrass_dgl -lgrass_dbmiclient -lgrass_dbmibase  -lgrass_gis -lgrass_datetime -lz   -lintl  -lz
> /usr/bin/ld: warning prebinding disabled because dependent library: /Applications/Grass/grass61cvs.app/Contents/Resources/grass-6.1.cvs/lib/libgrass_display.dylib is not prebound
> /usr/bin/ld: multiple definitions of symbol _trans
> /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_raster.dylib(com_io.o) definition of _trans
> /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/lib/libgrass_gis.dylib(icon.o) definition of _trans

[Is it possible to avoid line-wrapping the output from make?]

The one in libgis doesn't need to be exported:

	--- lib/gis/icon.c	9 Feb 2006 03:08:56 -0000	1.3
	+++ lib/gis/icon.c	26 Jul 2006 00:07:36 -0000
	@@ -2,7 +2,7 @@
	 #include <math.h>
	 #include <grass/gis.h>
	 
	-int trans ( double *x, double *y, int n_points, double angle, double scale, 
	+static int trans ( double *x, double *y, int n_points, double angle, double scale, 
	                      double xc, double yc ) {
	     int i;
	     double r, a;

The odd thing is that I can't see any reason why this issue wouldn't
affect every d.* command.

> GIS.M
> anthgradpc7:~/grass_dev/grass6/gui/tcltk cmbarton$ cd gis.m
> anthgradpc7:~/grass_dev/grass6/gui/tcltk/gis.m cmbarton$ make
> GISRC=/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/demolocation/.grassrc61 
> GISBASE=/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0
> PATH=/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/bin:$PATH 
> DYLD_LIBRARY_PATH="/Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/lib:" 
> /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/scripts/gis.m --html-description | grep -v '</body>\|</html>' > gis.m.tmp.html ; true
> mkdir -p /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/docs/html
> mv -f gis.m.tmp.html
> /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/docs/html/gis.m.html
> for file in  *.png *.jpg ; do \
>         head -n 1 $file | grep '^#!' > /dev/null ; \
>         if [ $? -ne 0 ] ; then \
>            /usr/bin/install -c  -m 644 $file
> /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/docs/html ; \
>         fi \
>         done 2> /dev/null ; true
> if [ ! -d /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/scripts ] ; then mkdir -p /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/scripts; fi
> /usr/bin/install -c  -m 755 gis.m /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/scripts
> if [ ! -d /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm ] ; then mkdir -p /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm; fi
> if [ ! -d /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm/script/ ] ; then mkdir -p /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm/script/ ; fi
> /usr/bin/install -c  -m 755 *.tcl /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm
> /usr/bin/install -c  -m 644 *.gif /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm
> /usr/bin/install -c  -m 755 script/*.* /Users/cmbarton/grass_dev/grass6/dist.powerpc-apple-darwin8.7.0/etc/gm/script
> install: script/CVS.sandboxinfo: Inappropriate file type or format

The only robust solution is to list the specific files rather than
using "*.*". You can't make any assumptions about what other files or
directories might get added by the OS or development tools (e.g. 
Windows' Explorer likes to put Desktop.ini files everywhere).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list