-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not compile conftest.f, error: identifier "choke" is undefined #449
Comments
If you look at line 719 of your config.log, you will see the problem: configure:22655: pgfortran -c -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/nenghan/miniconda3/include conftest.f Where are all these extra CFLAGS coming from? You do not list them in your set of environment variables... |
OK, this is a little hard to follow. Did you successfully install netcdf-c-4.9.2? Did you run make check and all tests passed? The problem you started with was a failure of your fortran compiler to work, due to some of the flags that are set. You have to figure out what that's all about so your fortran compiler works. Look in config.log to find where it failed and start from there. |
thank you, I have installed netced-c 4.9.2, and make check and make install passed |
Looking at this, I see the following:
What do you see if you run |
Thank you, the 'env | grep FFLAGS' returns: FFLAGS=-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/nenghan/miniconda3/include -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe I remove ' -march=nocona' doesn't work, but I find FFLAGS points to my system default netcdf library path, here I install my netcdf in '/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/include', so I set FFLAGS=-I/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/include, and the problem is solved |
I'm trying to install netcdf-fortran 4.6.1, but met the error "Could not compile conftest.f", after find the config.log, I found "error: identifier "choke" is undefined", here is the command I use for netcdf-fortran
export CC=pgcc
export FC=pgfortran
export CXX=c++
LD_LIBRARY_PATH=/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/lib:$LD_LIBRARY_PATH
CPPFLAGS=-I/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/include
LDFLAGS=-L/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/netcdf/lib
./configure --disable-shared --prefix=/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/
for netcdf-c, the command is:
CPPFLAGS=-I/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/hdf5/include
LDFLAGS=-L/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/hdf5/lib
./configure --prefix=/mnt/work/wannh/build_megan/library/netcdf_pg/Build_WRF/LIBRARIES/netcdf/ --disable-dap --disable-shared
system inf:
Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-197-generic x86_64)
zlib 1.2.11
hdf5 1.15.4-3
netcdf-c 4.9.2
any suggestion for this error? Thank you in advance
config.log
The text was updated successfully, but these errors were encountered: