Skip to content

README.md and install problems #14

@apcraig

Description

@apcraig

I'm trying to build cprnc on a new machine that I have access to. This is the first time I'm trying to use the new cprnc package. I have been using a version of cprnc that is 10 years old for the last 10 years. I can get the old package to build, but it segfaults at runtime. I have worked around that in the past by statically building, but the new machine does not support static versions of all the required libraries, so I figured I'd try the latest version to see if I could build it dynamically and get it to work.

I think there are some problems with the README.md.

First, while the text file itself it fine, the thing that appears on the git project page has lots of formatting problems. Just look at the build instructions or the usage line.

Second, I think you are missing the "make" step in the build instructions. The last thing you have is "cmake ../" which does not build anything when I do it. If I do "make" after that, then I get the genf90 and cprnc binaries.

A separate problem I've run into is that if I load intel compilers and an intel build of netcdf and type "cmake ../", it finds the gnu compiler and tries to link that with the intel netcdf. The gnu compilers are there by default and I guess it looks for them first? I'm not that familiar with cmake, but is there a way for me to tell cmake to find the intel compilers and ignore the gnu compiler?

The final problem is when I build cprnc with the gnu compiler and gnu netcdf and then try to run it, I get

./cprnc: error while loading shared libraries: libhdf5.so.310: cannot open shared object file: No such file or directory

That library is there (/app/hdf4/1.14.2-gnu/lib) and I think that it should be found

grep -i hdf *
CMakeCache.txt:NetCDF_Fortran_LIBRARIES:STRING=-L/app/netcdf-gnu/lib -lnetcdff -L/app/netcdf-gnu/lib -L/app/hdf5/1.14.2-gnu/lib -lnetcdf -lm -lnetcdf -ldl -lm -lcurl -lhdf5 -lhdf5_hl -lz

But I'm not that familiar with cmake and the complexity of the configuration and build makes it more difficult to debug/fix. If I do ldd on cprnc, I see that the library is missing,

ldd cprnc
linux-vdso.so.1 (0x00007ffda070e000)
libnetcdff.so.7 => /app/netcdf-gnu/lib/libnetcdff.so.7 (0x00007f04200e9000)
libnetcdf.so.19 => /app/netcdf-gnu/lib/libnetcdf.so.19 (0x00007f041fc94000)
libgfortran.so.5 => /lib64/libgfortran.so.5 (0x00007f041f815000)
libm.so.6 => /lib64/libm.so.6 (0x00007f041f493000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f041f28f000)
libcurl.so.4 => /lib64/libcurl.so.4 (0x00007f041f000000)
libhdf5.so.310 => not found
libhdf5_hl.so.310 => not found
libz.so.1 => /lib64/libz.so.1 (0x00007f041ede8000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f041ebd0000)
libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f041e98f000)
libc.so.6 => /lib64/libc.so.6 (0x00007f041e5ca000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f041e3b9000)
libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f041e115000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f041ddad000)
libhdf5_hl.so.310 => /app/hdf5/1.14.2-gnu/lib/libhdf5_hl.so.310 (0x00007f0420559000)
libhdf5.so.310 => /app/hdf5/1.14.2-gnu/lib/libhdf5.so.310 (0x00007f041d96b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0420363000)
libnghttp2.so.14 => /lib64/libnghttp2.so.14 (0x00007f041d744000)
libidn2.so.0 => /lib64/libidn2.so.0 (0x00007f041d526000)
libssh.so.4 => /lib64/libssh.so.4 (0x00007f041d2b6000)
libpsl.so.5 => /lib64/libpsl.so.5 (0x00007f041d0a5000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007f041ce11000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f041c927000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f041c6d2000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f041c3e7000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f041c1d0000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f041bfcc000)
libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007f041bd7d000)
liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f041bb6d000)
libbrotlidec.so.1 => /lib64/libbrotlidec.so.1 (0x00007f041b960000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f041b740000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f041b519000)
libunistring.so.2 => /lib64/libunistring.so.2 (0x00007f041b198000)
librt.so.1 => /lib64/librt.so.1 (0x00007f041af90000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f041ad7f000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f041ab7b000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f041a963000)
libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007f041a745000)
libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007f041a524000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f041a2f9000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f041a0d0000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f0419e4c000)

So I guess i need to figure out how to fix that. I realize this may be an issue in how the netcdf is installed on the machine, but I can't do much about that in the short term. What I can do is help make find hdf5. Any thoughts about how to get the build system to add /app//hdf5/1.14.2-gnu/lib for the hdf5 libs? I'm trying to spin up on the cprnc build system, will see if I figure it out.....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions