Closed dankelley closed 2 months ago
Hm, at https://cran.r-project.org/doc/manuals/R-exts.html#index-R_005fCalloc I see that there is R_Calloc()
etc. A few lines down from that spot in the manual, I see as follows. My guess is that the fix is merely to use those macros. But are they defined in R.h
, or where?
Historically the macros Calloc, Free and Realloc were used, and these remain available unless STRICT_R_HEADERS was defined prior to the inclusion of the header.
I can reproduce the message with
clang -arch x86_64 -DSTRICT_R_HEADERS=1 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o
Hm. Local tests work fine but a remote one fails with a not-helpful error message when I run it interactively, but works when I run my check script with Rscript. I think this is a hickup with how things are done interactively.
I'll look into this in more detail later today.
Also, the check_package.R
script uses the old rhub. Switching to the new one is tricky in this way, but I think it's not hard with a github action. If I'm right in that, I'll switch to testing that way. (The rhub tests are always a pain. But at least gsw does not need to use the ncdf4 package, so I think the 6-month-old in ncdf4 building won't be a roadblock, as it is for oce.)
All the remote checks worked fine, as the revdep checks did.
On the GSW-R page I see
CRAN checks: | gsw results [issues need fixing before 2024-09-20]
so we ought not to delay much.
I'll rebuild oce with this trial update to gsw, and if that works, I will likely submit gsw to CRAN later today, unless a co-developer objects.
I also noticed some problems with the badges in README.md
so I've fixed them as well.
I forgot that @richardsc is still out of contact, so I am not going to wait until we can discuss this in person. I am doing my normal suite of local and remote tests, and if they all pass, I'll submit to CRAN as early as later today. After all, the conversion from Calloc()
to R_Calloc()
is something I did a long time ago in the oce package, so I know for sure that the simple search-replace operation is sufficient, given that the package builds and checks.
Ah, not a "future" problem, really ... below is an email I got today
Dear maintainer,
Please see the problems shown on https://cran.r-project.org/web/checks/check_results_gsw.html.
Specifically, please see the Strict additional issue.
Compilation fails with _R_USE_STRICT_RHEADERS=true, which defines STRICT_R_HEADERS to 1 which removes
The aim is to clean the namespace: in particular having a definition for Free has conflicted with some packages' C++ code.
It is planned that STRICT_R_HEADERS=1 will become the default for 4.5.0, which in particular makes it necesssary that all CRAN packages with many strong reverse dependencies compile/install ok with the new default.
Your package is among the ones with many strong reverse dependencies. We would thus really appreciate if you could provide a new version of your package as soon as possible which checks ok with STRICT_R_HEADERS=1.
You can verify that your package checks ok with STRICT_R_HEADERS=1 via R CMD check --as-cran using a current version of R-devel.
Please correct before 2024-09-20 to safely retain your package on CRAN.
Best, -k
I just submitted a new version to CRAN (see Details below). It normally takes an hour or so before I hear back about problems, and a few days before all the test builds finish. I will. keep this issue open until all is okay and gsw
has been updated on the CRAN servers.
The first hurdle has been passed (see Details for the email I received).
Second hurdle passed as I was making note of the first one :-)
Just one test machine to go. I expect to close this issue in a day or two, when that completes. I check about once a day or 2 days.
I'm closing this now, since all the test machines have now built gsw and checked it, with no reported NOTEs, WARNINGs or ERRORs.
At https://www.stats.ox.ac.uk/pub/bdr/Strict/gsw.out, the following errors are reported. That machine uses "strict" checking. I will look into fixing this. I learned of this following a submission of
oce
to CRAN. From the formatting of the webpage, I get the impression that fixing this is not mandatory, but I suppose CRAN might switch to "strict" checking as a standard, so I ought to address this now and make a new release.I want to speak with @richardsc before making a release, though. There may be something else that ought to be done. (I don't think so, actually. I try to keep up with GSW-C changes, and these are the kernel of actions here.)