Undefined reference - build.bash

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
matias.dinapoli
Posts: 18
Joined: Tue Jun 23, 2015 5:42 pm
Location: CIMA, ARG
Contact:

Undefined reference - build.bash

#1 Unread post by matias.dinapoli »

Hello, i'm trying to compile ROMS through build.bash. But during this compilation, it shows:

[...]
/home/matias.dinapoli/ROMS/Base/Build/libMODS.a(mod_netcdf.o): In function `mod_netcdf_mp_netcdf_open_':
mod_netcdf.f90:(.text+0x1d0ba): undefined reference to `netcdf_mp_nf90_open_'
mod_netcdf.f90:(.text+0x1d129): undefined reference to `netcdf_mp_nf90_open_'
mod_netcdf.f90:(.text+0x1d18f): undefined reference to `netcdf_mp_nf90_open_'
/home/matias.dinapoli/ROMS/Base/Build/libMODS.a(mod_netcdf.o): In function `mod_netcdf_mp_netcdf_redef_':
mod_netcdf.f90:(.text+0x1d370): undefined reference to `netcdf_mp_nf90_redef_'
/home/matias.dinapoli/ROMS/Base/Build/libMODS.a(mod_netcdf.o): In function `mod_netcdf_mp_netcdf_sync_':
mod_netcdf.f90:(.text+0x1d4d0): undefined reference to `netcdf_mp_nf90_sync_'
make: *** [/home/matias.dinapoli/ROMS/Base/oceanS] Error 1

I don't know if this is due to a bad linking or lack of links.

Thank!

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

Re: Undefined reference - build.bash

#2 Unread post by kate »

It would help if you could show us the actual link command, i.e. the (long) line with -lnetcdf and/or -lnetcdff.

matias.dinapoli
Posts: 18
Joined: Tue Jun 23, 2015 5:42 pm
Location: CIMA, ARG
Contact:

Re: Undefined reference - build.bash

#3 Unread post by matias.dinapoli »

kate wrote:It would help if you could show us the actual link command, i.e. the (long) line with -lnetcdf and/or -lnetcdff.

Hi! I can do it. All links was directed to different directories. I started again and it worked.

Thanks!

phamtien
Posts: 1
Joined: Tue Sep 29, 2015 1:31 am
Location: Center for Marine Hydromet Research

Re: Undefined reference - build.bash

#4 Unread post by phamtien »

Hi, I also encountered similar problems when compiling ROMS.
how do all links was directed to different directories?
Thank!

Post Reply