Open aosterthun opened 3 years ago
Interesting. It looks like the librt library (system runtime library) is missing from the environment. I'm not sure if this is something that conda would install or if it is assumed it would be part of the system-wide development kit. I've done a little bit of searching, and I see it is related to libc. I'm not entirely certain why there is a dependency on librt for netcdf-cxx4.
A little more searching turned up that librt contains functions for Real Time Solaris. Are you working on Solaris, and if so are you able to install librt using the system (or conda) package manager?
I'm working on Manjaro with the XFCE desktop environment. I havn't been able to find librt in either conda nor pacman or the AUR.
This is very interesting, then; everything I can find suggests that librt.so is a Solaris-specific library. I will keep digging to see if I can figure out what's going on.
On Tue, Sep 8, 2020 at 1:38 PM Arne Osterthun notifications@github.com wrote:
I'm working on a Manjaro with the XFCE desktop environment. I havn't been able to find librt in either conda nor pacman or AUR.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Unidata/netcdf-cxx4/issues/96#issuecomment-689092965, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA74UV27BUYQXIA4H3456LSE2B4TANCNFSM4RAFPSUA .
Yeah it's really weird. Would it help if I tried to build netcdf from source to see if I can reproduce the error when building the library myself ? But since I'm able to install the lib through pamac install netcdf-cxx
there shouldn't be a problem building the lib in general.
I found that there exists a similar error in conan: https://github.com/conan-io/conan/issues/3972. Maybe this is the same underlying issue.
Interesting, thanks for the link, I'm reading through that now. If you're able to try building from source and willing to report back if you encounter the same error, I would very much appreciate it. Also, what is the output if you run ldd
on the netcdf-cxx4 library installed by conda, out of curiosity?
I had to change OS I'm now on:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
But I get the same error. For Ubuntu I don't need to test building manually because I already did that once and had no problem with that.
ldd output for libnetcdf_c++4.so:
linux-vdso.so.1 (0x00007ffca8fc7000)
libnetcdf.so.18 => /home/arne/miniconda3/lib/./libnetcdf.so.18 (0x00007fa5e32b6000)
libstdc++.so.6 => /home/arne/miniconda3/lib/./libstdc++.so.6 (0x00007fa5e30bf000)
libgcc_s.so.1 => /home/arne/miniconda3/lib/./libgcc_s.so.1 (0x00007fa5e32a2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa5e2cce000)
libmfhdf.so.0 => /home/arne/miniconda3/lib/././libmfhdf.so.0 (0x00007fa5e325e000)
libdf.so.0 => /home/arne/miniconda3/lib/././libdf.so.0 (0x00007fa5e2c1f000)
libhdf5_hl.so.100 => /home/arne/miniconda3/lib/././libhdf5_hl.so.100 (0x00007fa5e2bfa000)
libhdf5.so.103 => /home/arne/miniconda3/lib/././libhdf5.so.103 (0x00007fa5e2876000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa5e2657000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa5e22b9000)
libcurl.so.4 => /home/arne/miniconda3/lib/././libcurl.so.4 (0x00007fa5e222a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa5e3233000)
libjpeg.so.9 => /home/arne/miniconda3/lib/./././libjpeg.so.9 (0x00007fa5e21ec000)
libz.so.1 => /home/arne/miniconda3/lib/./././libz.so.1 (0x00007fa5e21cc000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa5e1fc4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa5e1dc0000)
libnghttp2.so.14 => /home/arne/miniconda3/lib/./././libnghttp2.so.14 (0x00007fa5e1d98000)
libssh2.so.1 => /home/arne/miniconda3/lib/./././libssh2.so.1 (0x00007fa5e1d52000)
libssl.so.1.1 => /home/arne/miniconda3/lib/./././libssl.so.1.1 (0x00007fa5e1cc2000)
libcrypto.so.1.1 => /home/arne/miniconda3/lib/./././libcrypto.so.1.1 (0x00007fa5e19f6000)
libgssapi_krb5.so.2 => /home/arne/miniconda3/lib/./././libgssapi_krb5.so.2 (0x00007fa5e19a7000)
libkrb5.so.3 => /home/arne/miniconda3/lib/./././libkrb5.so.3 (0x00007fa5e18ce000)
libk5crypto.so.3 => /home/arne/miniconda3/lib/./././libk5crypto.so.3 (0x00007fa5e18af000)
libcom_err.so.3 => /home/arne/miniconda3/lib/./././libcom_err.so.3 (0x00007fa5e18a9000)
libkrb5support.so.0 => /home/arne/miniconda3/lib/././././libkrb5support.so.0 (0x00007fa5e1898000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa5e167d000)
And ldd output for libnetcdf.so:
linux-vdso.so.1 (0x00007ffe96290000)
libmfhdf.so.0 => /home/arne/miniconda3/lib/./libmfhdf.so.0 (0x00007f776e9a4000)
libdf.so.0 => /home/arne/miniconda3/lib/./libdf.so.0 (0x00007f776e84f000)
libhdf5_hl.so.100 => /home/arne/miniconda3/lib/./libhdf5_hl.so.100 (0x00007f776e97f000)
libhdf5.so.103 => /home/arne/miniconda3/lib/./libhdf5.so.103 (0x00007f776e4cb000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f776e2ac000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f776df0e000)
libcurl.so.4 => /home/arne/miniconda3/lib/./libcurl.so.4 (0x00007f776de7f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f776da8e000)
libjpeg.so.9 => /home/arne/miniconda3/lib/././libjpeg.so.9 (0x00007f776e927000)
libz.so.1 => /home/arne/miniconda3/lib/././libz.so.1 (0x00007f776da6e000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f776d866000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f776d662000)
/lib64/ld-linux-x86-64.so.2 (0x00007f776e8fe000)
libnghttp2.so.14 => /home/arne/miniconda3/lib/././libnghttp2.so.14 (0x00007f776d63a000)
libssh2.so.1 => /home/arne/miniconda3/lib/././libssh2.so.1 (0x00007f776d5f6000)
libssl.so.1.1 => /home/arne/miniconda3/lib/././libssl.so.1.1 (0x00007f776d566000)
libcrypto.so.1.1 => /home/arne/miniconda3/lib/././libcrypto.so.1.1 (0x00007f776d29a000)
libgssapi_krb5.so.2 => /home/arne/miniconda3/lib/././libgssapi_krb5.so.2 (0x00007f776d24b000)
libkrb5.so.3 => /home/arne/miniconda3/lib/././libkrb5.so.3 (0x00007f776d172000)
libk5crypto.so.3 => /home/arne/miniconda3/lib/././libk5crypto.so.3 (0x00007f776d151000)
libcom_err.so.3 => /home/arne/miniconda3/lib/././libcom_err.so.3 (0x00007f776d14b000)
libkrb5support.so.0 => /home/arne/miniconda3/lib/./././libkrb5support.so.0 (0x00007f776d13c000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f776cf21000)
I'm not sure, but I had problems in conan with using a wrong gcc/g++ when linking a SQLite library. Maybe the netcdf library in conda is build with a different gcc/g++ version.
I'm using gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
and g++ (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
.
Hello,
I wanted to use conan at one point (#91), since I couldn't get it to work on my own, I used a global netcdf-cxx4 install for now. I recently started to use conda for python dependencies and found out that one can use conda for c++ as well. So I found that there is a netcdf-cxx4 package in conda-forge.
I tried using that, and it kinda works in regards to finding the headers and lib files, but I get another error when compiling my executable:
make[2]: *** No rule to make target '/x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/librt.so', needed by 'netcdf_cxx'. Stop.
My cmake file looks like this:
And my conda environment contains the following packages:
Any hints on why I get this error ? Since the conda package for netcdf-cxx4 has been downloaded over 30000 times I guess this is a system specific issue ?