Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

NetCDF C installation error

Hello,

We tried to install the NetCDF-C v4.6.1 on our Linux.  The Intel compilers (icc and ifort) are installed on the system.  Before we installed NetCDF-C v4.6.1, we have successfully installed zlib, curl, and hdf5.  After I run './configure --prefix=..', I run 'make' and it shows the following error message before the installation is terminated:

ld: warning: libimf.so, needed by ../liblib/.libs/libnetcdf.so, not found (try using -rpath or -rpath-link)
ld: warning: libsvml.so, needed by ../liblib/.libs/libnetcdf.so, not found (try using -rpath or -rpath-link)
ld: warning: libirng.so, needed by ../liblib/.libs/libnetcdf.so, not found (try using -rpath or -rpath-link)
ld: warning: libintlc.so.5, needed by ../liblib/.libs/libnetcdf.so, not found (try using -rpath or -rpath-link)
ld: .libs/ncgen3: hidden symbol `__intel_cpu_features_init_x' in /opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/libirc.a(cpu_feature_disp.o) is referenced by DSO
ld: final link failed: Bad value
make[2]: *** [ncgen3] Error 1
make[2]: Leaving directory `/home/libtest/netcdf-4.6.1/ncgen3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/libtest/netcdf-4.6.1'
make: *** [all] Error 2
 
The libimf.so, libsvml.so, libirng.so, and libintlc.so.5 are installed at:
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/ia32_lin/libimf.so
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/libimf.so
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/ia32_lin/libsvml.so
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/libsvml.so
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/ia32_lin/libirng.so
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/libirng.so
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/ia32_lin/libintlc.so.5
/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/libintlc.so.5
 
Why these libraries can not be found?
 
Your advice is greatly appreciated.
 
Thanks,
Lianyuan
0 Kudos
8 Replies
Highlighted
Valued Contributor I

Usual answer (or question):

Usual answer (or question): did you source the compilervars of Intel?

 

0 Kudos
Highlighted

Hi, Juergen,

Hi, Juergen,
 
I am not the computer administrator so I don't know whether we source the compilervars of Intel or not.  We run on bash.  Can you advice how to source the compilevars of Intel (how to modify the file .bashrc on the home directory)?
 
Thanks,
Lianyuan
0 Kudos
Highlighted
Valued Contributor I

Hi Lianyuan,

Hi Lianyuan,

the reason that your linker cannot find the library is because it is not in any (system) path known to the linker that are normally stored in the environment variable LD_LIBRARY_PATH. Try to execute 'echo $LD_LIBRARY_PATH' then you will see which paths are in there. libimf.so and all the other libraries are not found. Somewhere in your Intel Parallel Studio installation (search for `which ifort`) there should be a shell script `compilervars.sh` that you need to source (`source compilarvars.sh`). Alternatively, you can add the path for your libraries to LD_LIBRARY_PATH. Also make sure that the library versions that you try to link fit to your OS (i.e. 64bit vs. 32bit).

Cheers,

      Juergen

0 Kudos
Highlighted

Hi, Juergen,

Hi, Juergen,

When I run "locate compilervars.sh", it shows:

/opt/intel/bin/compilervars.sh
/opt/intel/compilers_and_libraries_2018/linux/bin/compilervars.sh
/opt/intel/compilers_and_libraries_2018.3.222/linux/bin/compilervars.sh

Which one I need to source?  I am pretty sure that our Linux machine is 64bit, rather than 32bit.

When I type command 'source /opt/intel/bin/compilervars.sh', it shows following message:

[libtest@ofsprod1 ~]$ source /opt/intel/bin/compilervars.sh
compilervars.sh [-arch] <arch> [-platform <platform>]
  <arch> must be one of the following:
      ia32           : Set up for IA-32 target.
      intel64        : Set up for Intel(R)64 target.
  <platform> must be of the following:
      android        : Set to Android* target.
      linux          : Set to Linux* target.(default)
If the arguments to the sourced script are ignored (consult docs
for your shell) the alternative way to specify target is environment
variables COMPILERVARS_ARCHITECTURE to pass <arch> to the script
and COMPILERVARS_PLATFORM to pass <platform>
 
