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

Installing new version fails on linux system #287

Open
GabrielHoffman opened this issue Dec 2, 2024 · 2 comments
Open

Installing new version fails on linux system #287

GabrielHoffman opened this issue Dec 2, 2024 · 2 comments

Comments

@GabrielHoffman
Copy link
Contributor

I tried installing the latest GitHub version. It works find on my Mac, but fails on Linux likely do to an issue with zstd:

I played around with the makefile, but I couldn't figure it out.

configure: zstd 1.5.1 library detected but is too old (<1.5.2) -- compiling from source

Install from GitHub fails

> devtools::install_github("chrchang/plink-ng/2.0/pgenlibr")

Downloading GitHub repo chrchang/plink-ng@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────
   checking for file/tmp/RtmpdbIyM8/remotes4813b3cfed1bd/chrchang-plink-ng-5eachecking for file/tmp/RtmpdbIyM8/remotes4813b3cfed1bd/chrchang-plink-ng-5eab376/2.0/pgenlibr/DESCRIPTION’ (545ms)
─  preparingpgenlibr:checking DESCRIPTION meta-information ...cleaning srcrunningcleanup’
─  checking for LF line-endings in source and make files and shell scripts (654ms)
─  checking for empty or unneeded directories (615ms)
─  buildingpgenlibr_0.3.7.tar.gzWarning: file 'pgenlibr/cleanup' did not have execute permissions: corrected
   Warning: file 'pgenlibr/configure' did not have execute permissions: corrected
   
Installing package into/hpc/users/hoffmg01/.Rlib/R_441_bioc320’
(aslibis unspecified)
* installing *source* packagepgenlibr...
** using staged installation
checking for pkg-config... /usr/bin/pkg-config
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 g++ -std=gnu++17 accepts -g... yes
checking for g++ -std=gnu++17 option to enable C++11 features... none needed
configure: C++ compiler: g++ -std=gnu++17
configure: zstd 1.5.1 library detected but is too old (<1.5.2) -- compiling from source
configure: libdeflate not detected by pkg-config; falling back on system header file check
no
configure: simde not detected by pkg-config; falling back on system header file check
no
configure: creating ./config.status
config.status: creating src/Makevars
** libs
using C++ compiler:g++ (GCC) 14.2.0g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I../inst/include -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c ../inst/include/pvar_ffi_support.cpp -o ../inst/include/pvar_ffi_support.o
g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I../inst/include -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c ../inst/include/pgenlib_ffi_support.cpp -o ../inst/include/pgenlib_ffi_support.o
g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I../inst/include -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c pvar.cpp -o pvar.o
g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I../inst/include -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c pgenlibr.cpp -o pgenlibr.o
g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I../inst/include -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c RcppExports.cpp -o RcppExports.o
make: *** No rule to make target 'zstd/lib/compress/zstdmt_compress.o', needed by 'libPGZSTD.a'.  Stop.
ERROR: compilation failed for packagepgenlibr* removing/hpc/users/hoffmg01/.Rlib/R_441_bioc320/pgenlibr* restoring previous/hpc/users/hoffmg01/.Rlib/R_441_bioc320/pgenlibrWarning message:
In i.p(...) :
  installation of package/tmp/RtmpdbIyM8/file4813b4a1e924/pgenlibr_0.3.7.tar.gzhad non-zero exit status

Install from CRAN succeeds

> install.packages("pgenlibr")

trying URL 'https://cran.wustl.edu/src/contrib/pgenlibr_0.3.7.tar.gz'
Content type 'application/x-gzip' length 1603887 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

* installing *source* packagepgenlibr...
** packagepgenlibrsuccessfully unpacked and MD5 sums checked
** using staged installation
checking for pkg-config... /usr/bin/pkg-config
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 g++ -std=gnu++17 accepts -g... yes
checking for g++ -std=gnu++17 option to enable C++11 features... none needed
configure: C++ compiler: g++ -std=gnu++17
configure: zstd 1.5.1 library detected but is too old (<1.5.2) -- compiling from source
configure: libdeflate not detected by pkg-config; falling back on system header file check
no
configure: simde not detected by pkg-config; falling back on system header file check
no
configure: creating ./config.status
config.status: creating src/Makevars
** libs
using C++ compiler:g++ (GCC) 14.2.0g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c pvar_ffi_support.cpp -o pvar_ffi_support.o
g++ -std=gnu++17 -I"/hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/include" -DNDEBUG -DNO_UNALIGNED -DPGENLIB_NOPRINT -DZSTD_DISABLE_ASM   -Izstd/lib -Izstd/lib/common -Ilibdeflate  -I'/hpc/users/hoffmg01/.Rlib/R_441_bioc320/Rcpp/include' -I/usr/local/include    -fpic  -O3 -fopenmp   -c pgenlib_ffi_support.cpp -o pgenlib_ffi_support.o

[cutoff here since everything works]
> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Rocky Linux 9.4 (Blue Onyx)

Matrix products: default
BLAS:   /hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/lib/libRblas.so 
LAPACK: /hpc/packages/minerva-rocky9/R/4.4.1/lib64/R/lib/libRlapack.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/New_York
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       cli_3.6.3         rlang_1.1.4       processx_3.8.4   
 [5] purrr_1.0.2       pkgload_1.4.0     promises_1.3.0    shiny_1.9.1      
 [9] xtable_1.8-4      glue_1.8.0        htmltools_0.5.8.1 httpuv_1.6.15    
[13] ps_1.8.1          pkgbuild_1.4.5    ellipsis_0.3.2    fastmap_1.2.0    
[17] lifecycle_1.0.4   memoise_2.0.1     compiler_4.4.1    miniUI_0.1.1.1   
[21] fs_1.6.5          sessioninfo_1.2.2 htmlwidgets_1.6.4 Rcpp_1.0.13-1    
[25] urlchecker_1.0.1  later_1.3.2       digest_0.6.37     R6_2.5.1         
[29] curl_6.0.1        usethis_3.0.0     callr_3.7.6       magrittr_2.0.3   
[33] tools_4.4.1       mime_0.12         devtools_2.4.5    profvis_0.4.0    
[37] desc_1.4.3        cachem_1.1.0      remotes_2.5.0
@GabrielHoffman
Copy link
Contributor Author

I was able to fix this in my particular case, but it doesn't solve the underlying issue. And other users on that same machine still can't install that package

Adding -lzstd to PKG_LIBS here:

PKG_LIBS = -lPLINK2 -L. @ZSTD_LIBS@ @LIBDEFLATE_LIBS@ -lz -lpthread

Install forcing zstd version shipped with pgenlibr:

R CMD INSTALL --configure-args="--with-zstd-lib=../inst/include/zstd/lib/ --with-zstd-include=../inst/include/zstd/lib/" .

@chrchang
Copy link
Owner

chrchang commented Dec 4, 2024

Ok, I will try to address this in the upcoming CHROM/POS pgenlibr update.

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