Skip to content
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

a problem of install #145

Open
PanfengZhang opened this issue Sep 25, 2024 · 1 comment
Open

a problem of install #145

PanfengZhang opened this issue Sep 25, 2024 · 1 comment

Comments

@PanfengZhang
Copy link

When I was installing packages on the Ubuntu system, I encountered some issues. Below are the error messages.

  • installing source package ‘RNetCDF’ ...
    ** package ‘RNetCDF’ successfully unpacked and MD5 sums checked
    ** using staged installation
    configure: Find compiler/linker variables from environment:
    checking CFLAGS... -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
    checking CPPFLAGS... -I/sw/include
    checking LDFLAGS... -L/sw/lib
    checking LIBS...
    configure: Select C compiler:
    checking C compiler from --with-mpicc...
    checking C compiler from R... gcc
    configure: Find compiler/linker variables from R:
    checking R_CFLAGS... -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
    checking R_CPPFLAGS...
    checking R_LDFLAGS... -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether the compiler supports GNU C... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to enable C11 features... none needed
    checking for gcc options needed to detect all undeclared functions... none needed
    checking for stdio.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for strings.h... yes
    checking for sys/stat.h... yes
    checking for sys/types.h... yes
    checking for unistd.h... yes
    checking whether WIN32 is declared... no
    checking whether APPLE is declared... no
    configure: Operating system is Unix-alike
    checking for nc-config... yes
    configure: Check compiler/linker variables from nc-config:
    checking NC_CC... x86_64-conda-linux-gnu-cc
    checking NC_CC matches selected C compiler... no ... specify --with-mpicc if needed
    checking nc-config --cflags... -I/home/zhang/miniconda3/include
    checking nc-config --libs ... -L/home/zhang/miniconda3/lib -lnetcdf
    configure: Check compiler type sizes and language features
    checking size of int... 4
    checking size of long long... 8
    checking size of size_t... 8
    checking for C/C++ restrict keyword... restrict
    configure: Check NetCDF features:
    checking for netcdf.h... yes
    checking for library containing nc_open... none required
    checking for nc_rename_grp... yes
    checking for nc_get_var_chunk_cache... yes
    checking for nc_inq_var_szip... yes
    checking for nc_inq_var_endian... yes
    checking for nc_def_var_filter... yes
    checking for nc_inq_var_filter_ids... yes
    checking for nc_inq_var_filter_info... yes
    checking for nc_reclaim_data... yes
    checking for netcdf_filter.h... yes
    checking whether NC_64BIT_DATA is declared... yes
    checking whether NC_FORMAT_64BIT_DATA is declared... yes
    checking whether NC_DISKLESS is declared... yes
    checking whether NC_PERSIST is declared... yes
    configure: Check for parallel NetCDF features:
    checking for mpi.h... no
    checking for MPI_Init... no
    configure: WARNING: MPI not available. Specify --with-mpicc if needed.
    configure: WARNING: NetCDF parallel I/O requires MPI
    configure: Check for udunits2 features:
    checking for library containing XML_ErrorString... -lexpat
    checking for library containing ut_read_xml... -ludunits2
    checking for ut_offset_by_time... yes
    checking for ut_decode_time... yes
    checking for ut_encode_time... yes
    checking for udunits2.h... yes
    configure: Final compiler and linker variables for make:
    CC=gcc
    PKG_CFLAGS=-I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
    PKG_CPPFLAGS=-I/sw/include
    PKG_LDFLAGS=-L/sw/lib
    LIBS=-ludunits2 -lexpat -L/home/zhang/miniconda3/lib -lnetcdf
    configure: creating ./config.status
    config.status: creating src/Makefile.common
    config.status: creating R/config.R
    ** libs
    WINDOWS="FALSE"
    MAKE="make"
    R_HOME="/usr/lib/R"
    R_ARCH=""
    /bin/bash ../tools/make-recursive.sh
    make -f /usr/lib/R/etc//Makeconf -f /usr/share/R/share/make/shlib.mk -f Makefile.common OBJECTS= attribute.o common.o convert.o dataset.o dimension.o group.o init.o type.o udunits.o variable.o SHLIB=RNetCDF$(SHLIB_EXT) RNetCDF_all
    make[1]: Entering directory '/home/zhang/RNetCDF.Rcheck/00_pkg_src/RNetCDF/src'
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE
    _=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c attribute.c -o attribute.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c common.c -o common.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c convert.c -o convert.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c dataset.c -o dataset.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c dimension.c -o dimension.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c group.c -o group.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c init.c -o init.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c type.c -o type.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c udunits.c -o udunits.o
    gcc -I"/usr/share/R/include" -DNDEBUG -DPACKAGE_NAME="RNetCDF" -DPACKAGE_TARNAME="rnetcdf" -DPACKAGE_VERSION="2.9-2" -DPACKAGE_STRING="RNetCDF\ 2.9-2" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DECL__WIN32=0 -DHAVE_DECL___APPLE__=0 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_SIZE_T=8 -Drestrict=restrict -DHAVE_NETCDF_H=1 -DHAVE_NC_RENAME_GRP=1 -DHAVE_NC_GET_VAR_CHUNK_CACHE=1 -DHAVE_NC_INQ_VAR_SZIP=1 -DHAVE_NC_INQ_VAR_ENDIAN=1 -DHAVE_NC_DEF_VAR_FILTER=1 -DHAVE_NC_INQ_VAR_FILTER_IDS=1 -DHAVE_NC_INQ_VAR_FILTER_INFO=1 -DHAVE_NC_RECLAIM_DATA=1 -DHAVE_NETCDF_FILTER_H=1 -DHAVE_DECL_NC_64BIT_DATA=1 -DHAVE_DECL_NC_FORMAT_64BIT_DATA=1 -DHAVE_DECL_NC_DISKLESS=1 -DHAVE_DECL_NC_PERSIST=1 -DHAVE_UDUNITS2_H=1 -DHAVE_LIBUDUNITS2=1 -I/sw/include -I/home/zhang/miniconda3/include -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fpic -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c variable.c -o variable.o
    gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o RNetCDF.so attribute.o common.o convert.o dataset.o dimension.o group.o init.o type.o udunits.o variable.o -L/sw/lib -ludunits2 -lexpat -L/home/zhang/miniconda3/lib -lnetcdf -L/usr/lib/R/lib -lR
    make[1]: Leaving directory '/home/zhang/RNetCDF.Rcheck/00_pkg_src/RNetCDF/src'
    installing to /home/zhang/RNetCDF.Rcheck/00LOCK-RNetCDF/00new/RNetCDF/libs
    ** R
    ** demo
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    Error: package or namespace load failed for ‘RNetCDF’ in dyn.load(file, DLLpath = DLLpath, ...):
    unable to load shared object '/home/zhang/RNetCDF.Rcheck/00LOCK-RNetCDF/00new/RNetCDF/libs/RNetCDF.so':
    /home/zhang/RNetCDF.Rcheck/00LOCK-RNetCDF/00new/RNetCDF/libs/RNetCDF.so: undefined symbol: nc_reclaim_data
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing ‘/home/zhang/RNetCDF.Rcheck/RNetCDF’
@mjwoods
Copy link
Owner

mjwoods commented Sep 28, 2024

Hi @PanfengZhang ,

I think the problem is that the netcdf library is being detected in your miniconda installation, but that is not in the normal library path.

RNetCDF uses the command nc-config to determine details of the netcdf installation, and nc-config is being found in the miniconda directory. If you have the Ubuntu version of netcdf installed, you could use it by removing miniconda from your PATH environment variable (temporarily) before installing RNetCDF.

Otherwise it may be possible to use the miniconda netcdf by installing RNetCDF from the R command prompt with a command like this:

install.packages("RNetCDF", configure.args="LDFLAGS='-L/home/zhang/miniconda3/lib -Wl,-rpath=/home/zhang/miniconda3/lib'")

The -rpath option ensures that R can find the miniconda netcdf library when loading RNetCDF.

As a last resort, another option is to set the library path as follows, but it could have unwanted side-effects for other software:

export LD_LIBRARY_PATH=/home/zhang/miniconda3/lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants