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

Issue Configuring netcdf-fortran-4.5.2 for WRF Compilation: Unrecognised options and C compiler Error

nasrin

New member
Hello WRF community,
I hope this message finds you well. I am currently facing a challenge while trying to configure netcdf-fortran-4.5.2 as part of the WRF compilation process. This specific issue arises during the "Building Libraries" step.

PROBLEM DESCRIPTION:
When executing the command: ./configure --prefix=$DIR/netcdf --disable-dap --disable-netcdf-4 --disable-shared

I encounter the following warnings and errors:
configure: WARNING: unrecognized options: --disable-dap, --disable-netcdf-4
configure: netCDF-Fortran 4.5.2
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: checking user options
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: C compiler cannot create executables


ADDITIONAL INFORMATION:
WRF URL:
I have referred to the WRF compilation tutorial available at the provided URL but have not been able to resolve this issue. I would appreciate any guidance or insights from the community on how to address this problem and successfully complete the configuration.

Thank you in advance for your assistance.
 
Hi,
Please reach out to a systems administrator at your institution for guidance with this issue. Unfortunately WRF support members only have the resources to assist with WRF/WPS code inquiries. As you mention, someone from the community may also see this and be able to help, so feel free to leave the post here. If you do figure out the issue, and don't mind posting your solution, it could help someone else in the future.
 
Hello WRF community,
I hope this message finds you well. I am currently facing a challenge while trying to configure netcdf-fortran-4.5.2 as part of the WRF compilation process. This specific issue arises during the "Building Libraries" step.

PROBLEM DESCRIPTION:
When executing the command: ./configure --prefix=$DIR/netcdf --disable-dap --disable-netcdf-4 --disable-shared

I encounter the following warnings and errors:
configure: WARNING: unrecognized options: --disable-dap, --disable-netcdf-4
configure: netCDF-Fortran 4.5.2
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: checking user options
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: C compiler cannot create executables


ADDITIONAL INFORMATION:
WRF URL:
I have referred to the WRF compilation tutorial available at the provided URL but have not been able to resolve this issue. I would appreciate any guidance or insights from the community on how to address this problem and successfully complete the configuration.

Thank you in advance for your assistance.
Try this out.
 
Greetings,
I've encountered this issue only with netCDF-Fortran (functional for netCDF-C) while executing the WRF installation command in bash:
```
./configure --prefix=$DIR/netcdf --disable-dap --disable-netcdf-4 --disable-shared

```
I would sincerely appreciate insights or guidance on any necessary adjustments for netCDF-Fortran.

Additionally, I'm seeking clarification on the term "LD_LIBRARY" mentioned in the the "Full WRF and WPS Installation Example (GNU)" guide. Could someone elaborate on its significance in this context?

Lastly, I would appreciate guidance on the full path to the libs directory referred to in the installation example. Thank you for your assistance.
 
Hello there
I am no computer scientist, but as per my understanding regarding WRF libraries installation, the LD_LIBRARY_PATH is needed to tell the system where to find the necessary libraries, while installing other libraries.

On your query of where the path for the variable LD_LIBRARY_PATH is located - well, it depends on your installation. If you are using the WRF installation tutorial , you most likely have declared a DIR variable. Then the path for your LD_LIBRARY_PATH variable will be $DIR/netcdf/lib
You can declare the variable by using the following
(bash)
export LD_LIBRARY_PATH=$DIR/grib2/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$DIR/netcdf/lib:$LD_LIBRARY_PATH (for netcdf)

Now, how do you know where you installed the required libraries in order to use the path for the PATH and LD_LIBRARY PATH variable?
You can open up the $DIR directory and check to see whether folders such as netcdf and girib2 have been created. Navigate to the netcdf folder and you will find the folders lib , bin and include. You can understand how the path for LD_LIBRARY_PATH is set.

And for netcdf-fortran installation, the configure statement, in most cases should just be

./configure --prefix=$DIR/netcdf --disable-shared

Cheers!
 
Top