[GRASSLIST:1105] Error compiling on Mac OS X

Hi list:

Thanks to Jeshua Lacock for suggesting "./configure -host powerpc-apple-bsd"
to solve my configure problem; it configured without a hitch.

My new problem is with make install: after compiling for quite some time, I
receive the following message:

mv cell_open_new.o OBJ.powerpc-apple-bsd/cell_open_new.o
cc -o /usr/local/grass-5.0b/etc/bin/main/cmd/r.direct
OBJ.powerpc-apple-bsd/direct.o OBJ.powerpc-apple-bsd/cell_open.o
OBJ.powerpc-apple-bsd/cell_open_new.o
/opt/grass/src/libes/LIB.powerpc-apple-bsd/libgis.a -lm
/usr/bin/ld: can't locate file for: -lm
make[3]: *** [/usr/local/grass-5.0b/etc/bin/main/cmd/r.direct] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 2
GISGEN failure at STEP: src.garden/answers/src.answers/raster/r.fill.dir

GISGEN: DONE - Sun Nov 12 11:00:08 CST 2000

DONE generating GRASS GIS binary code
GRASSSRC=`pwd`/src GMAKE=`pwd`/src/CMD/gmake5.0 MAKE=make /bin/sh
src/CMD/generic/MAKELINKS.sh
Creating link for Mlulc.read
ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory
Creating link for g.version
ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory
Creating link for m.examine.tape
ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory
Creating link for m.in.pl94.db3
ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory
Creating link for m.in.stf1.db3
ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory
Creating link for r.combine
ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory
make: *** [do-install] Error 1

I'm still trying to get cvs to fly on my machine, but I'm getting a
CVSROOT-related error, but I guess this is where I should start, unless
there's an obvious answer to be found in the above.

Thanks in advance for your help.

Andy Agena

On Sun, Nov 12, 2000 at 11:30:41AM -0600, andy agena wrote:

Hi list:

Thanks to Jeshua Lacock for suggesting "./configure -host powerpc-apple-bsd"
to solve my configure problem; it configured without a hitch.

My new problem is with make install: after compiling for quite some time, I
receive the following message:

mv cell_open_new.o OBJ.powerpc-apple-bsd/cell_open_new.o
cc -o /usr/local/grass-5.0b/etc/bin/main/cmd/r.direct
OBJ.powerpc-apple-bsd/direct.o OBJ.powerpc-apple-bsd/cell_open.o
OBJ.powerpc-apple-bsd/cell_open_new.o
/opt/grass/src/libes/LIB.powerpc-apple-bsd/libgis.a -lm
/usr/bin/ld: can't locate file for: -lm

Hi Andy,

-lm is the mathematical library. Maybe it is not used on MAC.
Edit
src/CMD/head/head
and change
MATHLIB = -lm
to
MATHLIB =

If you have the current CVS version of GRASS 5 the head filename is for you
src/CMD/head/head.powerpc-apple-bsd

Then it should compile.

This one:

make[o3]: *** [/usr/local/grass-5.0b/etc/bin/main/cmd/r.direct] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 2
GISGEN failure at STEP: src.garden/answers/src.answers/raster/r.fill.dir

r.fill.dir requires a fortran compiler (g77 or f77), otherwise it
won't compile.

ln: /usr/local/grass-5.0b/etc/front.end: No such file or directory

There must have been the -lm error here, too. Please recompile.
In GRASS 5 beta8 you will have to remove the file in
src/CMD/next_step/powerpc-apple-bsd

then run
make install
again.

I'm still trying to get cvs to fly on my machine, but I'm getting a
CVSROOT-related error, but I guess this is where I should start, unless
there's an obvious answer to be found in the above.

Which error? Perhaps I can help...

Cheers

Markus

PS: Jeshua managed to compile GRASS this morning on his Mac,. You will manage,
    too...

Hi list:

Thanks to Jeshua Lacock for suggesting "./configure -host powerpc-apple-bsd"
to solve my configure problem; it configured without a hitch.

Andy, I think a better configure line may be (for Grass 5, beta 8):

  ./configure -host powerpc-apple-nexstep3

(the CVS snapshot version recognizes OS X as powerpc-apple-darwin1.2)

Note that I have successfully compiled most of the source code for MacOS X and will make a compilation guide and binaries available soon. Right now I am trying to get the X-windows based GUI working, which I am confident I will get working.

In all just 27 modules failed to build, and I will soon send an email of detailed errors to the development team for analysis.

My new problem is with make install: after compiling for quite some time, I
receive the following message:

mv cell_open_new.o OBJ.powerpc-apple-bsd/cell_open_new.o
cc -o /usr/local/grass-5.0b/etc/bin/main/cmd/r.direct
OBJ.powerpc-apple-bsd/direct.o OBJ.powerpc-apple-bsd/cell_open.o
OBJ.powerpc-apple-bsd/cell_open_new.o
/opt/grass/src/libes/LIB.powerpc-apple-bsd/libgis.a -lm
/usr/bin/ld: can't locate file for: -lm
make[3]: *** [/usr/local/grass-5.0b/etc/bin/main/cmd/r.direct] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 2
GISGEN failure at STEP: src.garden/answers/src.answers/raster/r.fill.dir

As Markus stated, the Mac does not need the math library flag (-lm) in addition to removing the -lm switches from the src/CMD/head/head file, I also removed them from src/CMD/head/head.in, src/CMD/utils/setup, src/CMD/utils/setup.ig, src/CMD/utils/setup.xgrass.

Some of the files have the -lm switch up to three times - remove them all - or at least I did.

Cheers,
--
Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481