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.
> > Full Name: Golla Rao > > Email Address: address@hidden > > Organization: NPOL > > Package Version: 3.6.2 > > Operating System: RHEL-3.0 > > Hardware: AMD-opteron 64-bit > > Description of problem: Hi, > > Already did that make distclean, and run the ./configure, make check, make install. I could install the package also with ifort and gfortran. > > But the problem is I am getting some error wile configuring which is reflecting while I run model code(which uses the netcdf). > > I am hereby attaching the config.log files of both ifort and gfortran. > > This is the error I am not able to solve: > > /shared/gfortran/gcc-4.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/libgfortranbegin.a(fmain.o)(.text+0xa): In function `main': > > /projects/tob/gcc-4_2-branch/libgfortran/fmain.c:18: undefined reference to `MAIN__' > > collect2: ld returned 1 exit status > > > > Please provide me the solution for this error. > > > > Thanks in advance. > > > > Wtih regards, > > G.NageswaraRao. > > > > > > Howdy! > > Let's try gfortran, it works a lot better than ifort, in my experience. > > I need you to also send me the output of the make check step. > > Thanks, > > Ed Howdy again! Sorry, I did not read your question carefully enough. If I understand you correctly, you have built and installed netcdf correctly, but you are having a hard time linking to it, and are getting this error: /projects/tob/gcc-4_2-branch/libgfortran/fmain.c:18: undefined reference to `MAIN__' I don't think this is a netcdf problem, though it also happens in the netCDF config.log file. I note that it happens when the fortran compiler is called without the -frepack-arrays option. Could this be significant? During the "make check" the f90 compiler is used to link to the netCDF library. Go to the nf_test directory and do: rm f90tst_vars make f90tst_vars ./f90tst_vars Please let me know if any of this helps. Thanks, Ed Ticket Details =================== Ticket ID: RVY-465828 Department: Support netCDF Priority: Normal Status: Closed