This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: James T Brown <address@hidden> >Organization: Michigan State University >Keywords: 200001242310.QAA18423 McIDAS-X gcc Solaris 2.5.1 Jim, >I am writing to ask if you might know of anyone who has >successfully compiled McIDAS 7.60 on a Solaris 2.5.1 >platform (sun Ultra 30). I have built McIDAS on Solaris 2.5.1 in the past, but not Version 7.60. I believe that there are more than one site out there right now that has built on 2.5.1, but I believe that they are using vendor compilers. >I do not have the latest Sun >compilers and have been trying to compile using gcc/f2c. OK. >I have been successful with this type of install on an >Ultra2 running Solaris 7, but I do need to compile for >a lab of workstations that are not as current. I understand. >Here is some compile info: > > gcc - version 2.95.1 > libf2c.a - version 20000118 It seems like this should work correctly. > Copy of ~mcidas/.cshrc: > > > setenv McINST_ROOT /home/mcidas > > if ( ! ${?MCPATH} ) then > > setenv MCDATA /home/mcidas/workdata > > setenv MCPATH ${MCDATA}:/home/mcidas/data:/home/mcidas/help > > setenv MCGUI /home/mcidas/bin > > setenv MCTABLE_READ > "${MCDATA}/MCTABLE.TXT;/home/mcidas/data/ADDESITE.TXT" > > setenv MCTABLE_WRITE "/home/mcidas/data/ADDESITE.TXT" > > setenv XCD_disp_file $MCDATA/DECOSTAT.DAT > > endif > > setenv PATH ${MCGUI}:$PATH > > setenv CC /usr/local/bin/gcc > > setenv CPPFLAGS -DNDEBUG > > setenv CFLAGS -O > > setenv FC /home/mcidas/mcidas7.6/src/mcfc > > setenv FFLAGS -O > > setenv LD_LIBRARY_PATH /usr/local/lib:${LD_LIBRARY_PATH} This all looks good. >The vendor flag is also blanked out in the "makefile". Good. >Using this setup and using the gcc/f2c options, it appears >that many routines do compile. Here is a sample of the >output that is displayed after running "make all": > > >... > > compile mctheta.c: done > > compile mctmpfil.c: done > > compile mcts.c: done > > compile mcvort.c: done > > compile mcwrite.c: done > > compile metfunc.c: done > > compile metplot.c: done > > compile metplot2.c: FAILED (See >'/home/mcidas/mcidas7.6/src/makelog' for details.) OK. >The makelog entry reports: > > > ./mccomp -O -I. -I../netcdf/libsrc -c metplot.c > > gcc -c -O -I. -I../netcdf/libsrc -I/usr/dt/include -I/usr/openwin/include > metplot.c > > compile metplot.c: done > > ./mccomp -O -I. -I../netcdf/libsrc -c metplot2.c > > gcc -c -O -I. -I../netcdf/libsrc -I/usr/dt/include -I/usr/openwin/include > metplot2.c > > metplot2.c: In function `pcoord2': > > metplot2.c:899: Internal compiler error in `final_scan_insn', at >final.c:2920 > > Please submit a full bug report. > > See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for >instructions. > > compile metplot2.c: FAILED This sounds like a gcc problem. Line 899 in metplot2.c is the end of the pcoord2 routine: } /* pcoord2 */ This looks inocuous enough. Will the routine compile if you change the line to: /* pcoord2 */ } >Again, all of this does compile on my Solaris 2.7 machine (although >that does have a slightly newer version of gcc - 2.95.2). Just >wondering if this a GNU GCC problem, or if this is something that >can be fixed with the proper setting of a compile flag. I would say that it is a gcc or 2.5.1 patch level problem. >At any rate, without the latest Sun compilers, I was hoping to compile >using gcc/f2c, but it appears that I have hit a wall. This should work. >I have looked for information >in the McIDAS support archives, but was unable to find anything relating >to builds on Solaris2.5.1. That is because people havn't run into any problems with. Then again, most use vendor compilers on Solaris SPARC. >I am wondering if I maybe am overlooking something I don't think so. >and would like to know if a successful compile on Solaris 2.5.1 machine >is possible using gcc/f2c Yes, it should be. >before I bang my head against this problem any longer. I understand and would take exactly the same approach. >Any tips or suggestions would be greatly appreciated. Please check to see if changing line 899 in metplot2.c allows you to proceed. I really think, however, that the problem is with the scanning routine that gcc is using. Tom Yoksas >From address@hidden Tue Jan 25 10:52:14 2000 re: try changing line 899 in routine that bombs >This change did not work. I decided to install an earlier version of GNU gcc. I switched to version 2.8.1 (down from 2.95.1). It seems to have solved the problem. Everything compiled and the initial McIDAS tests look good. I won't have everything setup for awhile yet, but at least it compiled. In summary, building for Solaris 2.5.1: GNU gcc 2.95.1: doesn't work GNU gcc 2.8.1: works fine At any rate, I think the main hurdle has been crossed. Thanks for your quick response last night. Will keep you posted should I encounter any other difficulties. Jim -- ========================================================== James T. Brown UNIX Systems Administrator Geography/Fisheries & Wildlife Michigan State University email: address@hidden