stringfish
stringfish copied to clipboard
Fails to build on CentOS 7
Hi
I fail to install the package on CentOS 7, I have pcre2 10.23 on my machine but the package force to upgrade to 10.35, even if I specify the pcre2-lib. Can we set the default behavior to use specified libpath rather than compile from source for PCRE2?
I can not copy information from where I fail to build this package to a public git repo since my company prohibit it, the error message is roughly happens at: ar rcs libSFPCRE2.a PCRE2/pcre2_chartables.o ...... and I have the error message: /bin/bash: -c: line 1: syntax error near unexpected token `(
while it is hard for me to trouble shooting what is going on, can I simply use pcre2 10.23 which is the system default and is there going to be any problem with it?
seem the problem is not related to version of PCRE2, I modify the configure file to skip build 10.35 version and the problem still exist
Hi, it may be hard to diagnose the issue with the information so far. If you could provide a reproducible example using a VM, docker or new install of CentOS 7, it would be much easier to fix.
Centos 7 is part of the build check, but I also ran it manually just to confirm. Try:
- Install Centos 7 fresh (new computer or VM)
- Install R using Rstudio documentation: https://docs.rstudio.com/resources/install-r/
- Start R and install the package:
install.packages("stringfish")
You can see that it install fine in this example. I also use Centos 7 daily and haven't run into an installation issue yet.
One source of issue may be, Centos 7 contains an outdated C/C++ compiler (which is fine for R and the package). But many people try to upgrade it, which often leads to configuration errors.
Hi, I actually figure out the issue and it is really weird, And I did something which is very similar to your suggestion which is install stringfish on a separate server, which I have all the Makevars, .Renviron etc turned off 1 by 1,
The issue happens when I have the first line in my .rprofile: cat("using .Rprofile : ~/.Rprofile\n")
when I comment out this line, the installation is totally fine. I do not fully understand what happens, but seems from the error message I provided cat() in .rprofile messed this up. If you still cannot reproduce this error please let me know.
Thanks, Song
Aha, it looks like it is this issue: https://github.com/traversc/stringfish/issues/12
The issue is the line in the config $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::RcppParallelLibs()") which I can't do anything about, since this is a standard way the RcppParallel package works.
Instead of cat you can use message to print to stderr, and it should no longer interfere.
I'd leave this issue open in case another person runs into it, or if there is a simple fix in the future.
Thanks for the report!