Compile CDO with preinstalled grib_api: can not link
Added by tao lu over 8 years ago
Helo
When I compile CDO, I encountered the error "configure:19575: error: Could not link to grib_api library"
I also copy the compiled grib_api by apt-get to test the configure, it also failed. I am unhappy.
I don't know why can't link to grib_api library.
The config.log is below, please help me.
config.log (66.7 KB) config.log |
Replies (5)
RE: Compile CDO with preinstalled grib_api: can not link - Added by Ralf Mueller over 8 years ago
the error is
/home/taolu/WRF/LIBRARIES/grib_api//lib/libgrib_api.so: undefined reference to `memcpy@GLIBC_2.14'
you seem to have a borken installation. glibc is a system lib. Do you use the installation for anything else?
RE: Compile CDO with preinstalled grib_api: can not link - Added by tao lu over 8 years ago
Thank you for your reply very much.
I did not compiled this
libgrib_api.so file
I just copied this from my another computer.
All files I got from manually compilation are
bin big2gribex grib_compare grib_distance grib_histogram grib_moments tigge_accumulations gg_sub_area_check grib_convert grib_dump grib_index_build grib_packing tigge_check grib1to2 grib_copy grib_error grib_info grib_repair tigge_name grib2ppm grib_corruption_check grib_filter grib_keys grib_set tigge_split grib_add grib_count grib_get grib_list_keys grib_to_netcdf grib_cmp grib_debug grib_get_data grib_ls parser include grib_api.h lib libgrib_api.a libgrib_api.la
By the way, I compiled grib_api by ./configure --prefix=grib_api --disable-shared.
And got the error:
pgf90 -g -o same_int_long same_int_long.o grib_fortran_kinds.o /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtbegin.o: No such file: No such file or directory make[1]: *** [same_int_long] Error 2
RE: Compile CDO with preinstalled grib_api: can not link - Added by Ralf Mueller over 8 years ago
Unless both computers have same kind of hardware and exactly the same operating system, copying libraries does not work. This messes things up and you'll run into strange error.
You should
- use binary packages for your OS
or
- manually compile the complete library
You wrote, that your grib_api configure call was
./configure --prefix=grib_api --disable-shared
this does not work properly, in you configure call for CDO, you used
./configure --with-netcdf=/home/taolu/WRF/LIBRARIES/netcdf --with-grib_api=/home/taolu/WRF/LIBRARIES/grib_api/ --prefix=/home/taolu/WRF/LIBRARIES/cdo --disable-shared
both seem to point to different grib_api directories.
Please, take 5min to think about
- if you really need the last development version of CDO
- if you need grib2 support
the trick is, to compile only the feature you need. grib_api is not very user-friendly.
hth
ralf
RE: Compile CDO with preinstalled grib_api: can not link - Added by tao lu over 8 years ago
You are right.
I did not find binary package for Linux.
So I have to compile it myself.
I don't need grib2 support now, but it is better to have one.
I also ask the question about compilation of grib_api, because I think the problem relies on grib_api.
If I solved the question, I will be back.
RE: Compile CDO with preinstalled grib_api: can not link - Added by Ralf Mueller over 8 years ago
tao lu wrote:
You are right.
I did not find binary package for Linux.
So I have to compile it myself.I don't need grib2 support now, but it is better to have one.
Please, don't. IMO it's not better, it just puts work on you without a benefit for you.
I also ask the question about compilation of grib_api, because I think the problem relies on grib_api.
If I solved the question, I will be back.
good luck + a nice weekend!
ralf