Re: [R-pkg-devel] set PKG_CONFIG_PATH before installing a package
Thanks Travers and Dirk for your feedbacks. —Sameh From: Travers Ching Sent: Monday, April 8, 2019 10:52 PM To: Dirk Eddelbuettel Cc: Sameh M. Abdulah; r-package-devel@r-project.org Subject: 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 [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] What version does "CRAN check list" refer to ?
Hi Dirk. Thank you very much for your comments. Jose > On 5 Apr 2019, at 13:38, Dirk Eddelbuettel wrote: > > > On 5 April 2019 at 11:29, Jose V. Die wrote: > | I am working on my first package and I released a new version (1.0.11). The > CRAN checks link shows the last updated for today although the check details > section refers to version 1.0.1. > | > | So, I’m confused about it. Are those check results from my old version or > the current version just released? > | > | > | Package : https://cran.r-project.org/web/packages/geneHummus/index.html > | CRAN checks : > https://cran.r-project.org/web/checks/check_results_geneHummus.html > > If you look at the package page you see that > - your new version is the current one _in source form_ > - the binary builds provided are currently _all behind at the previous > version_ > - the results page has a version column and is currently mixed > > It simply takes 24 to 48 hours for the builds jobs to catch up. > > 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] Executable file warning in CRAN check
Let's look at the check_executables() function inside tools:::.check_packages() [https://svn.r-project.org/R/trunk/src/library/tools/R/check.R]. If the 'file' program is available on the check system, the check for executable files is based on what 'file' thinks about each file in the source package. R CMD check essentially scans for the term " executable" in the output from 'file'. The check result therefore depends on the version of 'file' (and on the involved "magic number file") used on the check system. On my system with $ file --version > file-5.25 > magic file from /etc/magic:/usr/share/misc/magic I get $ file src/LZ4/LICENSE > src/LZ4/LICENSE: ASCII text so no complaint about that file from R CMD check. It seems that the version of 'file' used on CRAN's macOS check platforms returns something "executable" for that ASCII file, probably because the executable bit is set. To answer your initial question, I don't think there's anything you need to do on your end. Cheers, Sebastian Am 09.04.19 um 00:56 schrieb Travers Ching: > 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