Skip to content

Conversation

@Tazovsky
Copy link

I get error while installing latest version from CRAN on CentOS.

Solution: replace gzfread with gzread

# Installing packages --------------------------------------------------------
- Installing yyjsonr ...                        FAILED
Error: Error installing package 'yyjsonr':
===================================

* installing *source* package ‘yyjsonr’ ...
** package ‘yyjsonr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c R-yyjson-parse.c -o R-yyjson-parse.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c R-yyjson-serialize.c -o R-yyjson-serialize.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c geojson-parse.c -o geojson-parse.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c geojson-serialize.c -o geojson-serialize.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c init.c -o init.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c ndjson-parse.c -o ndjson-parse.o
ndjson-parse.c: In function ‘count_lines’:
ndjson-parse.c:72:5: warning: implicit declaration of function ‘gzfread’ [-Wimplicit-function-declaration]
     size_t res = gzfread(buf, 1, MAX_LINE_LENGTH, file);
     ^
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c ndjson-serialize.c -o ndjson-serialize.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c utils.c -o utils.o
gcc -std=gnu11 -I"/opt/R/4.2.3/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -c yyjson.c -o yyjson.o
gcc -std=gnu11 -shared -L/opt/R/4.2.3/lib/R/lib -L/usr/local/lib -o yyjsonr.so R-yyjson-parse.o R-yyjson-serialize.o geojson-parse.o geojson-serialize.o init.o ndjson-parse.o ndjson-serialize.o utils.o yyjson.o -lz -L/opt/R/4.2.3/lib/R/lib -lR
installing to /rstudio-home/kamil.foltynski/projects/eppt/renv/staging/1/00LOCK-yyjsonr/00new/yyjsonr/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘yyjsonr’
    finding HTML links ... done
    as_scalar                               html  
    opts_read_geojson                       html  
    opts_read_json                          html  
    opts_write_geojson                      html  
    opts_write_json                         html  
    read_geojson_str                        html  
    read_json_conn                          html  
    read_json_file                          html  
    read_json_raw                           html  
    read_json_str                           html  
    read_ndjson_file                        html  
    read_ndjson_raw                         html  
    read_ndjson_str                         html  
    validate_json_file                      html  
    write_geojson_str                       html  
    write_json_file                         html  
    write_json_raw                          html  
    write_json_str                          html  
    write_ndjson_file                       html  
    write_ndjson_raw                        html  
    write_ndjson_str                        html  
    yyjson_read_flag                        html  
    yyjson_version                          html  
    yyjson_write_flag                       html  
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘yyjsonr’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/rstudio-home/kamil.foltynski/projects/eppt/renv/staging/1/00LOCK-yyjsonr/00new/yyjsonr/libs/yyjsonr.so':
  /rstudio-home/kamil.foltynski/projects/eppt/renv/staging/1/00LOCK-yyjsonr/00new/yyjsonr/libs/yyjsonr.so: undefined symbol: gzfread
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/rstudio-home/kamil.foltynski/projects/eppt/renv/staging/1/yyjsonr’
install of package 'yyjsonr' failed [error code 1]
Traceback (most recent calls last):
15: install.packages("yyjsonr")
14: eval(call, envir = parent.frame())
13: eval(call, envir = parent.frame())
12: renv::install("yyjsonr")
11: renv_install_impl(records)
10: renv_install_staged(records)
 9: renv_install_default(records)
 8: handler(package, renv_install_package(record))
 7: renv_install_package(record)
 6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 5: renv_install_package_impl(record)
 4: r_cmd_install(package, path)
 3: r_exec_error(package, output, "install", status)
 2: abort(all)
 1: stop(fallback)

system info:

$ cat /etc/*release
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)

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

Successfully merging this pull request may close these issues.

1 participant