Skip to content
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

CRAN packages with -Wpointer-sign warnings External #96

Closed
mbjones opened this issue Jan 10, 2022 · 6 comments
Closed

CRAN packages with -Wpointer-sign warnings External #96

mbjones opened this issue Jan 10, 2022 · 6 comments
Milestone

Comments

@mbjones
Copy link
Member

mbjones commented Jan 10, 2022

Email from CRAN seems to ask us to fix the warnings in the underlying C package:

Seen with both gcc and clang. That is
C50 Cubist RMVL RecordLinkage Rttf2pt1 RxODE blockTools bnstruct not
randaes redland
Please correct before 2022-01-23 to safely retain your package on CRAN.

--
Brian D. Ripley, [email protected]
Emeritus Professor of Applied Statistics, University of Oxford

@gothub let's discuss please in terms of what this would take.

gothub added a commit that referenced this issue Jan 10, 2022
Issue #96 Temporarily fix package compile errors from 'redland.c' until the SWIG package can be updated to product a clean version of this source file.
@gothub
Copy link

gothub commented Jan 10, 2022

The warnings that were reported by CRAN are the same ones that have been with the package for the last few years.

They result from the SWIG generated redland.c file, which contains an incorrect function declaration, for example:

  librdf_digest_update(arg1,(char const *)arg2,arg3);

instead of

  librdf_digest_update(arg1,(unsigned char const *)arg2,arg3);

For a quick fix that will allow a CRAN resubmission before 20220123, I have manually updated redland.c so that the package builds cleanly, i.e. CMD INSTALL --no-multiarch --with-keep.source redland produces no warnings.

With these changes to redland.c, devtools:check() and devtools:test() pass without errors or warnings.

I'll file an issue with https://github.com/swig/swig/issues after creating a simple test file that they can use for debugging.

Note that this compile problem occurs with the most recent SWIG version (SWIG 4.0.2, 2020/06/08), with the unmodified redlands.c file.

I'll also test package build/install on other platforms via rhub and post the results here.

@gothub
Copy link

gothub commented Jan 11, 2022

rhub builds:

  • Fedora Linux, R-devel, clang, gfortran: OK
  • Fedora Linux, R-devel, GCC: OK
  • Debian Linux, R-release, GCC: OK
  • Windows Server 2008 R2 SP1, R-release, 32/64 bit: NOTE
    installed size is 5.9Mb
    sub-directories of 1Mb or more:
    libs 5.0Mb

@cboettig
Copy link
Member

👏 heroic work, Peter!

@mbjones mbjones added this to the 1.0.17-16 milestone Jan 12, 2022
@gothub
Copy link

gothub commented Jan 12, 2022

@mbjones the updated redlands.c file is on the feature-R-compile-errors-#96 branch. Should this be merged now and a new release submitted with just that change?

@mbjones
Copy link
Member Author

mbjones commented Jan 12, 2022

I didn't test it, but if all the tests are passing, then yeah, let's get it in a release. I did ask about whether you wanted to fold that longstanding PR in as well, but that requires a doc rebuild. Your call there. Why don't you merge your branch into develop and we'll prep the release there as usual.

@gothub
Copy link

gothub commented Jan 18, 2022

Fixed in commit 2018aeb

Updated ./src/redland.c directly to fix the compile errors.

@gothub gothub closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants