Sage-Bionetworks / synapser

An R package providing programmatic access to Synapse
Apache License 2.0
32 stars 21 forks source link

need to install ffi #259

Closed bswhite closed 4 years ago

bswhite commented 5 years ago

Operating system

Ubuntu

Description of the problem

I needed to install libffi in order to install synapser (presumably the broken software dependencies link indicates this). On ubuntu I did:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

Expected behavior

When I attempted to install synapser install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org")) I got the error message: Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found

What did you expect to happen?

Output of sessionInfo()

sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.2 LTS

Matrix products: default BLAS: /usr/local/lib/R/lib/libRblas.so LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

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

loaded via a namespace (and not attached): [1] compiler_3.6.0 tools_3.6.0

kimyen commented 5 years ago

@bswhite , libffi is a system dependency.

When an R user run the install.packages() command in R, it executing R code to install other R packages. libffi is not an R package, and will not be installed/ configured at the time install.packages() is ran.

Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable

On Windows and Mac, the OS takes care of these low level system dependencies. On Linux environment, the users of the OS have to manage every low level dependencies. It's the OS design. So Linux users should know/learn how to manage these dependencies. At the package level, we do not manage where libffi would be installed already on user's machine. When a user installed this library on Linux, s/he should make it available for other applications to use. Please let us know if you need any help on installing libffi.

If you just need an linux environment with synapser installed, we also provide Dockerfile and Docker images:

brucehoff commented 4 years ago

If the problem persists, please contact https://www.synapse.org/#!SynapseForum:default or synapseInfo@sagebase.org.