[comp.mail.elm] frm compile error in elm make

david@wubios.wustl.edu (David J. Camp) (12/15/88)

I am trying to compile elm 2.1 on a Sun 3/260 running SunOS 4.0.
First I got errors when I tried to make because each make fiele had some
comment lines that did not have the '#' character on them.  After I
inserted the comments I was able to make okay, except for the following
error:

cd utils; make 'DEFINE=-DBSD' 'LIBS=-lcurses' all
/bin/cc -O -I../hdrs -DBSD from.c ../src/opt_utils.o \
../src/string2.o  expand.o -o ../bin/frm
ld: Undefined symbol 
   _opt_index 
   _get_options 
Everything is up to date!

I do not know how important the 'frm' program is, but my user community
is bound to miss it eventually.  Any help would be appreciated.
-David-
-- 
Bitnet:   david@wubios.wustl                ^      Mr. David J. Camp
Internet: david%wubios@wucs1.wustl.edu    < * >    Box 8067, Biostatistics
uucp:     uunet!wucs1!wubios!david          v      660 South Euclid
Washington University Medical School               Saint Louis, MO 63110

mike@quench.lbl.gov (Michael Helm) (12/15/88)

In article <276@wubios.wustl.edu> david@wubios.wustl.edu (David J. Camp) writes:
>I am trying to compile elm 2.1 on a Sun 3/260 running SunOS 4.0.
 ...
>ld: Undefined symbol 
>   _opt_index 
>   _get_options 

This is also a nit on SunOS 3.x's &c.  I had the benefit of also having a
development version of elm 2.2 on hand, so I cribbed from from.c version 2.2.
In this version, the authors are using the getopt package instead of
get_options & opt_index.  This routine is distributed in SunOS.

If you replace get_options &c w/ getopt, things go better.  Hope that's the
rite thing to do.  If you really feel you need get_options &c instead, they
are defined in elm2.1/src/getopt.c.

Michael Helm (Internet M_Helm@lbl.gov)

pae@cos.com (Paul A. Ebersman) (12/15/88)

From article <276@wubios.wustl.edu>, by david@wubios.wustl.edu (David J. Camp):
> cd utils; make 'DEFINE=-DBSD' 'LIBS=-lcurses' all
> /bin/cc -O -I../hdrs -DBSD from.c ../src/opt_utils.o \
> ../src/string2.o  expand.o -o ../bin/frm
> ld: Undefined symbol 
>    _opt_index 
>    _get_options 
> Everything is up to date!

This is due to a problem in the makefile. You also need ../src/getopt.o in
the compile command for from to include these functions. Correct line is
as follows:


../bin/frm: from.c ../src/opt_utils.o ../src/string2.o\
        expand.o
        ${CC} ${CFLAGS} ${DEFINE} from.c ../src/opt_utils.o \
        ../src/getopt.o ../src/string2.o  expand.o -o ../bin/frm

-- 
               Paul A. Ebersman @ Corporation for Open Systems
  pae@cos.COM or pae%cos.com@uunet.uu.net or {uunet, sundc, hadron}!cos!pae
     ( The difference between practice and theory in practice is always
      greater than the difference between practice and theory in theory. )

rusty@hocpa.UUCP (M.W.HADDOCK) (12/17/88)

In article <12183@cos.com> pae@cos.com (Paul A. Ebersman) writes:
   >From article <276@wubios.wustl.edu>, by david@wubios.wustl.edu (David J. Camp):
   >> cd utils; make 'DEFINE=-DBSD' 'LIBS=-lcurses' all
   >> /bin/cc -O -I../hdrs -DBSD from.c ../src/opt_utils.o \
   >> ../src/string2.o  expand.o -o ../bin/frm
   >> ld: Undefined symbol 
   >>    _opt_index 
   >>    _get_options 
   >> Everything is up to date!
   >This is due to a problem in the makefile. You also need ../src/getopt.o in
   >the compile command for from to include these functions. Correct line is

i.e. The Configure script ``really'' needs the fix.

  We
  still
  haven't
  installed
  a working
  `rn'
  yet!
-- 
Rusty Haddock		{uunet!likewise,att,arpa}!hocpa!rusty
AT&T Consumer Products Laboratories - Human Factors Laboratory
Holmdel, New Joyzey 07733   (201) 834-1023  rusty@hocpa.att.com
		I LOVE CATS -- DEAD ONES!

mack@inco.UUCP (Dave Mack) (12/20/88)

In article <472@hocpa.UUCP> rusty@hocpa.UUCP (91341-M.W.HADDOCK) writes:
>In article <12183@cos.com> pae@cos.com (Paul A. Ebersman) writes:
>   >From article <276@wubios.wustl.edu>, by david@wubios.wustl.edu (David J. Camp):
>   >> cd utils; make 'DEFINE=-DBSD' 'LIBS=-lcurses' all
>   >> /bin/cc -O -I../hdrs -DBSD from.c ../src/opt_utils.o \
>   >> ../src/string2.o  expand.o -o ../bin/frm
>   >> ld: Undefined symbol 
>   >>    _opt_index 
>   >>    _get_options 
>   >> Everything is up to date!
>   >This is due to a problem in the makefile. You also need ../src/getopt.o in
>   >the compile command for from to include these functions. Correct line is
>
>i.e. The Configure script ``really'' needs the fix.

Correct. Here's a Sun-specific patch to the Configure file. If you have
the same problem on some other system, make the analogous changes:

*** Configure~	Sat Dec 17 16:01:59 1988
--- Configure	Mon Dec 19 11:09:40 1988
***************
*** 148,154 ****
      vaxen)	NAME="BSD"; OS_FLAG="BSD";  	;;
      bsd)	NAME="BSD"; OS_FLAG="BSD";  	;;
      uts)	NAME="UTS"; OS_FLAG="UTS";  	;;
!     sun)	NAME="Sun"; OS_FLAG="BSD";		;;
      pyramid|osx*)NAME="Pyramid BSD"; OS_FLAG="PYRAMID";	;;
      amdahl)	NAME="UTS"; OS_FLAG="UTS";  	;;
      sv_*)	NAME="System V"; OS_FLAG="";		;;
--- 148,154 ----
      vaxen)	NAME="BSD"; OS_FLAG="BSD";  	;;
      bsd)	NAME="BSD"; OS_FLAG="BSD";  	;;
      uts)	NAME="UTS"; OS_FLAG="UTS";  	;;
!     sun)	NAME="Sun"; OS_FLAG="BSD"; sun=1;		;;
      pyramid|osx*)NAME="Pyramid BSD"; OS_FLAG="PYRAMID";	;;
      amdahl)	NAME="UTS"; OS_FLAG="UTS";  	;;
      sv_*)	NAME="System V"; OS_FLAG="";		;;
***************
*** 853,859 ****
  BSD)
      osdefine="-DBSD"
      lib2="-lcurses"
!     if [ "$sequent" != 1 ] ; then
  	getopt=""
      fi
      ;;
--- 853,859 ----
  BSD)
      osdefine="-DBSD"
      lib2="-lcurses"
!     if [ "$sequent" != 1 -a "$sun" != 1 ] ; then
  	getopt=""
      fi
      ;;

--
Dave Mack