Re: [R-pkg-devel] Executable file warning in CRAN check
Thanks Sebastian, I'll give it a shot. It seems weird that I can't replicate the warning on a mac laptop, or any other system. Travers On Mon, Apr 8, 2019 at 2:27 PM Sebastian Meyer wrote: > > No false positive. This file is indeed marked as an executable file, see > also at https://github.com/cran/qs/blob/0.14.1/src/LZ4/LICENSE, which says > > > Executable File | 25 lines (20 sloc) | 1.28 KB > > On a Unix-based system you could do > > > chmod -x src/LZ4/LICENSE > > to remove the executable bit from that file. > > Cheers, > > Sebastian > > > Am 08.04.19 um 23:02 schrieb Travers Ching: > > I see the following warning on CRAN: > > > > Result: WARN > > Found the following executable file: > > src/LZ4/LICENSE > > Source packages should not contain undeclared executable files. > > See section ‘Package structure’ in the ‘Writing R Extensions’ manual. > > https://cran.r-project.org/web/checks/check_results_qs.html > > > > This seems like a false positive since it's clearly not an executable, > > but I'm wondering if there's anything I should do on my end? > > > > Travers > > > > __ > > 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 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Executable file warning in CRAN check
No false positive. This file is indeed marked as an executable file, see also at https://github.com/cran/qs/blob/0.14.1/src/LZ4/LICENSE, which says > Executable File | 25 lines (20 sloc) | 1.28 KB On a Unix-based system you could do > chmod -x src/LZ4/LICENSE to remove the executable bit from that file. Cheers, Sebastian Am 08.04.19 um 23:02 schrieb Travers Ching: > I see the following warning on CRAN: > > Result: WARN > Found the following executable file: > src/LZ4/LICENSE > Source packages should not contain undeclared executable files. > See section ‘Package structure’ in the ‘Writing R Extensions’ manual. > https://cran.r-project.org/web/checks/check_results_qs.html > > This seems like a false positive since it's clearly not an executable, > but I'm wondering if there's anything I should do on my end? > > Travers > > __ > 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] set PKG_CONFIG_PATH before installing a package
What Dirk said! I'd also just add that it's useful to have a fallback in case pkg-config fails, e.g., compile what you need from source. The configure script in RcppRedis looks like a good example of that. Travers Travers On Mon, Apr 8, 2019 at 12:14 PM Dirk Eddelbuettel wrote: > > > On 8 April 2019 at 10:59, Travers Ching wrote: > | I think the correct way to do it is through the configure script. See > | for example the Cairo package that uses pkg-config. Configure scripts > | are slightly hard to work through in my experience, but are worth it > | if you need customization of the installation environment. > > Or from the RcppRedis package you and I stand behind :) > > [...] > > ## ... but check for pkg-config > AC_DEFUN([AC_PROG_PKGCONFIG], [AC_CHECK_PROG(PKGCONFIG,pkg-config,yes)]) > AC_PROG_PKGCONFIG > > ## use pkg-config for hiredis > ## > if test x"${PKGCONFIG}" == x"yes"; then > ## check via pkg-config for hiredis > if pkg-config --exists hiredis; then > ## obtain cflags and obtain libs > hiredis_cxxflags=`pkg-config --cflags hiredis` > hiredis_libs=`pkg-config --libs hiredis` > ## no need to build libhiredis.a > hiredis_tgt="" > else > AC_MSG_WARN([pkg-config exists but hiredis is not available.]) > fi > fi > > ## And make sure these flags are used for the tests below. > CPPFLAGS="${hiredis_cxxflags} ${CPPFLAGS}" > CXXFLAGS="${hiredis_cxxflags} ${CXXFLAGS}" > > [...] > > There is more at > https://github.com/eddelbuettel/rcppredis/blob/master/configure.ac > but is a key part. > > > Another useful trick is to just write a shell script 'configure' as one does > not have to use 'autoconf' to produce 'configure' see eg > https://github.com/Rblp/Rblpapi/blob/master/configure > for that approach, or one of Jeroen's packages. > > > Last but not least you can call 'pkg-config' directly from src/Makevars too. > > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] set PKG_CONFIG_PATH before installing a package
On 8 April 2019 at 10:59, Travers Ching wrote: | I think the correct way to do it is through the configure script. See | for example the Cairo package that uses pkg-config. Configure scripts | are slightly hard to work through in my experience, but are worth it | if you need customization of the installation environment. Or from the RcppRedis package you and I stand behind :) [...] ## ... but check for pkg-config AC_DEFUN([AC_PROG_PKGCONFIG], [AC_CHECK_PROG(PKGCONFIG,pkg-config,yes)]) AC_PROG_PKGCONFIG ## use pkg-config for hiredis ## if test x"${PKGCONFIG}" == x"yes"; then ## check via pkg-config for hiredis if pkg-config --exists hiredis; then ## obtain cflags and obtain libs hiredis_cxxflags=`pkg-config --cflags hiredis` hiredis_libs=`pkg-config --libs hiredis` ## no need to build libhiredis.a hiredis_tgt="" else AC_MSG_WARN([pkg-config exists but hiredis is not available.]) fi fi ## And make sure these flags are used for the tests below. CPPFLAGS="${hiredis_cxxflags} ${CPPFLAGS}" CXXFLAGS="${hiredis_cxxflags} ${CXXFLAGS}" [...] There is more at https://github.com/eddelbuettel/rcppredis/blob/master/configure.ac but is a key part. Another useful trick is to just write a shell script 'configure' as one does not have to use 'autoconf' to produce 'configure' see eg https://github.com/Rblp/Rblpapi/blob/master/configure for that approach, or one of Jeroen's packages. Last but not least you can call 'pkg-config' directly from src/Makevars too. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] set PKG_CONFIG_PATH before installing a package
I think the correct way to do it is through the configure script. See for example the Cairo package that uses pkg-config. Configure scripts are slightly hard to work through in my experience, but are worth it if you need customization of the installation environment. Travers On Mon, Apr 8, 2019 at 10:46 AM Sameh M. Abdulah wrote: > > I am using this command to set an environment variable ` > Sys.setenv(PKG_CONFIG_PATH=paste(Sys.getenv('PKG_CONFIG_PATH'),paste(.libPaths(),'my_package/lib/pkgconfig',sep='/',collapse=':'),sep=':'));’ > before install my package. It works fine if I run it before installing my > package. > > How can I do this inside my package so that CRAN can execute it by default. > > --Sameh > > [[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
[R-pkg-devel] set PKG_CONFIG_PATH before installing a package
I am using this command to set an environment variable ` Sys.setenv(PKG_CONFIG_PATH=paste(Sys.getenv('PKG_CONFIG_PATH'),paste(.libPaths(),'my_package/lib/pkgconfig',sep='/',collapse=':'),sep=':'));’ before install my package. It works fine if I run it before installing my package. How can I do this inside my package so that CRAN can execute it by default. --Sameh [[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] Use lpSolve to another R package
On 08.04.2019 12:19, Τόλης Χαλκής wrote: Dear all, We have developed an R package written in C++ with Rcpp wrappers https://github.com/GeomScale/volume_approximation We use the C code from lpSolveAPI ( https://cran.r-project.org/web/packages/lpSolveAPI/index.html). We have added the code with no changes in folder ./src/lp_solve. We want to submit the package to CRAN. Thus my question is how we have to declare the usage of lpSolve code in the description file? Do we have to add the Authors to the Authors@R field? Thanks in advance, Apostolos Chalkis [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel If you use the other package as a dependency, simply declarfe this in the DESCRIPTION file. If you copy code, check whether the license allows for it and be sure to mention all relevant authors and copyright holders also in your Authors@R field in the DESCRIPTION file. Best, Uwe Ligges __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Use lpSolve to another R package
Dear all, We have developed an R package written in C++ with Rcpp wrappers https://github.com/GeomScale/volume_approximation We use the C code from lpSolveAPI ( https://cran.r-project.org/web/packages/lpSolveAPI/index.html). We have added the code with no changes in folder ./src/lp_solve. We want to submit the package to CRAN. Thus my question is how we have to declare the usage of lpSolve code in the description file? Do we have to add the Authors to the Authors@R field? Thanks in advance, Apostolos Chalkis [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel