[R-pkg-devel] new package version fails on r-devel fedora clang

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Tue Oct 7 14:08:37 CEST 2025


On 7 October 2025 at 06:34, Tony Wilkes wrote:
| If there is an issue in the compiler CRAN uses, it seems reasonable that CRAN fixes that.

In an ideal world, sure. But please keep in mind that CRAN's resources are
somewhat limited. There are over a thousand of us package maintainers, and
only about four (core) CRAN maintainers looking after the key machines, and a
few CRAN helpers aiding with various tasks.

| I also don't know how to work around a bug in a compiler. How would you even do that?

Maybe rearrange / rewrite your code?  As I mentioned to you (following up
off-list to initial on-list email) when both option values are increased from
level two (which I see used by default on Debian for both -O2 and for
-D_FORTIFY_SOURCE=2; Ubuntu seems to use -D_FORTIFY_SOURCE=3 with -O2) to
level three the compilation of file rcpp_bc_b.cpp takes a really long time
but passes. On Fedora at CRAN it fails, and we do not know if that is an
genuine error or a resource limit.

My first instinct would be to make this file smaller but replacing it with
two, three, ... smaller files that tax the compiler less.
 
| Literally the only concrete thing Brian Ripley said to me was "Taking 5h CPU time to (fail to) install is unreasonable -- resubmitting without addressing the problem more so." Ignoring the fact that I did indeed try to address the problem, the only think I can do (and have been doing), is trying to reduce the compiled size of the C/C++ code, to reduce installation time.
| 
| But if there is a bug in CRAN's compiler, re-submitting will probably just end up getting another fail, regardless of how small the package becomes. That would be a waste of CRAN's time and resources. I appreciate CRAN, and so I don't like wasting their time and resources.

It is still an 'if'. We suggested to you that you need to reproduce it.

I read the (private, I assume) reply by Brian Ripley as indicating that a
resource watcher on his machine killed the compilation. The compilation could
also have been killed. I do not know. I know that I built your package with
the same clang version (as mentioned in my emails) on a different distro (so
under slightly different values).

| @BrianRipley/@CRAN: I'm very willing to submit a package with a significantly smaller compiled size (and thus hopefully faster installation). But I ask again: please be so kind to at least check your clang compiler. Asking me to fix a problem caused by CRAN's own compiler seems unreasonable. If you say the compiler is good or has been fixed, I'll re-submit my package with the reduced size & installation time. Does that sound fair?

If possible, please try to reproduce and then address the issue in a similar
setting. I recommend Docker with a Fedora image, with luck the newest Fedora
Core may have clang21 you can use. Else use Debian as I showed you. Recognize
compilation limits in time and memory and aim to reduce them.  CRAN runs many
builds in parallel, when I noted to you that it took a long time locally I
was doing this on a recent-ish and reasonably able machine with lots of
memory free for that build.

Hope this helps, and that you get your package adjusted.

Cheers, Dirk


| Thanks in advance for your response!
| 
| Kind regards,
| 
| Tony
| 
| ________________________________
| Van: Kevin Ushey <kevinushey using gmail.com>
| Verzonden: maandag 6 oktober 2025 22:25
| Aan: Tony Wilkes <tony_a_wilkes using outlook.com>
| CC: List r-package-devel <r-package-devel using r-project.org>
| Onderwerp: Re: [R-pkg-devel] new package version fails on r-devel fedora clang
| 
| The error log at
| https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/broadcast-00install.html<https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/broadcast-00install.html>
| makes it pretty clear that there's a bug in the compiler being used on
| that CRAN machine, but that might still not absolve you of the
| responsibility of working around the issue.
| 
| At least, this line:
| 
| 5. Running pass "jump-threading" on function
| "_Z16rcpp_bcRel_dec_dP7SEXPRECS0_S0_S0_S0_S0_S0_lid"
| 
| indicates that the bug is happening while compiling the
| 'cpp_bcRel_dec_d' function.
| 
| Is there another way of expressing the computation you're doing in
| that function that might avoid hitting this issue? From a brief scan
| of the code, it's hard to give concrete advice because of the heavy
| use of macros within that code.
| 
| Best,
| Kevin
| 
| On Sun, Oct 5, 2025 at 10:35 AM Tony Wilkes <tony_a_wilkes using outlook.com> wrote:
| >
| > Hello everyone,
| >
| > I have fixed the 'broadcast' package (updated to version 0.1.5.1), but there is still an installation error on r-devel-linux-x86_64-fedora-clang: https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/broadcast-00check.html<https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/broadcast-00check.html>.
| > Either there is still an issue with broadcast, or there is actually an issue with the compiler CRAN uses for fedora.
| > If there is still an issue with broadcast: What exactly is the issue? The install.log is not clear to me.
| > If there is an issue on the side of CRAN: May I respectfully request CRAN to double-check their clang compiler and re-run the checks for broadcast 0.1.5.1?
| >
| > Thanks in advance!
| >
| > Kind regards,
| >
| > Tony
| > ________________________________
| > Van: Tony Wilkes <tony_a_wilkes using outlook.com>
| > Verzonden: vrijdag 3 oktober 2025 18:39
| > Aan: Dirk Eddelbuettel <edd using debian.org>; CRAN <cran-submissions using r-project.org>
| > Onderwerp: Re: [R-pkg-devel] new package version fails on r-devel fedora clang
| >
| > Hi Dirk and CRAN,
| >
| >
| > @Dirk: thanks so much for the trouble!
| >
| > I actually think I know what went wrong. My code is not wrong per-sé.
| > I created an addition if()else() statement in rcpp_bc_b, but left the MACRO - which itself has many if-else statements - the same. And each of those "if" leads to a whole set of for-loops, thus causing the compiled code to become much larger than necessary.
| >
| > It's very easy to fix.
| > But it does feel like a rookie mistake; sorry for the trouble!
| >
| > @CRAN: Sorry! I was wrong, and your system is probably correct. If it's OK with you, I'll send an updated version of 'broadcast' tonight. That should fix the error in the Fedora clang checks.
| >
| > Kind regards,
| >
| > Tony
| >
| >
| >
| >
| > ________________________________
| > Van: Dirk Eddelbuettel <edd using debian.org>
| > Verzonden: vrijdag 3 oktober 2025 17:50
| > Aan: Dirk Eddelbuettel <edd using debian.org>
| > CC: Tony Wilkes <tony_a_wilkes using outlook.com>
| > Onderwerp: Re: [R-pkg-devel] new package version fails on r-devel fedora clang
| >
| >
| > (off list now)
| >
| > On 3 October 2025 at 10:08, Dirk Eddelbuettel wrote:
| > | For another test I ensured I also used -O3 and -D_FORTIFY_SOURCE=3 (switching
| > | from the Debian defaults of 2). There are a number of other flags that
| > | differ, and they may matter.  It still appears to build (if slowly, seems
| > | like there is a fair bit of complex C++ in there). [ Minutes later ] It seems
| > | to hang at compilation of rcpp_bc_b.cpp.
| >
| > It eventually made it, without error, but it took a long time.
| >
| > Hth, Dirk
| >
| > --
| > dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
| >
| >         [[alternative HTML version deleted]]
| >
| > ______________________________________________
| > R-package-devel using r-project.org mailing list
| > https://stat.ethz.ch/mailman/listinfo/r-package-devel<https://stat.ethz.ch/mailman/listinfo/r-package-devel>
| 
| 	[[alternative HTML version deleted]]
| 
| ______________________________________________
| R-package-devel using r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list