ROMS on SunBlade 100 running Solaris 8

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
bberx
Posts: 9
Joined: Thu Oct 11, 2007 1:33 pm
Location: Marine Scotland - Science

ROMS on SunBlade 100 running Solaris 8

#1 Unread post by bberx »

Hi,

I'm trying to set up ROMS on a single SunBlade 100 which is still running Solaris 8 on SPARC, and am running into problems trying to install netcdf. I think I have narrowed it down to the fortran-compiler we are using, which is the SunSoft Version 1.0.1.0. F90 compiler which I think originally came with the machine.

My question is basically whether there is a minimum SunOS or compiler requirement to run ROMS. I noticed in the Compilers folder that with SunOS an F95 compiler seems assumed, is this the best combination? Also if there is an OS requirement of higher than Sol8 there is no point in me continuing to attempt solving my netcdf issues, so I would like to find out now rather than later. If anyone has had similar issues with netcdf, how did you solve them?

Thank you very much for any help.
Bee

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

"having trouble with NetCDF" can be due to a multitude of things. Exactly what errors do you get? Which version of NetCDF?

bberx
Posts: 9
Joined: Thu Oct 11, 2007 1:33 pm
Location: Marine Scotland - Science

#3 Unread post by bberx »

Hi, I'm trying to set up netcdf 3.6.2. The error I get is the following


if /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../fortran -g -O2 -MT fortlib.o -MD -MP -MF "$depbase.Tpo" -c -o fortlib.o fortlib.c; \
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
/bin/bash ../libtool --tag=F77 --mode=link f90 -I../libsrc -M../f90 -g -o nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o ../libsrc/libnetcdf.la
libtool: link: f90 -I../libsrc -M../f90 -g -o nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o ../libsrc/.libs/libnetcdf.a
ild: (undefined symbol) __moddi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(posixio.o)
ild: (undefined symbol) __divdi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(nc.o)
ild: (undefined symbol) __muldi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(nc.o)
ild: (undefined symbol) __muldi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(putget.o)
*** Error code 5
make: Fatal error: Command failed for target `nf_test'
Current working directory /usr/local/netcdf/netcdf-3.6.2/nf_test
*** Error code 1
make: Fatal error: Command failed for target `check-am'
Current working directory /usr/local/netcdf/netcdf-3.6.2/nf_test
*** Error code 1
make: Fatal error: Command failed for target `check-recursive'

At the moment, I'm trying to go through the config.log file to see if there is anything which is wrong in there, a first look at it on the screen hasn't brought me any revelation, so I'm going through it line by line now. I'm not really an expert in UNIX or the setting up of libraries and compilers, so I'm feeling slightly out of my depth. I've tried googling my errors but no obvious solutions come up. Any more pointers would be great, as I just don't seem to be getting anywhere.

Thank you very much.
Bee

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#4 Unread post by kate »

bberx wrote:ild: (undefined symbol) __moddi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(posixio.o)
ild: (undefined symbol) __divdi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(nc.o)
ild: (undefined symbol) __muldi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(nc.o)
ild: (undefined symbol) __muldi3 -- referenced in the text segment of ../libsrc/.libs/libnetcdf.a(putget.o)
Posixio, nc, and putget are C language routines which would have been compiled with a C compiler into nc.o and friends. You are linking them with a Fortran compiler (f90). Unfortunately, the C compiler is counting on you linking with a compler-specific library containing these routines and the Fortran compiler has no way to know it needs to link to it.

On our linux system I can go to /usr/lib/gcc/x86_64-redhat-linux/4.1.2 and perform:

Code: Select all

cygnus.arsc.edu 290% foreach foo (lib*)
foreach? nm $foo | grep mul
foreach? echo $foo done
foreach? end
to find such things as:

Code: Select all

0000000000000000 T __multi3
0000000000000030 T __mulvdi3
0000000000000000 T __mulvsi3
_mulvdi3.o:
0000000000000000 T __mulvti3
0000000000000000 T __mulsc3
_muldc3.o:
libgcc.a done
                 U __muldc3
                 U __mulxc3
libgfortran.a done
and so on. Those with a T are the definitions and are in libgcc.a while those with a U are in libgfortran.a, using the functions in libgcc. You need to somehow add -lgcc to your link statement, assuming muldi3 is in your copy of it, plus the path to that library, in my case -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2. Anyone here know how to tell libtool such things? Or just copy the link statement you show:

Code: Select all

f90 -I../libsrc -M../f90 -g -o nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o ../libsrc/.libs/libnetcdf.a
and experiment with adding stuff. Executing "gcc -v" will tell you which version of gcc you have.

Edit: easier might be to use the Sun C compiler instead.

Post Reply