[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20000827: Installation problems Solaris 5.7, gcc, g77
- Subject: 20000827: Installation problems Solaris 5.7, gcc, g77
- Date: Mon, 28 Aug 2000 09:38:08 -0600
Brian,
> To: address@hidden,
> To: address@hidden
> From: "Brian O'Gorman" <Brian.O'address@hidden>
> Subject: Installation problems Solaris 5.7 netcdf 3.4
> Organization: NOAA NMFS AFSC RACE Shellfish Assessment Kodiak, Alaska
> Keywords: 200008270050.e7R0oXN01100
The above message contained the following:
> I've had problems before and think it could be compiler options. Any
> help is appreciated.
>
> uname -a
> SunOS trichodon 5.7 Generic_106541-10 sun4u sparc SUNW,Ultra-1
>
> type gcc
> gcc is /export/trichodon2/compilers/bin/gcc
>
> type g77
> g77 is /export/trichodon2/compilers/bin/g77
>
> type g++
> g++ is /export/trichodon2/compilers/bin/g++
> --------------8D7C109CB7A6E7B049491AEA
> Content-Type: text/plain; charset=us-ascii;
> name="VERSION"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
> filename="VERSION"
>
> 3.4
>
> --------------8D7C109CB7A6E7B049491AEA
> Content-Type: application/x-sas-log;
> name="configure.log"
> Content-Transfer-Encoding: base64
> Content-Disposition: inline;
> filename="configure.log"
Due to limitations with our mail system, would you please send files as
included plain text rather than as attachments.
...
> Content-Type: application/x-sas-log;
> name="test.log"
> Content-Transfer-Encoding: base64
> Content-Disposition: inline;
> filename="test.log"
...
> Making `test' in directory /export/trichodon2/netcdf/netcdf-3.4/src/fortran
>
> + g77 -c -O ftest.F
> ftest.F: In subroutine `tncacpy':
> ftest.F:187: warning:
> call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
> 1
> ftest.F:196: (continued):
> call ncagt (outcdf, NCGLOBAL, attnam, shval, iret)
> 2
> Argument #4 of `ncagt' is one precision at (2) but is some other precision at
> (1) [info -f g77 M GLOBALS]
You should use the g77 option "-Wno-globals" to avoid getting messages
like this.
...
> Making `test' in directory /export/trichodon2/netcdf/netcdf-3.4/src/nf_test
>
> + g77 -c -O test_get.F
> + g77 -c -O test_put.F
> + g77 -c -O nf_error.F
> + g77 -c -O nf_test.F
> + g77 -c -O test_read.F
> + g77 -c -O test_write.F
> + g77 -c -O util.F
> gcc -c -O -DNDEBUG fortlib.c
> g77 -o nf_test -O test_get.o test_put.o nf_error.o nf_test.o
> test_read.o test_write.o util.o fortlib.o ../libsrc/libnetcdf.a -lm
> Undefined first referenced
> symbol in file
> nf_get_vars_double__ test_get.o
> nf_inq_varnatts__ test_read.o
> nf_get_vars_real__ test_get.o
...
Apparently, the g77 compiler is adding an extra underscore to external
names that contain an embedded underscore. This can be accomodated by
defining the "f2cFortran" macro when compiling C code.
Try the following:
1. Go to the top-level source directory.
2. Perform steps 3 through 5 near the end of the INSTALL file.
3. Ensure that the environment variable FFLAGS contains the string
"-Wno-globals" (without the quotation marks).
4. Ensure that the environment variable CFLAGS contains the string
"-Df2cFortran".
5. Perform steps 6 through 9 near the end of the INSTALL file.
Please let me know if this helps.
Regards,
Steve Emmerson <http://www.unidata.ucar.edu>