-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails for lack of required (and stated, but not tested for) libraries #1
Comments
Thanks! I made this package Windows-only because of a warning with the CRAN checks on Unix, from the BH package, so the package is not acceptable to CRAN. On Windows there's no need of BH since Boost is provided by RTools. I asked the question on StackOverflow about the configure script for Boost, but didn't get any reply. I'd like to require Boost as an external dependency for Unix users. In this way I could drop the restriction to Windows. Cheers. |
I think you may need to demonstrate a preceived failing in BH more clearly. If I installed the missing libaries (which, to your credit) you list in SystemRequirements, your package both installs and checks just fine under Linux (here: Ubuntu 22.04). And I fear you may also underestimate how diffcult Boost is with linking, which is why BH is header-only. A few BioConductor packages tried for Boost Graph algorithms and it is generally tricky as it also generally leads to linking requirement which is why BH is attractive. Anyway, best of luck, I was mostly just curious about a somewhat unusual setup. |
(And if you wanted to check more 'loudly' more the two libraries, a file |
Thanks, I will give a try. I check the package on Ubuntu with a Github action, and there's no warning. But at CRAN there's a warning with the Debian OS. |
You can use Docker to deploy containers for just about any flavour of Linux. The official R container is called So in short, I don't think you can rely on one setup working at GitHub Actions. CRAN famously runs more including Debian setups (in Vienna) and Fedora (in Oxford). |
(Had a look around my machine and repos to find short (shell-based) |
As a very simply proof of concept, there is successful (on attempt, I forgot to flip to Ubuntu 22.04 in the first try) Actions run in a simple fork: https://github.com/eddelbuettel/delaunay/runs/7266688030?check_suite_focus=true (I used my own ci script setup as a test of my recent r2u binaru repo, that required 22.04; feel free to ignore that and try with the standard actions script.) The main changes are
With those changes it builds fine here as I mentioned to you before, and also at GitHub Actions. I also tried r-universe, but that just failed. I had contacted Jeroen about whether his setup was smart enough to auto-install gmp and mpfr (but never heard back), apparently it is not. I'll remove delaunay again from my r-universe matrix to the linked page may disappear. |
And as shown in the GitHub Actions runs that works for both Ubuntu 20.04 (still "ubuntu-latest" at GitHub but otherwise now dated) and 22.04 (my preference now) which are the two flavours supported by my r2u making such tests quick and easy. |
Thanks. Sadly I have two other packages with this issue: SurfaceReconstruction and MeshesOperations. They are wrappers of CGAL too, and they are very nice (and it was a considerable work). The CRAN team discouraged me to submit Windows-only packages (they told me this doesn't respect the CRAN policies). |
Which is why I got curious and tried to help you. The package over in my work builds everywhere where |
But how to deal with the warning? It occurs on Debian. A CRAN member told me this is because the Debian machine uses GCC-12 (not sure to correctly remember this point). |
Have you tried to reproduce this with the compiler used on You keep reiterating that line "only on Debian". So it could be caused by g++-12 and more stringent analysis by the compiler. It could also be a bug. We could (and should !!) replicate it. What you show in that link is a line from Windows which most clearly is not Debian. I think it would help us all if you constructed a replication of the warning. I can help you with Docker tricks as well with Debian / Ubuntu commands to select compilers. Once we have it reproducing we could look at what Boost upstream is saying / if it still reproduces with current Boost version. Maintaining BH is a quite a bit of work / affects many package so I try to update only once year. But that means I may be a little behind in fixes. In short, I am trying to help you. But it would help me if you could make the issue clear and reproducible . The above is not that (yet). (Edited first paragraph as I got in your showing-Windows-when-you-meant-Debian text) |
For example this (older) ci.yaml of mine loops through g++ 7, 8, 9, and 10 on Ubuntu (as we needed that at some point, like a year or two ago). But starting from ubuntu-22.04 rather than ubuntu-latest (which is still 20.04 at GitHub Actions) we could get g++-12. (That is not a reproduction of Vienna's Debian setup for which I would use Debian containers but your package has a few dependencies we'd need to compile each time and I want my CI to run fast which is why I currently prefer Ubuntu and r2u. But g++-12 is what matters so this may be sufficient. I may have time to work on this evening, but not now.) |
This is the same warning as the Windows one. But wait, I will show you the true CRAN warning, I have to change the computer... |
I don't really need a textual line by line copy. I am suggesting you try to find way to reproduce it as only that gives you an ability to develop or test or evaluate alternatives. |
Ok, will try with Github action or Rhub. But here is what Kurt Hornik wrote:
And the warning:
|
That to me makes it 100% clear that you
BH is based on Boost 1.78. Upstream is now at 1.79; this will likely release 1.80 in August. Maybe they changed that? |
I remember I filled an issue on the Boost repo. And I think (not 100% sure) this was this one. The CGAL guys rarely reply (maybe I abuse their patience...). I show them an issue with Valgrind but it looks like they don't care. Ok, good opportunity to try Docker. I used it only one time and I don't remember. But there are some tutos. |
Yes, Boost may be complicated as it is so many people. It helps to have subrepos. But even just being able to reproduce and to say to Kurt Hornik that is purely upstream is a better approach than your current 'oh I just make it Windows only and pretend Debian does not exist'. |
I am glad to see you are trying my files. Would you consider actually acknowledging where those came from? There is zero record in any of the files, and zero record in the commit log. That is not exactly the recommended way to go about it. |
Ok. They work fine, thanks. |
I know they work. I tested them as I wrote them, Did you read the second paragraph too in my previous comment? You took them without attribution or credit which is not exactly fair or common. |
Yes, I've just pushed them with the acknowledgment. |
I haven't buy a new computer yet. Currently, the only computer I have with admin rights is an old laptop with Windows 7. I will try Virtual Box to emulate a Linux machine and try Docker. But I should buy a new computer soon. |
I appreciate that. The only other problem is that you more or less broke my fork my created a parallel instance. The standard, cleaner, multi-user way would have been to try what you did in a branch and leave the main alone where you could then have asked me to submit a pull request,
It's very slow that way though because windows is not fast, and virtual box adds a layer. You can probably get a cheap and 'good enough' PC for Linux a few hundred Euros, or maybe a friend can share an account with you. One other free alternative may be to use the 50 hours / month you can use at gitpod.io. I have gitpod setup and accessible via the bottom part of r2u README to launch a live session (they run on Google Cloud) with the repo I specified. The README even has this animated gif demo showing it. Easy enough to setup. And free Linux at your fingertips -- you get a real shell. Similar (for fewer hours) at Rstudio.cloud. I had in the meantime changed my fork further where the one active active CI file now runs a 'matrix' with g++-11 and g++-12 (both under Ubuntu). I does not seem to replicate the issue Kurt sees. |
Some more news:
You have a good package here. We should make sure it gets the widest possible use. |
A fix !!! : boostorg/container#209 (comment) |
And the CRAN team has fixed something as well. Looks like the warning has gone 👍 |
Nice to know -- they are mostly reasonable (if overworked/overwhelmed) folks. Congrats also on getting qsplines onto CRAN. You remain on a mission. |
Yeah, they've published delaunay. I will submit my two other packages which use RcppCGAL. For qsplines, I feared to not been able to translate the R code to C++, because there is a root-finding and an integral. I was happy to manage, thanks to Boost. Very easy actually with the help of lambda functions. |
The CRANberries post on
delaunay
noted 'OS_type` so I got curious. In a quick Docker container (using my r2u where all required packages can be installed in seconds as binaries) we do seeand indeed you state this unconditionally in
src/Makevars
:(and leaving aside the gymnastics on
BH
which clearly violate theSuggests:
nature, but let's leave that for another day) your (very impressive) journey through R packages is now at the point where you need to deal with external libraries which typically involvesconfigure
to check if package GNU gmp and GNU mpfr are installed (for example viapkg-config --exists gmp && echo "yes"
)pkg-config --libs
(andpkg-config --cflags
) to set the-L
and-I
options.My container is based on Ubuntu jammy so I just did
apt install libgmp-dev libmpfr-dev
after which build succeeded withThe text was updated successfully, but these errors were encountered: