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

Error compilation OBSGRID

stationUF

New member
Hello guys. I need some help, Im trying to compile and run OBSGRID, but i cant pass from the ./compile I get some erros and doesnot creat the obsgrid.exe file. Does someone knows how can i solve it? here the output file for the ./compile
On ./configure Im using the second one: gfortran and already removed the FLAG ' -C '
ps:. Downloaded tha OBSGRID from the official github page
 

Attachments

  • compile_oa (cp).txt
    34.1 KB · Views: 9
Hi!

Seems ld can't find the ncar graphical library files.

/usr/bin/ld: não foi possível localizar -lncarg
/usr/bin/ld: não foi possível localizar -lncarg_gks
/usr/bin/ld: não foi possível localizar -lncarg_c
collect2: error: ld returned 1 exit status

Check if at /usr/local/ncl/lib you have the ncarg library files. (libncarg.a libncarg_c.a libncarg_gks.a libncarg_ras.a)
 
You seems to have the same problem that @stationUF, plus you are also having lots of "Rank missmatch errorrs",

The latter could be solved by adding this flag "-fallow-argument-mismatch" to the FFLAGS variable at the configure.oa file

Code:
FC              =       gfortran
FFLAGS          =       -ffree-form -O2 -fallow-argument-mismatch -fconvert=big-endian -frecord-marker=4

hope it helps!
 
Thanks.
Now I've the same log.compile file than @stationUF

It try to find some files in /user/bin/ld but the folder Id doesn't exist.

Code:
/usr/bin/ld: cannot find -lncarg: No such file or directory
/usr/bin/ld: cannot find -lncarg_gks: No such file or directory
/usr/bin/ld: cannot find -lncarg_c: No such file or directory
/usr/bin/ld: cannot find -lX11: No such file or directory
 
great,

If you only need to compile obsgrid.exe you won't need to install this ncarg library and so it wont be a problem.

What I would on your place is to check if netcdf library is correctly compiled and if it has support for netcdf-fortran

One way to check this is to run on the command-line:
Code:
nc-config --has-f03

it should print "yes"

Also check if the paths to netcdf lib and include directory are correct.
Code:
nc-config --fflags
and
Code:
nc-config --flibs
 
The first output is yes.

The second: -I/home/jmcabrera/WRF/Build_WRF/LIBRARIES/netcdf/include

The third: -L/home/jmcabrera/WRF/Build_WRF/LIBRARIES/netcdf/lib -lnetcdff -L/home/jmcabrera/WRF/Build_WRF/LIBRARIES/netcdf/lib -lnetcdf -lnetcdf -lm
 
Perfect, so It should be working. Please share your comple.out and recheck if the exe has been created at the src dir
 
I think I've solved it, now obsgrid.exe is created.

I've follow this Unstable to install obsgrid on ubuntu 22.04 · Issue #10 · wrf-model/OBSGRID

I copied this code in the console and compile.

Code:
sed -i 's/-C -P -traditional/-P -traditional/g' configure.oa
sed -i 's/-lnetcdf -lnetcdff/ -lnetcdff -lnetcdf/g' configure.oa
sed -i 's/-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo/-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo -lfontconfig -lpixman-1 -lfreetype -lhdf5 -lhdf5_hl /g' configure.oa
./compile FFLAGS=-fallow-argument-mismatch FCFLAGS=-fallow-argument-mismatch
 
Hi!

Seems ld can't find the ncar graphical library files.

/usr/bin/ld: não foi possível localizar -lncarg
/usr/bin/ld: não foi possível localizar -lncarg_gks
/usr/bin/ld: não foi possível localizar -lncarg_c
collect2: error: ld returned 1 exit status

Check if at /usr/local/ncl/lib you have the ncarg library files. (libncarg.a libncarg_c.a libncarg_gks.a libncarg_ras.a)

great,

If you only need to compile obsgrid.exe you won't need to install this ncarg library and so it wont be a problem.

What I would on your place is to check if netcdf library is correctly compiled and if it has support for netcdf-fortran

One way to check this is to run on the command-line:
Code:
nc-config --has-f03

it should print "yes"

Also check if the paths to netcdf lib and include directory are correct.
Code:
nc-config --fflags
and
Code:
nc-config --flibs
Hi so mine was :
yes
-I/home/gp3/Build_WRF/LIBRARIES/netcdf/include
-L/home/gp3/Build_WRF/LIBRARIES/netcdf/lib -lnetcdff -L/home/gp3/Build_WRF/LIBRARIES/grib2/lib -lnetcdf -lnetcdf -ldl -lm
 
I think I've solved it, now obsgrid.exe is created.

I've follow this Unstable to install obsgrid on ubuntu 22.04 · Issue #10 · wrf-model/OBSGRID

I copied this code in the console and compile.

Code:
sed -i 's/-C -P -traditional/-P -traditional/g' configure.oa
sed -i 's/-lnetcdf -lnetcdff/ -lnetcdff -lnetcdf/g' configure.oa
sed -i 's/-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo/-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo -lfontconfig -lpixman-1 -lfreetype -lhdf5 -lhdf5_hl /g' configure.oa
./compile FFLAGS=-fallow-argument-mismatch FCFLAGS=-fallow-argument-mismatch
What did you do? just put the this code on the terminal? or on the ./configure file?
 
Top