[R] How Can I Build a Standalone Binary
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Fri Aug 7 13:50:00 CEST 2020
Wouldn't it be easier to set up a Shiny host system, and just give your
collaborators a URL to the Shiny app running there?
Duncan Murdoch
On 06/08/2020 5:32 p.m., Knecht, Logan wrote:
> Hello all,
>
> ===== The short version =====
>
> I am trying to build a standalone version for R so that I can bundle and package a self-hosted environment for a shiny app. There are reasons for this decision, but it will only distract from the discussion.
>
> The inspiration for this comes from here:
> https://www.youtube.com/watch?v=ARrbbviGvjc
> and here
> https://github.com/dirkschumacher/r-shiny-electron
>
> I have tried these solutions, to no avail as I repeatedly encounter issues with the process. Some issues have been difficulties importing libraries after repeating their steps, others have been issues with missing dynamic libraries that aren't available when I build from source.
>
> ===== Questions =====
>
> - How is the R binary at this link created?
> - Link: https://cloud.r-project.org/bin/macosx/R-4.0.2.pkg
> - How do I include `libgfortran.5.dylib`
> - This distributable, when configured shows a file called `libgfortran.5.dylib`
> - As of this writing, my solution fails because this is missing when I run the self-hosted R
> - Is there any guidance on how to build a self-hosted R executable for each operating system?
> - OSX
> - Linux
> - Windows
>
> ===== The long version =====
>
> ----- The Goal -----
>
> Create a self hosted version of R that runs independent of each system so that I can package and build shiny apps to be distributed to collaborators in order to evangelize our new statistical method.
>
> ----- The Impetus -----
>
> It is too distracting and too much work to get our collaborators to configure their environments just to try our statiscal methods we have been creating.
>
> We have a shiny app built around the statistical methods to simplify the interface for interaction. Now we want to package it for easy consumption.
>
> It should be as simple as downloading an application and running it.
>
> ----- The Current Progress -----
>
> I have a repo here that is an electron application
>
> https://github.com/FredHutch/FAUST_Nextflow_Desktop/tree/research/create_r_4_0_2_build-dev
>
> I can bundle these resources without issues
>
> - Java
> - Nextflow
> - Our Shiny App
>
> ----- Process -----
> The only missing piece is `R`
>
> I have a set of environment variables here:
> https://github.com/FredHutch/FAUST_Nextflow_Desktop/blob/research/create_r_4_0_2_build-dev/electron_faust_nextflow_desktop/app/binaries/r/build_environment_variables.env
>
> I `source` the env variables and then I run this script here:
> `https://github.com/FredHutch/FAUST_Nextflow_Desktop/blob/research/create_r_4_0_2_build-dev/electron_faust_nextflow_desktop/app/binaries/r/download_r_osx.sh`
>
> I then use the downloaded `R` to install dependencies with these scripts:
>
> - https://github.com/FredHutch/FAUST_Nextflow_Desktop/blob/research/create_r_4_0_2_build-dev/electron_faust_nextflow_desktop/app/binaries/r/install_r_dependencies.r
> - https://github.com/FredHutch/FAUST_Nextflow_Desktop/blob/research/create_r_4_0_2_build-dev/electron_faust_nextflow_desktop/app/binaries/r/install_r_cran_dependencies.r
> - https://github.com/FredHutch/FAUST_Nextflow_Desktop/blob/research/create_r_4_0_2_build-dev/electron_faust_nextflow_desktop/app/binaries/r/install_r_biocmanager_dependencies.r
>
> And then voilà! It works. Well. It works on my local machine. I can run the development build, I can package the build, I can run the release after installing it. Everything works.
>
> Except when I bring it over to a separate computer it doesn't work because it states that it can't find `libgfortran.5.dylib`. See the attached screen shot.
>
> ===== The Plea For Guidance =====
>
> I would love any help to figure out how to achieve this. We are very close to somethng tangibly interesting and it's very deflating to be blocked because `R` does not have a distributable that can be bundled.
>
> Any guidance or suggestions are greatly appreciated!
>
> Warm Regards,
>
> Logan Knecht
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list