[GRASS5] New MacOS X compilation errors

Howdy folks,

On Tue, Nov 21, 2000 at 07:59:32PM +0000, Markus Neteler wrote:

Hi Jeshua and all,

I have updated all malloc -> G_malloc in
src/display/devices/XDRIVER

cvs up src/display/devices/XDRIVER
gmake5 src/display/devices/XDRIVER

Please tell me if it is o.k. now.

OK, I updated the source and ran gmake5.

And I got a bunch or errors like: SWITCHER.c:1396: illegal expression, found `>>'

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.

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).

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
cc -o /usr/local/grass-5.0b/driver/XDRIVER OBJ.powerpc-apple-darwin1.2/SWITCHER.o OBJ.powerpc-apple-darwin1.2/Box_abs.o OBJ.powerpc-apple-darwin1.2/Can_do.o OBJ.powerpc-apple-darwin1.2/Color.o OBJ.powerpc-apple-darwin1.2/Cont_abs.o OBJ.powerpc-apple-darwin1.2/Clr_table.o OBJ.powerpc-apple-darwin1.2/Draw_line.o OBJ.powerpc-apple-darwin1.2/Get_w_box.o OBJ.powerpc-apple-darwin1.2/Get_w_line.o OBJ.powerpc-apple-darwin1.2/Get_w_pnt.o OBJ.powerpc-apple-darwin1.2/Graph_Clse.o OBJ.powerpc-apple-darwin1.2/Graph_Set.o OBJ.powerpc-apple-darwin1.2/Panel.o OBJ.powerpc-apple-darwin1.2/Plylne_abs.o OBJ.powerpc-apple-darwin1.2/Polygn_abs.o OBJ.powerpc-apple-darwin1.2/Returns.o OBJ.powerpc-apple-darwin1.2/Serve_Xevent.o OBJ.powerpc-apple-darwin1.2/alloc.o OBJ.powerpc-apple-darwin1.2/command_pend.o OBJ.powerpc-apple-darwin1.2/Raster.o ./lib/LIB.powerpc-apple-darwin1.2/driverlib.a /usr/src/grass/grass/src/libes/LIB.powerpc-apple-darwin1.2/libD.a /usr/src/grass/grass/src/libes/LIB.powerpc-apple-darwin1.2/libgis.a -L/usr/X11R6/lib -lSM -lICE -lX11
/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!)

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'

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@Rhein-Main.de - A.C.Lange@GMX.net

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