[GRASS5] Mac OS X errors

Greetings,

I just compiled beta 11 on Mac OS X and here are the errors from modules tat I could not figure out (most of these errors have been posted before with previous builds):

The following modules: d.colors, i.class, i.ortho.photo, i.points, i.points3, i.vpoints, get this error:
   /usr/bin/ld: Undefined symbols:
   _gtty
   _stty

src/mapdev/v.in.shape:
   shp2dig.c:25: header file 'malloc.h' not found

I got this module compiled before (beta 10) by using:
Copying /System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/malloc.h to src/include.

Now I get the errors:
malloc.h:257: undefined type, found `u_short'
malloc.h:258: undefined type, found `u_short'

The same thing goes for these modules:
v.mkgrid, v.out.shape, src.contrib/SDTS

src/mapdev/v.rmdup:
   rmdup.c:201: structure has no member named `_shortbuf'
   make[1]: *** [OBJ.powerpc-apple-darwin1.2/rmdup.o] Error 1
   make: *** [all] Error 2

src/raster/r.in.gdal:
   I can't get the gdal lib compiled.

src/raster/r.in.png & src/raster/r.out.png:
   pngfunc.h:12: header file 'pnm.h' not found
   pngfunc.h:29: undefined type, found `xel'
   r.in.png.c:197: undefined type, found `pixel'
   r.in.png.c:200: undefined type, found `pixel'
   r.in.png.c:207: undefined type, found `pixel'

I think it's because I couldn't get netpbm compiled.

src/raster/r.in.random and src/sites/s.kcv:
   /usr/bin/ld: Undefined symbols:
   _lrand48
   _srand48

src/sites/s.random:
   main.c: In function `main':
   main.c:128: `drand48' undeclared (first use in this function)
   main.c:128: (Each undeclared identifier is reported only once
   main.c:128: for each function it appears in.)
   make: *** [OBJ.powerpc-apple-darwin1.2/main.o] Error 1

src/raster/r.mapcalc:
   /usr/bin/ld: Undefined symbols:
   _drand48
   make[1]: *** [/usr/src/grass5/dist.powerpc-apple-darwin1.2/etc/bin/cmd/r.mapcalc] Error 1

Markus said:
You should have in head file:
XCFLAGS = -I/usr/X11R6/include

I do have that in the head file, and I still get the error:

src.contrib/GMSL/NVIZ2.2:
   /usr/bin/ld: Undefined symbols:
   _XKillClient
   _XSetCloseDownMode
   _XSetRGBColormaps
   _XAllocColorCells
   _XStoreColors
   make[1]: *** [nvwish] Error 1
   make: *** [nvwish] Error 2

src.garden/answers/src.answers/raster/r.fill.dir:
   Needs fortran??

/usr/src/grass5.0beta11pre1/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL
     mkdir OBJ.powerpc-apple-darwin1.2
     make -f OBJ.powerpc-apple-darwin1.2/make.rules

   cc -g -O2 -I/usr/src/grass5/src/libes/dspf -I/usr/src/grass5/src/libes/ogsf -I/usr/local/include/GL -I/usr/X11R6/include/GL -I/usr/X11R6/include -I/usr/src/grass5/src/include -c new_init_graphics.c -o OBJ.powerpc-apple-darwin1.2/new_init_graphics.o
   new_init_graphics.c:16: header file 'Xm/Xm.h' not found
   new_init_graphics.c:17: header file 'Xm/Form.h' not found
   new_init_graphics.c:19: header file 'GLwMDrawA.h' not found
   kns_defines.h:4: undefined type, found `GLXContext'
   kns_defines.h:5: undefined type, found `Window'
   kns_defines.h:6: undefined type, found `Widget'
   kns_globals.h:14: undefined type, found `XtAppContext'

Note that I had to issue a "make real-install" for it to install; "make install" seemed to do nothing.

Cheers,

Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Jeshua,

thanks for your comprehensive compile test.

On Fri, Jan 26, 2001 at 12:44:01AM -0800, Jeshua Lacock wrote:
[...]

src/mapdev/v.rmdup:
   rmdup.c:201: structure has no member named `_shortbuf'
   make[1]: *** [OBJ.powerpc-apple-darwin1.2/rmdup.o] Error 1
   make: *** [all] Error 2