Then I type command "env", it shows:
[libtest@ofsprod1 ~]$ env
HOSTNAME=ofsprod1.nos-tcn.noaa.gov
SHELL=/bin/bash
TERM=vt100
HISTSIZE=1000
OLDPWD=/home/net/zheng
USER=libtest
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
SUDO_USER=zheng
SUDO_UID=1302
USERNAME=libtest
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/intel/bin:/opt/puppetlabs/bin
MAIL=/var/spool/mail/zheng
PWD=/home/libtest
LANG=en_US.UTF-8
SHLVL=1
SUDO_COMMAND=/bin/bash -i
HOME=/home/libtest
LOGNAME=libtest
LESSOPEN=||/usr/bin/lesspipe.sh %s
SUDO_GID=502
DISPLAY=localhost:10.0
_=/bin/env
 
The library path still does not include the directory which the compilervars.sh is located.
 
Thanks,
Lianyuan
0 Kudos
Highlighted
Valued Contributor I

What is your link command?  

What is your link command?

 

0 Kudos
Highlighted

Hi, Jurgen,

Hi, Jurgen,

After I provide the LD_LIBRARY_PATH on the .bashrc file.  The .bashrc file includes:

[libtest@ofsprod1 ~]$ vi .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/:/home/libtest/lib:${LD_LIBRA
RY_PATH}
 
The command "env" shows:
[libtest@ofsprod1 ~]$ env
SHELL=/bin/bash
TERM=vt100
HISTSIZE=1000
OLDPWD=/home/net/zheng
USER=libtest
LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/:/home/libtest/lib:
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
SUDO_USER=zheng
SUDO_UID=1302
USERNAME=libtest
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/intel/bin:/opt/puppetlabs/bin
MAIL=/var/spool/mail/zheng
PWD=/home/libtest
LANG=en_US.UTF-8
SHLVL=1
SUDO_COMMAND=/bin/bash -i
HOME=/home/libtest
LOGNAME=libtest
LESSOPEN=||/usr/bin/lesspipe.sh %s
SUDO_GID=502
DISPLAY=localhost:10.0
_=/bin/env

​Then I can successfully install the NetCDF-C.  Next, I will install NetCDF-Fortran v4.4.4.  When I run './configure --prefix=/home/libtest', the 'config.log' shows:
 
configure:4839: finding Fortran compiler
configure:4947: checking for Fortran compiler version
configure:4956: ifort --version >&5
Error: A license for (Comp-FL) could not be found.
License file(s) used were (in this order):
**  1.  /opt/intel/compilers_and_libraries_2018.3.222/linux/bin/intel64/../../Licenses
**  2.  /home/libtest/Licenses
**  3.  /opt/intel/licenses/l_2T36BCSM.lic
**  4.  /Users/Shared/Library/Application Support/Intel/Licenses
**  5.  /opt/intel/compilers_and_libraries_2018.3.222/linux/bin/intel64/*.lic
Please refer https://software.intel.com/en-us/faq/licensing#invalid-license-error for more information..
... rest of stderr output deleted ...
 
My question is why the license can not be found?  The license is installed at /opt/intel/licenses/l_2T36BCSM.lic
[libtest@ofsprod1 ~]$ ls -l /opt/intel/licenses/l_2T36BCSM.lic
-rw-r--r--. 1 root root 485 Jul 23 12:53 /opt/intel/licenses/l_2T36BCSM.lic
 
Your help is greatly appreciated!
 
Thanks,

 Lianyuan

0 Kudos
Highlighted
Valued Contributor I

Please look at some other

Please look at some other threads: https://software.intel.com/en-us/forums/intel-software-development-products-download-registration-licensing/topic/605375 

How could you possibly have compiled one package with the Intel Fortran compiler and for the next one your license expired? What does the mentioned license file say? Sometimes when it is at a distributed file system, this file system could be down. This is a question for your IT department. 

 

0 Kudos
Highlighted

Hi, Juergen,

Hi, Juergen,

You are correct.  I ask our IT department regarding to licenses expired issue.  They do something (I don't know).  Now the Intel license is working and I can successfully install the NetCDF-Fortran.

Your help is greatly important so I have successfully installed the NetCDF packages.  Thank you very much!

Have a nice weekend!

Lianyuan

0 Kudos