Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Failed in building libraries on MAC before building WRF

SJG

New member
Hi all,

I have been installing WRF following the instructions in the tutorial. I passed System Environment Tests but I am now struggling in building libraries. I have searched on the Internet and have not found any solutions. I would really appreciate it if you could help.

First, I met the same problem as what was discussed on this page and I turned to install netCDF for c and for Fortran respectively. However, I failed in the "make install" step. I ran "make check" before "make install" and it seemed to be ready for installation:

/Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS
PASS: run_examples.sh
PASS: format
PASS: sfc_pres_temp_more
PASS: simple
============================================================================
Testsuite summary for netCDF 4.9.0
============================================================================
# TOTAL: 4
# PASS: 4
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
Making check in CDL
/Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS
PASS: do_comps.sh
============================================================================
Testsuite summary for netCDF 4.9.0
============================================================================
# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[2]: Nothing to be done for `check-am'.
make[1]: Nothing to be done for `check-am'.

However, when I ran "make install", errors occurred:

Making install in include
make[2]: Nothing to be done for `install-exec-am'.
.././install-sh -c -d '/netcdf/include'
mkdir: /netcdf: Read-only file system
mkdir: /netcdf: Read-only file system
make[2]: *** [install-includeHEADERS] Error 1
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

I tried to run "sudo make install" and this did not change the situation. The same errors still occurred.

I also met similar problems when installing other libraries including zlib, libpng and Jasper. In all cases, both "make install" and "sudo make install" did not work.
 
Hi,
Unfortunately we do not have the resources to assist with installing the libraries on user systems. I would recommend either contacting a support person with netcdf, or requesting help for a systems administrator at your institution. If you figure the issue out and have time, you can update this post so that it may help someone else in the future.
 
Hi all,

I have been installing WRF following the instructions in the tutorial. I passed System Environment Tests but I am now struggling in building libraries. I have searched on the Internet and have not found any solutions. I would really appreciate it if you could help.

First, I met the same problem as what was discussed on this page and I turned to install netCDF for c and for Fortran respectively. However, I failed in the "make install" step. I ran "make check" before "make install" and it seemed to be ready for installation:



However, when I ran "make install", errors occurred:



I tried to run "sudo make install" and this did not change the situation. The same errors still occurred.

I also met similar problems when installing other libraries including zlib, libpng and Jasper. In all cases, both "make install" and "sudo make install" did not work.
Hi there, I got the same situation, did you figure it out? I searched many, but still struggle with it. Can I get some help here please?
 
Hi there, I got the same situation, did you figure it out? I searched many, but still struggle with it. Can I get some help here please?
Hi, yes, of course. Please do check the version of your gcc, cpp, and gfortran before you do anything else.
[gcc --version] [cpp --version] [gfortran --version]
And if an apple clang version is returned, you should install a new gcc via homebrew by executing [brew install gcc].
Then cd into the directory of your newly-installed gcc (execute [where gcc] and the path of homebrew gcc is the second line of the output.) and set gcc, cpp and gfortran to homebrew version. [ln -s gcc-12 gcc] [ln -s g++-12 g++] [ln -s cpp-12 cpp] [ln -s gfortran-12 gfortran], where 12 is the version number of your homebrew gcc.
Hope this could help you.
 
Hi, yes, of course. Please do check the version of your gcc, cpp, and gfortran before you do anything else.
[gcc --version] [cpp --version] [gfortran --version]
And if an apple clang version is returned, you should install a new gcc via homebrew by executing [brew install gcc].
Then cd into the directory of your newly-installed gcc (execute [where gcc] and the path of homebrew gcc is the second line of the output.) and set gcc, cpp and gfortran to homebrew version. [ln -s gcc-12 gcc] [ln -s g++-12 g++] [ln -s cpp-12 cpp] [ln -s gfortran-12 gfortran], where 12 is the version number of your homebrew gcc.
Hope this could help you.
Hi there, thanks for your reply, got it sorted now.
But probably made some mistakes, no netcfd.inc file. When I test#1: Fortran + C + NetCDF, cp ${NETCDF}/include/netcdf.inc ., shows me "netcdf.inc: No such file or directory'.
So, did you have the same issue? OR is the netcdf.inc generated automatically when building netcdf library?
 
Hi there, thanks for your reply, got it sorted now.
But probably made some mistakes, no netcfd.inc file. When I test#1: Fortran + C + NetCDF, cp ${NETCDF}/include/netcdf.inc ., shows me "netcdf.inc: No such file or directory'.
So, did you have the same issue? OR is the netcdf.inc generated automatically when building netcdf library?
I had the same problem before. But this did not happen again after I set gcc to a homebrew version.
 
I had the same problem before. But this did not happen again after I set gcc to a homebrew version.
After running 'gcc --version' and it shows me 'gcc (Homebrew GCC 12.2.0) 12.2.0', does this mean set gcc to a homebrew version?
 
After running 'gcc --version' and it shows me 'gcc (Homebrew GCC 12.2.0) 12.2.0', does this mean set gcc to a homebrew version?
Yes. Maybe you should check the variables defined by setenvs? Sorry that I may not help more.
 
Top