[R-pkg-devel] Rglpk on Linux
Dear R developer list, I want to add 'Rglpk' as a dependency to a package. On windows and MacOS everything works fine, but there seem to be installation issues with the underlying optimization software 'GLPK' on Linux systems. The problem occurs when testing on Rhub and on Travis (I don't have a local Linux machine available): https://builder.r-hub.io/status/eatATA_0.9.0.tar.gz-bbf79f5120bc435d89eb4ea3f5b62918 https://travis-ci.org/github/beckerbenj/eatATA/jobs/743971533 with the error message: * installing *source* package ‘Rglpk’ ... ** package ‘Rglpk’ successfully unpacked and MD5 sums checked ** using staged installation ** libs /bin/bash: line 0: cd: GLPK: No such file or directory Makevars:10: recipe for target 'GLPK.ts' failed make: *** [GLPK.ts] Error 1 ERROR: compilation failed for package ‘Rglpk’ I am aware that there are other/similar reports of Rglpk installation problems on Linux (e.g. https://stackoverflow.com/questions/25114771/glpk-no-such-file-or-directory-error-when-trying-to-install-r-package) But other reverse dependencies of Rglpk on CRAN do not appear to have these issues (e.g. mknapsack, MSCMT, npbr ...)? Thanks, Benjamin [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Rglpk on Linux
Hi, on R-hub's Linux builders it is automatically installed if needed, except that it wasn't on Fedora, because of a bug. Please try again, and if it does not work report an issue on R-hub. On Travis, you'll need to install the required packages yourself in the `.travis.yml` file. On CRAN's machines it should be installed, so nothing to worry about there. If you don't have a Linux machine, but you have a fairly recent macOS or Windows computer, then you can run Linux in Docker. If you ever need to debug issues on Linux. Gabor On Fri, Nov 27, 2020 at 1:33 PM Benjamin Becker wrote: > > Dear R developer list, > > I want to add 'Rglpk' as a dependency to a package. On windows and MacOS > everything works fine, but there seem to be installation issues with the > underlying optimization software 'GLPK' on Linux systems. The problem > occurs when testing on Rhub and on Travis (I don't have a local Linux > machine available): > > https://builder.r-hub.io/status/eatATA_0.9.0.tar.gz-bbf79f5120bc435d89eb4ea3f5b62918 > > https://travis-ci.org/github/beckerbenj/eatATA/jobs/743971533 > > with the error message: > > * installing *source* package ‘Rglpk’ ... > > ** package ‘Rglpk’ successfully unpacked and MD5 sums checked > > ** using staged installation > > ** libs > > /bin/bash: line 0: cd: GLPK: No such file or directory > > Makevars:10: recipe for target 'GLPK.ts' failed > > make: *** [GLPK.ts] Error 1 > > ERROR: compilation failed for package ‘Rglpk’ > I am aware that there are other/similar reports of Rglpk installation > problems on Linux (e.g. > https://stackoverflow.com/questions/25114771/glpk-no-such-file-or-directory-error-when-trying-to-install-r-package) > But other reverse dependencies of Rglpk on CRAN do not appear to have > these issues (e.g. mknapsack, MSCMT, npbr ...)? Thanks, Benjamin > > > [[alternative HTML version deleted]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Rglpk on Linux
On 27 November 2020 at 12:05, Benjamin Becker wrote: | I want to add 'Rglpk' as a dependency to a package. On windows and MacOS | everything works fine, but there seem to be installation issues with the | underlying optimization software 'GLPK' on Linux systems. The problem | occurs when testing on Rhub and on Travis (I don't have a local Linux | machine available): | | https://builder.r-hub.io/status/eatATA_0.9.0.tar.gz-bbf79f5120bc435d89eb4ea3f5b62918 | | https://travis-ci.org/github/beckerbenj/eatATA/jobs/743971533 | | with the error message: | | * installing *source* package ‘Rglpk’ ... | | ** package ‘Rglpk’ successfully unpacked and MD5 sums checked | | ** using staged installation | | ** libs | | /bin/bash: line 0: cd: GLPK: No such file or directory | | Makevars:10: recipe for target 'GLPK.ts' failed | | make: *** [GLPK.ts] Error 1 | | ERROR: compilation failed for package ‘Rglpk’ | I am aware that there are other/similar reports of Rglpk installation | problems on Linux (e.g. | https://stackoverflow.com/questions/25114771/glpk-no-such-file-or-directory-error-when-trying-to-install-r-package) | But other reverse dependencies of Rglpk on CRAN do not appear to have | these issues (e.g. mknapsack, MSCMT, npbr ...)? Thanks, Benjamin Make sure you have Ubuntu package libglpk-dev installed (which can typically control at your CI level though not at RHub). It will pull the runtime package libglpk40 in. Or, better still, enable the Rutter PPAs, or the RSPM, for your CI runs because then you can just install Rglpk premade. I like bspm for this; below you can see the full command log just running 'install.packages("Rglpk")' on a bspm-enabled system backed by the PPA (and I have written some more at my blog about all this, follow the URL below to blog and scroll, or google-search). It also install package slam premade and whatever is needed. (It's Docker demo, so once the install concludes it ends the demo.) Hth, Dirk edd@rob:~$ docker run --rm -ti rocker/r-bspm:20.04 Rscript -e 'install.packages("Rglpk")' Loading required package: utils Tracing function "install.packages" in package "utils" Install system packages as root... Reading package lists... Done Building dependency tree Reading state information... Done Get:1 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal InRelease [18.1 kB] Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Hit http://archive.ubuntu.com/ubuntu focal InRelease Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Hit http://ppa.launchpad.net/edd/r-4.0/ubuntu focal InRelease Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Hit http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal InRelease Get:5 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [643 kB] Get:6 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.4 kB] Get:7 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [126 kB] Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [466 kB] Get:9 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [871 kB] Get:10 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main Sources [1745 kB] Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [850 kB] Get:12 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4248 B] Get:13 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main amd64 Packages [837 kB] Fetched 5913 kB in 0s (0 B/s)
[R-pkg-devel] submitting two packages simultaneously
Dear All, I plan to submit a package I created called spNetwork. The package uses both Rcpp and parallelization to ensure reasonable calculation time. However, it is currently not possible to pass a compiled function to a child process. The recommended workaround is to store compiled functions in an existing package. So I put the worker functions using Rcpp in a separate package called spNetworkCpp and everything works like a charm (all tests and checks passed). To submit spNetwork to CRAN, how should I proceed? Should I submit spNetworkCpp first, then spNetwork? Thank you in advance All the best, Jeremy Gelb __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] submitting two packages simultaneously
On Fri, 27 Nov 2020 at 17:20, jérémy Gelb wrote: > > Dear All, > > I plan to submit a package I created called spNetwork. The package > uses both Rcpp and parallelization to ensure reasonable calculation > time. However, it is currently not possible to pass a compiled > function to a child process. The recommended workaround is to store > compiled functions in an existing package. So I put the worker > functions using Rcpp in a separate package called spNetworkCpp and > everything works like a charm (all tests and checks passed). Probably I'm missing something, but why do you need the functions in a separate package? > To submit > spNetwork to CRAN, how should I proceed? Should I submit spNetworkCpp > first, then spNetwork? Yes, this is the way (pun intended). Iñaki > > Thank you in advance > All the best, > > Jeremy Gelb > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Iñaki Úcar __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] submitting two packages simultaneously
On 27 November 2020 at 11:18, jérémy Gelb wrote: | I plan to submit a package I created called spNetwork. The package | uses both Rcpp and parallelization to ensure reasonable calculation | time. However, it is currently not possible to pass a compiled | function to a child process. The recommended workaround is to store | compiled functions in an existing package. Yes, that is the usual recommendation. Beats recompiling the function on each worker node. | So I put the worker | functions using Rcpp in a separate package called spNetworkCpp and | everything works like a charm (all tests and checks passed). To submit | spNetwork to CRAN, how should I proceed? Should I submit spNetworkCpp | first, then spNetwork? Sounds good to me. And if the former is a dependency of the later you need to sequence it that way. Unless maybe you would want to keep it simpler and keep everything in _one_ package so that the child processes would load the same package. That way you also avoid possible 'version skew' if the main packages and the client package are not aligned. Dirk -- https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel