[R-pkg-devel] Fixing travis build fail due to fftwtools fatal error (fftw3.h: No such file or directory)

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Fri Sep 11 19:39:19 CEST 2020


Hi Karim,

On 11 September 2020 at 13:09, Karim Rahim wrote:
| Thanks for resolving this! It's been awhile since I've worked on this...
| 
| So for dependencies, I'd like to keep it as simple as possible. I agree
| fftw3 may need to be updated.
| 
| It's my understanding that if one were to install the latest fftw (3.3.8)
| from source then it would expose the header file.

Not necessarily and it depends on how the package is setup.

In general you want a '-dev' or '-devel' package but I do not know what this
one is called in the Fedora/RH/CentOS world.
 
| Is this incorrect?
| 
| If this is the case, then it becomes about the various distribution
| specific packages.
| So then I want to aim people in the right direction.
| 
| How about?
| 
| fftw3 (>= 3.1.2; ensure fftw3.h is exposed - libfftw3-dev in Ubuntu)

So per the above I would suggest you reconsider the curl example I emailed
earlier and do something like

  fftw3 development package: libfftw3-dev (deb), ..... (rpm)

Maybe someone can help with the rpm package name.

Cheers, Dirk

| 
| Kind Regards,
| Karim
| 
| 
| 
| 
| 
| On Fri, Sep 11, 2020 at 11:20 AM Dirk Eddelbuettel <edd using debian.org> wrote:
| >
| >
| > On 10 September 2020 at 14:14, Marta Karaś wrote:
| > | Adding the following to .travis.yml:
| > |
| > | before_install:
| > |   - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -y install
| > | libfftw3-dev ; fi
| > |
| > | did the trick!
| >
| > I think that is an example of the issue discussed in this blog post:
| >   http://dirk.eddelbuettel.com/blog/2020/08/26#029_introducing_bspm
| >
| > The RSPM system gets you the package, but it is by its (on purpose simple)
| > design disconnected and unaware of the dependency required which sent you
| > down a rabbit hole. (One could also suggest that maybe Karim should expand
| >    SystemRequirements:  fftw3 (>= 3.1.2)
| > to maybe list the packages offering fftw3 _headers_. Jeroen uses a pattern
| > for this, eg curl has
| >    SystemRequirements:  libcurl: libcurl-devel (rpm) or
| libcurl4-openssl-dev (deb).
| > which is already one step better.)
| >
| > Only systems with actual dependency resolution can go further, but it is
| hard
| > to do that cross-platform / cross-OS.  On Linux we have both BSPM
| utilising
| > the existing rpm and deb binaries, respectively, maintained by tireless
| > volunteers, as well as the older use of directly using the binaries.
| >
| > Eg looking at the Ubuntu binary from the Rutter PPA shows that
| > r-cran-fftwtools will bring the fftw3 runtime in:
| >
| >    docker using 08d894be427a:/work$ apt-cache show r-cran-fftwtools | grep
| ^Depends
| >    Depends: r-base-core, libfftw3-double3 (>= 3.3.5)
| >    docker using 08d894be427a:/work$
| >
| > That would be an easier binary install as it skips the 'from source' build
| > step that sent Marta hunting for the required header.
| >
| > If I find some time I will try to set up some Travis CI examples utilizing
| > BSPM.  Until then, one can do as I have done for over half a decade and
| point
| > Travis CI to these binaries via the (still maintained and simple) r-travis
| > setup.  Works for me.  See http://eddelbuettel.github.io/r-travis/  and
| > numerous .travis.yml in packages of mine and a few other users.
| >
| > Dirk
| >
| > | Thank you both for your attention to this issue!
| > |
| > | Bests,
| > | Marta Karas
| > |
| > |
| > |
| > |
| > |
| > | On Thu, Sep 10, 2020 at 8:35 AM Karim Rahim <karim.rahim using gmail.com>
| wrote:
| > |
| > | > Thanks,
| > | >
| > | > That may be it. It is a missing dependency.
| > | >
| > | > It's been a while and I'm not sure which package exposes fftw3.h ...
| > | >
| > | > Karim
| > | >
| > | > On Thu, Sep 10, 2020 at 8:16 AM Dirk Eddelbuettel <edd using debian.org>
| wrote:
| > | >
| > | >>
| > | >> On 9 September 2020 at 23:45, Karim Rahim wrote:
| > | >> |  sudo apt-get install -y fftw3
| > | >>
| > | >> Or maybe rather
| > | >>
| > | >>    sudo apt-get install libfftw3-dev
| > | >>
| > | >> to get the development headers?
| > | >>
| > | >> Dirk
| > | >>
| > | >> | Then try again.
| > | >> |
| > | >> | Let me know if it doesn't work.
| > | >> |
| > | >> | Cheers!
| > | >> | Karim
| > | >> |
| > | >> | On Wed, Sep 9, 2020 at 10:27 PM Max Turgeon <
| Max.Turgeon using umanitoba.ca>
| > | >> wrote:
| > | >> | >
| > | >> | > Hi Marta,
| > | >> | >
| > | >> | > One change I can see from your Git history that seems to match
| the
| > | >> first failed build on Travis is when you added "Imports: fftwtools"
| to your
| > | >> DESCRIPTION file. And it makes sense, because if we look at its
| DESCRIPTION
| > | >> file, we can see that it has fftw3 as a SystemRequirements. In other
| words,
| > | >> it needs to be installed on Travis before you can run the checks on
| your
| > | >> package.
| > | >> | >
| > | >> | > As for solutions, I can see that Karim wrote a short description
| of
| > | >> how to install the library on Linux, and there's a link for Mac; all
| this
| > | >> is on the Github repo: https://github.com/krahim/fftwtools
| > | >> | >
| > | >> | > I also noticed that there is an R package wrapping fftw on CRAN (
| > | >> https://cran.r-project.org/package=fftw) and I can see that it's a
| > | >> Suggested package for fftwtools. I haven't tried it, but presumably
| you
| > | >> could install the fftw R package, instead of the fftw3 library.
| > | >> | >
| > | >> | > HTH,
| > | >> | >
| > | >> | > Max Turgeon
| > | >> | > Assistant Professor
| > | >> | > Department of Statistics
| > | >> | > Department of Computer Science|
| >  >> | > University of Manitoba
| > | >> | > maxturgeon.ca
| > | >> | >
| > | >> | >
| > | >> | >
| > | >> | > ________________________________
| > | >> | > From: R-package-devel <r-package-devel-bounces using r-project.org> on
| > | >> behalf of Marta Karaś <marta.karass using gmail.com>
| > | >> | > Sent: Wednesday, September 9, 2020 9:09 PM
| > | >> | > To: package-develop <r-package-devel using r-project.org>
| > | >> | > Cc: karim.rahim using queensu.ca <karim.rahim using queensu.ca>
| > | >> | > Subject: [R-pkg-devel] Fixing travis build fail due to fftwtools
| > | >> fatal error (fftw3.h: No such file or directory)
| > | >> | >
| > | >> | > ********************************************************
| > | >> | > Caution: This message was sent from outside the University of
| > | >> Manitoba.
| > | >> | > ********************************************************
| > | >> | >
| > | >> | > Dear all,
| > | >> | >
| > | >> | > I have been facing travis build fail on linux xenial due to
| *fftwtools
| > | >> | > fatal error* (fftw3.h: No such file or directory) with my R
| package.
| > | >> The
| > | >> | > error appeared at a random time a few months ago (at a random
| time :=
| > | >> I do
| > | >> | > not link it with any fftwtools-function related change commit I
| did)
| > | >> and
| > | >> | > persists.
| > | >> | >
| > | >> | > There is not much I achieved in googling and trying to decipher
| it,
| > | >> sadly;
| > | >> | > I am hoping maybe some Community members saw a similar error with
| > | >> their dev
| > | >> | > work and can suggest a hint/solution?
| > | >> | >
| > | >> | > Package GitHub: https://github.com/martakarass/runstats
| > | >> | > Failed Travis job log:
| > | >> | > https://travis-ci.com/github/martakarass/runstats/jobs/383037333
| > | >> | >
| > | >> | > Error excerpt:
| > | >> | >
| > | >> | > * installing *source* package ‘fftwtools’ ...
| > | >> | > ** package ‘fftwtools’ successfully unpacked and MD5 sums checked
| > | >> | > ** using staged installation
| > | >> | > ** libs
| > | >> | > gcc -I"/opt/R/4.0.2/lib/R/include" -DNDEBUG
|  -I/usr/local/include
| > | >>  -fpic
| > | >> | >  -g -O2  -c fftwtools.c -o fftwtools.o
| > | >> | > fftwtools.c:28:18: fatal error: fftw3.h: No such file or
| directory
| > | >> | > compilation terminated.
| > | >> | > /opt/R/4.0.2/lib/R/etc/Makeconf:167: recipe for target
| 'fftwtools.o'
| > | >> failed
| > | >> | > make: *** [fftwtools.o] Error 1
| > | >> | > ERROR: compilation failed for package ‘fftwtools’
| > | >> | > * removing ‘/home/travis/R/Library/fftwtools’
| > | >> | > Error in i.p(...) :
| > | >> | >   (converted from warning) installation of package ‘fftwtools’
| had
| > | >> non-zero
| > | >> | > exit status
| > | >> | > Calls: <Anonymous> ... with_rprofile_user -> with_envvar ->
| force ->
| > | >> force
| > | >> | > -> i.p
| > | >> | > Execution halted
| > | >> | > The command "Rscript -e 'deps <-
| > | >> remotes::dev_package_deps(dependencies =
| > | >> | > NA);remotes::install_deps(dependencies = TRUE);if
| (!all(deps$package
| > | >> %in%
| > | >> | > installed.packages())) { message("missing: ",
| > | >> paste(setdiff(deps$package,
| > | >> | > installed.packages()), collapse=", ")); q(status = 1, save =
| "no")}'"
| > | >> | > failed and exited with 1 during .
| > | >> | > Your build has been stopped.
| > | >> | >
| > | >> | >
| > | >> | > Thank you,
| > | >> | >
| > | >> | > Marta
| > | >> | >
| > | >> | >         [[alternative HTML version deleted]]
| > | >> | >
| > | >> | > ______________________________________________
| > | >> | > R-package-devel using r-project.org mailing list
| > | >> | > https://stat.ethz.ch/mailman/listinfo/r-package-devel
| > | >> |
| > | >> | ______________________________________________
| > | >> | R-package-devel using r-project.org mailing list
| > | >> | https://stat.ethz.ch/mailman/listinfo/r-package-devel
| > | >>
| > | >> --
| > | >> https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
| > | >>
| > | >
| >
| > --
| > https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list