I have updated this file, please
cvs update src/mapdev/v.rmdup

I changed the macro to:
defined(__APPLE__)

if it runs o.k., we can use it for several other errors as well.
So please try to compile the updated v.rmdup.

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi again, Jeshua,

On Fri, Jan 26, 2001 at 12:44:01AM -0800, Jeshua Lacock wrote:

Greetings,

I just compiled beta 11 on Mac OS X and here are the errors from modules tat I could not figure out (most of these errors have been posted before with previous builds):

The following modules: d.colors, i.class, i.ortho.photo, i.points, i.points3, i.vpoints, get this error:
   /usr/bin/ld: Undefined symbols:
   _gtty
   _stty

no idea...

src/mapdev/v.in.shape:
   shp2dig.c:25: header file 'malloc.h' not found

I got this module compiled before (beta 10) by using:
Copying /System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/malloc.h to src/include.

Now I get the errors:
malloc.h:257: undefined type, found `u_short'
malloc.h:258: undefined type, found `u_short'

The same thing goes for these modules:
v.mkgrid, v.out.shape, src.contrib/SDTS

mh, no idea as well.

src/mapdev/v.rmdup:
   rmdup.c:201: structure has no member named `_shortbuf'
   make[1]: *** [OBJ.powerpc-apple-darwin1.2/rmdup.o] Error 1
   make: *** [all] Error 2

Fixed.

src/raster/r.in.gdal:
   I can't get the gdal lib compiled.

src/raster/r.in.png & src/raster/r.out.png:
   pngfunc.h:12: header file 'pnm.h' not found
   pngfunc.h:29: undefined type, found `xel'
   r.in.png.c:197: undefined type, found `pixel'
   r.in.png.c:200: undefined type, found `pixel'
   r.in.png.c:207: undefined type, found `pixel'

I think it's because I couldn't get netpbm compiled.

Andreas, still the header files are not yet uploaded as I
have lost your tarball mail.

src/raster/r.in.random and src/sites/s.kcv:
   /usr/bin/ld: Undefined symbols:
   _lrand48
   _srand48

fixed both r.random and s.kcv with defined(__APPLE__)

src/sites/s.random:
   main.c: In function `main':
   main.c:128: `drand48' undeclared (first use in this function)
   main.c:128: (Each undeclared identifier is reported only once
   main.c:128: for each function it appears in.)
   make: *** [OBJ.powerpc-apple-darwin1.2/main.o] Error 1

fixed with defined(__APPLE__)

src/raster/r.mapcalc:
   /usr/bin/ld: Undefined symbols:
   _drand48
   make[1]: *** [/usr/src/grass5/dist.powerpc-apple-darwin1.2/etc/bin/cmd/r.mapcalc] Error 1

fixed with defined(__APPLE__)

fixed as well:
src.contrib/GMSL/g3d/src3d/raster/r3.mapcalc/mapcalc/xrand.c

> Markus said:
> You should have in head file:> XCFLAGS = -I/usr/X11R6/include

I do have that in the head file, and I still get the error:

src.contrib/GMSL/NVIZ2.2:
   /usr/bin/ld: Undefined symbols:
   _XKillClient
   _XSetCloseDownMode
   _XSetRGBColormaps
   _XAllocColorCells
   _XStoreColors
   make[1]: *** [nvwish] Error 1
   make: *** [nvwish] Error 2

sorry, no idea.

src.garden/answers/src.answers/raster/r.fill.dir:
   Needs fortran??

Yes, but port to C is on the way.

/usr/src/grass5.0beta11pre1/src.contrib/GMSL/g3d/src3d/raster/r3.showdspf.openGL
     mkdir OBJ.powerpc-apple-darwin1.2
     make -f OBJ.powerpc-apple-darwin1.2/make.rules

   cc -g -O2 -I/usr/src/grass5/src/libes/dspf -I/usr/src/grass5/src/libes/ogsf -I/usr/local/include/GL -I/usr/X11R6/include/GL -I/usr/X11R6/include -I/usr/src/grass5/src/include -c new_init_graphics.c -o OBJ.powerpc-apple-darwin1.2/new_init_graphics.o
   new_init_graphics.c:16: header file 'Xm/Xm.h' not found
   new_init_graphics.c:17: header file 'Xm/Form.h' not found
   new_init_graphics.c:19: header file 'GLwMDrawA.h' not found
   kns_defines.h:4: undefined type, found `GLXContext'
   kns_defines.h:5: undefined type, found `Window'
   kns_defines.h:6: undefined type, found `Widget'
   kns_globals.h:14: undefined type, found `XtAppContext'

You need "lesstif" to be installed (MOTIF clone, see REQUIREMENTS).

Note that I had to issue a "make real-install" for it to install; "make install" seemed to do nothing.

That's strange and not o.k. (hi Justin :slight_smile:

So far my comments,
you may update and try the fixed modules.

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Jeshua Lacock wrote:

Greetings,

I just compiled beta 11 on Mac OS X and here are the errors from modules tat I could not figure out (most of these errors have been posted before with previous builds):

[...]
src/mapdev/v.in.shape:
   shp2dig.c:25: header file 'malloc.h' not found

I got this module compiled before (beta 10) by using:
Copying /System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/malloc.h to src/include.

Now I get the errors:
malloc.h:257: undefined type, found `u_short'
malloc.h:258: undefined type, found `u_short'

The same thing goes for these modules:
v.mkgrid, v.out.shape, src.contrib/SDTS

Jeshua

I have changed the #includes to stdlib.h which is probably OK on Mac OS
X in v.in.shape, v.out.shape and v.mkgrid, and should #include malloc.h
on other systems. Hopefully they will compile OK now.

David

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Fri, Jan 26, 2001 at 01:52:50PM +0000, David D Gray wrote:

Jeshua Lacock wrote:
>
> Greetings,
>
> I just compiled beta 11 on Mac OS X and here are the errors from modules tat I could not figure out (most of these errors have been posted before with previous builds):
>
> [...]
> src/mapdev/v.in.shape:
> shp2dig.c:25: header file 'malloc.h' not found
>
> I got this module compiled before (beta 10) by using:
> Copying /System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/malloc.h to src/include.
>
> Now I get the errors:
> malloc.h:257: undefined type, found `u_short'
> malloc.h:258: undefined type, found `u_short'
>
> The same thing goes for these modules:
> v.mkgrid, v.out.shape, src.contrib/SDTS
>

Jeshua

I have changed the #includes to stdlib.h which is probably OK on Mac OS
X in v.in.shape, v.out.shape and v.mkgrid, and should #include malloc.h
on other systems. Hopefully they will compile OK now.

If this fix is o.k., here is a list of other modules which might have
the same problem (sorry, no time to fix it):

find . -name '*.[hc]' -exec grep -l malloc.h {} \;
./src/include/std_incs.h
./src/libes/vect32_64/shapelib-1.2.8/shapefil.h
./src/mapdev/v.in.shape/cleanup.c
./src/mapdev/v.in.shape/shapefil.h
./src/mapdev/v.out.shape/shapefil.h
./src/sites/s.in.shape/cmd/shapefil.h
./src/sites/s.in.dbf/shapefil.h
./src.contrib/CERL/raster/r.hydro.CASC2D/all.h
./src.contrib/CERL/sites/s.surf.krig/nrutil.c
./src.contrib/SDTS/mapdev/v.in.sdts/att_ff_info.c
./src.garden/grass.postgresql/pg.in.dbf/shapefil.h
./src.garden/grass.postgresql/v.in.arc.pg/shapefil.h
./src.garden/grass.postgresql/v.in.shape.pg/cleanup.c
./src.garden/grass.postgresql/v.in.shape.pg/shapefil.h
./src.garden/grass.postgresql/v.in.shape.pg/shp2dig.c

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Markus Neteler wrote:

On Fri, Jan 26, 2001 at 01:52:50PM +0000, David D Gray wrote:
> Jeshua Lacock wrote:
> >
> > Greetings,
> >
> > I just compiled beta 11 on Mac OS X and here are the errors from modules tat I could not figure out (most of these errors have been posted before with previous builds):
> >
> > [...]
> > src/mapdev/v.in.shape:
> > shp2dig.c:25: header file 'malloc.h' not found
> >
> > I got this module compiled before (beta 10) by using:
> > Copying /System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/malloc.h to src/include.
> >
> > Now I get the errors:
> > malloc.h:257: undefined type, found `u_short'
> > malloc.h:258: undefined type, found `u_short'
> >
> > The same thing goes for these modules:
> > v.mkgrid, v.out.shape, src.contrib/SDTS
> >
>
> Jeshua
>
> I have changed the #includes to stdlib.h which is probably OK on Mac OS
> X in v.in.shape, v.out.shape and v.mkgrid, and should #include malloc.h
> on other systems. Hopefully they will compile OK now.

If this fix is o.k., here is a list of other modules which might have
the same problem (sorry, no time to fix it):

find . -name '*.[hc]' -exec grep -l malloc.h {} \;
./src/include/std_incs.h
./src/libes/vect32_64/shapelib-1.2.8/shapefil.h
./src/mapdev/v.in.shape/cleanup.c
./src/mapdev/v.in.shape/shapefil.h
./src/mapdev/v.out.shape/shapefil.h
./src/sites/s.in.shape/cmd/shapefil.h
./src/sites/s.in.dbf/shapefil.h
./src.contrib/CERL/raster/r.hydro.CASC2D/all.h
./src.contrib/CERL/sites/s.surf.krig/nrutil.c
./src.contrib/SDTS/mapdev/v.in.sdts/att_ff_info.c
./src.garden/grass.postgresql/pg.in.dbf/shapefil.h
./src.garden/grass.postgresql/v.in.arc.pg/shapefil.h
./src.garden/grass.postgresql/v.in.shape.pg/cleanup.c
./src.garden/grass.postgresql/v.in.shape.pg/shapefil.h
./src.garden/grass.postgresql/v.in.shape.pg/shp2dig.c

Markus

OK. I will look at those this evening. I think there is never any
problem with changing to stdlib.h because either it is necessary or it
#includes malloc.h anyway.

David

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Jeshua

Jeshua Lacock wrote:

Note that I had to issue a "make real-install" for it to install;
"make install" seemed to do nothing.

Very strange - especially since "make" seems to work for you. Was there
any output when you tried "make install"? Or did it just seem to hang?
What happens if you remove the "@" sign before the if statement below
(the one above the ^ symbol)?

install:
   @ # The following action MUST be a single action. That is, all lines
   @ # except the last line must have a backslash (\) at the end to
   @ # continue the statement. The reason for this is that Make does not
   @ # have an exit command thus, exit terminates the shell. However,
   @ # Make creates a new shell for each action listed for a target.
   @ # Therefore, the only way exit will quit Make is if there is only
   @ # a single action for the target.
   @ # Check if grass has been compiled, if INST_DIR is writable, and if
   @ # grass is part of INST_DIR
   @ if [ ! -f ${GRASS_BIN}/grass${NAME_VER} ] ; then \
   ^ echo "ERROR: Grass has not been compiled. Try \"make\" first."; \
       echo " Installation aborted, exiting Make."; \

Is anything printed out if you try "make install" now? Finally if you
still don't see anything, then please send me your copy of your Makefile
(not Makefile.in).

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'