[GRASS-dev] compile errors for GRASS 7 in Mac OS X

I just tried compiling GRASS 7 with OS X. Most went fine. I got a few errors

Error in...
/Users/cmbarton/grass_dev/grass7_src/lib/proj

Doesn't recognize the NAD2BIN environmental variable
Had to create symlink to /Library/Frameworks/PROJ.framework/Programs/nad2bin in /usr/local
Then it compiled OK

Error in...
/Users/cmbarton/grass_dev/grass7_src/raster/r.statistics3

cmb-MBP-2:grass7_src cmbarton$ cd ./raster/r.statistics3
cmb-MBP-2:r.statistics3 cmbarton$ make
gcc -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.6.0/include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.6.0/include -o OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c:43: error: ‘fmin’ redeclared as different kind of symbol
main.c:43: error: ‘fmax’ redeclared as different kind of symbol
make: *** [OBJ.i386-apple-darwin9.6.0/main.o] Error 1

A bug that needs fixing I guess

Error in...
/Users/cmbarton/grass_dev/grass7_src/macosx/app

cd to ./macosx and ran make. No errors. Something in the make files messed up?

Michael

On Dec 21, 2008, at 3:35 PM, Michael Barton wrote:

I just tried compiling GRASS 7 with OS X. Most went fine. I got a few errors

Error in...
/Users/cmbarton/grass_dev/grass7_src/lib/proj

Doesn't recognize the NAD2BIN environmental variable
Had to create symlink to /Library/Frameworks/PROJ.framework/Programs/nad2bin in /usr/local
Then it compiled OK

Or add /Library/Frameworks/PROJ.framework/Programs to your PATH. I guess that's why I haven't had a problem with it.

Ah, the lib/proj makefile was changed - include lib.make was moved to the top, when it should be after the NAD2BIN line in the makefile. So NAD2BIN = nad2bin now overrides platform.make's NAD2BIN, instead of the other way around.

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

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy

On Sun, 21 Dec 2008, William Kyngesburye wrote:

On Dec 21, 2008, at 3:35 PM, Michael Barton wrote:

I just tried compiling GRASS 7 with OS X. Most went fine. I got a few errors

Error in...
/Users/cmbarton/grass_dev/grass7_src/lib/proj

Doesn't recognize the NAD2BIN environmental variable
Had to create symlink to /Library/Frameworks/PROJ.framework/Programs/ nad2bin in /usr/local
Then it compiled OK

Or add /Library/Frameworks/PROJ.framework/Programs to your PATH. I guess that's why I haven't had a problem with it.

Ah, the lib/proj makefile was changed - include lib.make was moved to the top, when it should be after the NAD2BIN line in the makefile. So NAD2BIN = nad2bin now overrides platform.make's NAD2BIN, instead of the other way around.

That's very interesting. I wasn't aware that $(NAD2BIN) was set in
Platform.make - it wasn't there in 6.0 so seems to have been added some
time before 6.2. From a brief look at it I think the NAD2BIN line in
lib/proj/Makefile should have been removed at the time NAD2BIN was added
to Platform.make. So from what I can make out, it seems like you've
discovered an interesting long-standing bug. Deleting the NAD2BIN line in
lib/proj/Makefile seems like the obvious way to solve it - does that fix it?

Paul

On Dec 21, 2008, at 3:35 PM, Michael Barton wrote:

Error in...
/Users/cmbarton/grass_dev/grass7_src/macosx/app

cd to ./macosx and ran make. No errors. Something in the make files messed up?

I missed this. Did you look back in the terminal to see what the error was?

If it happens again, don't cd to macosx and make, but check the terminal scrollback first.

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

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

Michael Barton wrote:

I just tried compiling GRASS 7 with OS X. Most went fine. I got a few
errors

Error in...
/Users/cmbarton/grass_dev/grass7_src/lib/proj

Doesn't recognize the NAD2BIN environmental variable
Had to create symlink to /Library/Frameworks/PROJ.framework/Programs/
nad2bin in /usr/local
Then it compiled OK

Fixed in r34985.

cmb-MBP-2:grass7_src cmbarton$ cd ./raster/r.statistics3
cmb-MBP-2:r.statistics3 cmbarton$ make
gcc -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.6.0/
include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/
cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.6.0/include -o
OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c:43: error: �fmin� redeclared as different kind of symbol
main.c:43: error: �fmax� redeclared as different kind of symbol
make: *** [OBJ.i386-apple-darwin9.6.0/main.o] Error 1

A bug that needs fixing I guess

Fixed in r34984.

Error in...
/Users/cmbarton/grass_dev/grass7_src/macosx/app

cd to ./macosx and ran make. No errors. Something in the make files
messed up?

Maybe something is returning a non-zero exit code? If it performed its
intended task, it probably won't get run if you run make again.

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

Thanks. I'll try it again and let you know.

Michael

On Dec 21, 2008, at 7:23 PM, Glynn Clements wrote:

Michael Barton wrote:

I just tried compiling GRASS 7 with OS X. Most went fine. I got a few
errors

Error in...
/Users/cmbarton/grass_dev/grass7_src/lib/proj

Doesn't recognize the NAD2BIN environmental variable
Had to create symlink to /Library/Frameworks/PROJ.framework/Programs/
nad2bin in /usr/local
Then it compiled OK

Fixed in r34985.

cmb-MBP-2:grass7_src cmbarton$ cd ./raster/r.statistics3
cmb-MBP-2:r.statistics3 cmbarton$ make
gcc -I/Users/cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.6.0/
include -arch i386 -Os -DPACKAGE=\""grassmods"\" -I/Users/
cmbarton/grass_dev/grass7_src/dist.i386-apple-darwin9.6.0/include -o
OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c:43: error: �fmin� redeclared as different kind of symbol
main.c:43: error: �fmax� redeclared as different kind of symbol
make: *** [OBJ.i386-apple-darwin9.6.0/main.o] Error 1

A bug that needs fixing I guess

Fixed in r34984.

Error in...
/Users/cmbarton/grass_dev/grass7_src/macosx/app

cd to ./macosx and ran make. No errors. Something in the make files
messed up?

Maybe something is returning a non-zero exit code? If it performed its
intended task, it probably won't get run if you run make again.

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

William Kyngesburye wrote:

> /Users/cmbarton/grass_dev/grass7_src/macosx/app
>
> cd to ./macosx and ran make. No errors. Something in the make files
> messed up?

I missed this. Did you look back in the terminal to see what the
error was?

If it happens again, don't cd to macosx and make, but check the
terminal scrollback first.

Better still, redirect make output:

  make &> build.log

Otherwise, your terminal needs a very large scrollback buffer. For me,
build.log comes to ~11,000 actual lines, or ~30,000 after wrapping to
80 columns.

Although, the macosx directory has the advantage of being right at the
end of the build process.

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