Compilation report GRASS4.1 on Linux

Hello GRASS-world,

  following a quick and dirty compilation report of GRASS4.1 on
  Linux.

  (At first I want to apologize for my bad english)

OS: Linux SLS 1.02
Kernel: 99pl9
GRASS Version: GRASS 4.1
Hardware: Motherboard ASUS 486DX2 66
      8 Mb RAM (not enough)
      Micropolis 1598 1,2Gb
      521 Mb ext2fs partition

Compiler: gcc 2.3.3
Libs: libc 4.3.3
Lex: gnu flex 2.3
Motif: Metrolink 1.2.2

The compilation failed on stage:

27.05.93 compilation of GRASS4.1

src/raster/r.binfer failed to link: symbol _yylineno undefined
      usage in main.c, 2 occurences commented out
      use of _yylineno not POSIX conform!

src/raster/r.combine problems to compile gis_lxcl.c
      generated thru lex from gis_lxcl.l

      this is a problem due to the differen-
      ces of the gnu lex/flex and the
      lex used by GRASS developers. The
      gnu lex/flex has an implementation
      of yywrap, so if you want the implementation
      in GRASS you have to add #undef yywrap at the
      beginning of gis_lxcl.l (between %{ .. })

      A second error is based on the
      implementation of yyinput. I
      changed yyinput to input and it works, but not tested!

src/raster/r.mapcalc/r.polish conflict between definition of
      malloc in pol.y and Linux.
      Definition in pol.y deleted, got
      a lot of warnings, so I have to test!

src/raster/r.wheight/inter you have to add #undef yywrap at the
      beginning of gis_lxcl.l (between %{ .. })

src.alpha/imagery/i.ortho.photo/photo.2image zoom_box.c -> gis.faq step 11

src.alpha/imagery/i.ortho.photo/photo.2target zoom_box.c -> gis.faq

src.alpha/mapdev/v.cutter/table.c commented out all the text after line 513 until
        #undef

Compiling XGRASS with Metrolinks Motif:
The behaviour of XGRASS is realy curious! I compiled the same code on IRIS
Indigos. It's running almost without problems (only coredumps sometimes from
xdigit).

  compiler options used -O2 -m486 - D_NO_PROTO

src/xgrass/libes/bwimage.c line 93 - to few arguments to function 'exit'
          was 'exit()' changed to 'exit(0)'

src/include/MatrixP.h #include <Xm/ManagerP.h> added

src/include/ClipP.h #include <Xm/PrimitiveP.h>

src/include/CaptionP.h #include <Xm/ManagerP.h> added

src/xgrass/libes/Xgi/Interact.c #include <Xm/PrimitiveP.h> added
                          body of XgInteractorActivate commented out, no solution!!

src/xgrass/libes/Xgi/Help.c macro MAX defined

src/xgrass/libes/Xgi/Matrix.c macro MIN defined

src/xgrass/menu/xc.error.c all accurences of zzlineno commented out or
                          zzlineno erased
src/xgrass/menu/xc.modify.c all accurences of zzlineno commented out or
                          zzlineno erased

src/xgrass/display/grammar.y third parameter in strtod deleted

src/xgrass/gridgadg.c brutally commented out the external declaration of atof

src/xgrass/display/main.c all occurences of yylineno commented out

src/xgrass/pixmap/PixEdit.c Zeile 1809 XtAddCallBack changed to XtAddCallBacks
                            Is this ok? It seems, as I have to learn to
          work with Motif!

src/xgrass/pixmap/Pixmap.h Prototype PwPutImage: Xdisplay -> Display
                            missing ","'s

src/xgrass/pixmap/Pixmap.c Line 531 diffrences between prototype and function
                      PWPutImage

src/xgrass/xdigit/map_ask.c lines 79 und 80 too few arguments to function `strncmp'
                            strncmp changed into strcmp

the modules xgrass4.1 and xdigit are still not running.

  xgrass4.1 has problems reading xgrass-menu.

  xdigit crashes with an X-error. I debugged, very curious behavior in
  xcolor.c and xpanel.c. Why this problems? The same code is running
  on IRIS INDIGO's!

Compiling XDRIVER

XDRIVER - SWITCHER.C: there are two kind of prototypes in the Linux libraries:

          BSD conform: setpgrp(par1, par2)
        you have to define #undef __linux__ at the
        beginning of SWITCHER.C

          the better solution is to delete all parameters and
        use setpgrp() !!!!!!

Here a summary from Grass4.1beta. I have not compiled this Grass4.1 programs until
today!

src.contrib/PURDUE compiled completely
src.contrib/CAST compiled completely

src.contrib/CERL/imagery/i.rvi.prediction failed
src.contrib/CERL/imagery/i.shape ok
src.contrib/CERL/misc/m.eigensystem PROCEDURE EXIT( .. ) missed
                        convert main.f via f2c into main.c
                                edit main.f and change all exit calls
                                into exit(0) or exit(1)
src.contrib/CERL/misc/m.regression compiled completely
src.contrib/CERL/raster/r.linear.regression compiled completely, but you have to
                                copy the programm to $GIS/bin manually

src.contrib/CERL/raster/r.ndvi.model compiled completely, but you have to
                                copy the programm to $GIS/bin manually

src.contrib/CERL/raster/r.rational.regression compiled completely, but you have to
                                copy the programm to $GIS/bin manually

src.contrib/CERL/raster/r.rvi failed to compile
src.contrib/CERL/raster/r.traj failed to compile, wrong path in Gmakefile

src.contrib/CERL/libes/projsupp compiled

src.contrib/CORPS/FLOOD compiled ok, but you have to
                                copy the programm to $GIS/bin manually. Use dire
ctory tutor!

src.contrib/COPRS/FLOOD/r.out.sites compiled ok

src.contrib/EPA/grass.ipw where is libipw.a ?

src.contrib/NMSU/WRAT
                     /ga remove ';' at end of include statement of ga.c

                     /wrat remove ';' at end of include statement of ta.c, runoff.c, cn.c
                            cs.c, da.c, ideal.c, intro.c, qp.c, qual.c, rout.c, upall.c

Compilation of RIM:

  I have RIM compiled, it needed a little bit hacking, but it works. If
  someone wants a report, please mail, but you have to wait a week or two,
  if I will not forget to mail!

So long at a lot of fun!

------------------------------------------------------------------------
Dipl. Geol. Andreas Holz email: asholz@cip.informatik.uni-erlangen.de
Institut fuer Geologie und Mineralogie
Schlossgarten 5
W-8520 Erlangen
GERMANY