[GRASS5] New MacOS X compilation errors

Andreas Lange Andreas.Lange at Rhein-Main.de
Wed Nov 22 17:46:56 EST 2000


Hi Jeshua,

how did you do the update? Via CVS?


Jeshua Lacock wrote:
> OK, I updated the source and ran gmake5.
> 
> And I got a bunch or errors like: SWITCHER.c:1396: illegal expression, found `>>'

That looks to me as if there have been conflicts during the CVS-merge
operation. You can tell that by looking at the first line of the CVS
output logging that starts with a "C" in that case. 

If you are confused by this and don't know what to do, please do the
following:
Remove all source files that you edited by hand, but don't delete the
CVS-directories.
E. g.:
cd src/display/decices/XDRIVER
find . -name *.c -exec rm -f {} \;

And after that do a "cvs update" from this directory to get all source
files again. 
If you know which are the offending files, only remove them. 

I would suggest that you do not edit the source files unless you really
know what you are doing there. 


> 
> So, I edited the SWITCHER.c file and deleted the lines that were  <<<<<<<<, =========. >>>>>>> and deleted the old malloc statements to get to the next step.
> 

That are the conflicting lines.

> Then, I ran gmake5 again to get these errors:
> 
> SWITCHER.c: In function `xalloc':
> SWITCHER.c:1369: conflicting types for `malloc'
> /System/Library/Frameworks/System.framework/Headers/bsd/stdlib.h:121: previous declaration of `malloc'
> SWITCHER.c:1369: warning: extern declaration of `malloc' doesn't match global one
> SWITCHER.c:1369: conflicting types for `realloc'
> /System/Library/Frameworks/System.framework/Headers/bsd/stdlib.h:125: previous declaration of `realloc'
> SWITCHER.c:1369: warning: extern declaration of `realloc' doesn't match global one
> make[1]: *** [OBJ.powerpc-apple-darwin1.2/SWITCHER.o] Error 1
> make: *** [all] Error 2
> 
> So then I edited SWITHCER.c again and deleted line 1369 (where mallox and realloc were re-defined).

This line is commented in my local copy of the CVS source. 
Maybe you deleted the line from the CVS update and left the old version. 

> 
> Then, I ran gmake5 again to get these errors:
> 
> Raster.c: In function `Raster_int':
> Raster.c:83: warning: assignment from incompatible pointer type
> Raster.c:85: warning: assignment from incompatible pointer type

That has nothing to do with the error.

> 
> /usr/bin/ld: Undefined symbols:
> __XErrorFunction
> __XIOErrorFunction
> __Xdebug
> make[1]: *** [/usr/local/grass-5.0b/driver/XDRIVER] Error 1
> make: *** [all] Error 2
> 
> At which point I get stumped! (Heeeeelp!)

Obviously the X Window libraries are missing/not found.
Did you run ./configure _before_ you installed the X Libraries?
Then simply re-run ./configure (with the same parameters than the first
time) and re-run make and make install from the top source directory.

Please mail again if you have problems. But don't expect me to answer
immediately.

cu,

Andreas

-- 
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange at Rhein-Main.de - A.C.Lange at GMX.net



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



More information about the grass-dev mailing list