[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19991025: McIDAS-X build on Linux



>From: Ricky Irving <address@hidden>
>Organization: SATEPS
>Keywords: 199910251755.LAA07454 McIDAS-X Linux

Ricky,

>Received nyour e-mail,downloaded the necessary files and attempted to
>install.  I have attached the makelog file showing the error I encountered.
>I have checked my gcc libraries for their integrity (all appears well).
>Any ideas...

>##########################################
>Mon Oct 25 11:29:22 EDT 1999: BUILD BEGIN
>##########################################
>
>./mccomp -g -I. -I../netcdf/libsrc -c mcmkhelp.c
>gcc -c -g -I. -I../netcdf/libsrc mcmkhelp.c
>mcmkhelp.c: In function `main':
>mcmkhelp.c:175: `optarg' undeclared (first use in this function)
>mcmkhelp.c:175: (Each undeclared identifier is reported only once
>mcmkhelp.c:175: for each function it appears in.)
>mcmkhelp.c:214: `optind' undeclared (first use in this function)
>compile        mcmkhelp.c:             FAILED

 (listing included three more times in original message deleted for brevity)

The thing that jumps out at me in this listing is the lack of
gcc compiler directives that I have in my mccomp.sh file:

Linux)
    ccopts="-O -ansi -D_GNU_SOURCE -I/usr/X11R6/include"
    L_opts="$L_opts -L/usr/local/lib -L/usr/X11R6/lib"

    #-------
    # Note: changes for McIDAS-X 7.3 for build on RedHat 5.0:
    #
    #       added -D_GNU_SOURCE  - System V and BSD source flag for GNU C
    #       changed X11 to X11R6 - There is some dispute about whether or
    #                              not the Linux installation process makes
    #                              a link between /usr/X11R6 and /usr/X11
    #                              Debian apparently does not; some users'
    #                              report that RedHat does not as well

    #-------
    # Note: on RedHat 4.0 Linux, the curses library is libncurses.a, not
    # libcurses.a.  Change -lcurses to -lncurses in $l_opts.

    case $l_opts in
    *lcurses*)
        l_opts=`echo "$l_opts" | sed "s/lcurses/lncurses/"`
        ;;
    esac

    l_opts="$l_opts -lf2c -ldl"

    ;;
*)  echo "$argv0: ERROR: unknown platform '$uname_s'"
    exit
    ;;
esac

You will notice that I declare '-ansi -D_GNU_SOURCE' in ccopts.  Did
you not use the copy of mccomp.sh that I included in mclinux.tar.Z?  If
you had, I would have expected the compile line for mcmkhelp.c to look
like:

./mccomp -O -vendor -I. -I../netcdf/libsrc -c mcmkhelp.c
gcc -c -O -ansi -D_GNU_SOURCE -I/usr/X11R6/include -O -I. -I../netcdf/libsrc 
mcmkhelp.c
compile mcmkhelp.c:             done

Tom