[R-pkg-devel] Warnings from upstream C library in CRAN submission

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Sat Feb 3 22:52:56 CET 2024


Satyaprakash,

those are clear bugs in the SUNDIALS library - they assume that "unsigned long" type is 64-bit wide (that assumption is also mentioned in the comments), but there is no such guarantee and on Windows it is only 32-bit wide, so the code has to be changed to replace "unsigned long" with the proper unsigned 64-bit type which is uint64_t. The code is simply wrong and won't work unless those issues are solved, so those are not just warnings but actual errors. It would be also prudent to check the rest of the code in the library for similar incorrect use of the "long" type where 64-bit use was intended.

Cheers,
Simon


> On Feb 4, 2024, at 4:38 AM, Satyaprakash Nayak <sn248 using cornell.edu> wrote:
> 
> Hi
> 
> I had a package 'sundialr' which was archived from CRAN. It is an interface
> to some of the solvers in SUNDIALS ODE Solving library. I have fixed the
> issue which was related to emails being forwarded from the maintainer's
> email address.
> 
> The repository code can be found at - https://github.com/sn248/sundialr
> 
> I have updated the upstream library and now I am getting the following
> warnings from CRAN which are all related to the upstream library. The
> package compiles without any other issues and can be used.
> 
> Flavor: r-devel-windows-x86_64
> Check: whether package can be installed, Result: WARNING
>  Found the following significant warnings:
>    ./sundials/sundials/sundials_hashmap.h:26:48: warning: conversion from
> 'long long unsigned int' to 'long unsigned int' changes value from
> '14695981039346656037' to '2216829733' [-Woverflow]
>    ./sundials/sundials/sundials_hashmap.h:27:48: warning: conversion from
> 'long long unsigned int' to 'long unsigned int' changes value from
> '1099511628211' to '435' [-Woverflow]
>    sundials/sundials/sundials_hashmap.h:26:48: warning: conversion from
> 'long long unsigned int' to 'long unsigned int' changes value from
> '14695981039346656037' to '2216829733' [-Woverflow]
>    sundials/sundials/sundials_hashmap.h:27:48: warning: conversion from
> 'long long unsigned int' to 'long unsigned int' changes value from
> '1099511628211' to '435' [-Woverflow]
>    sundials/sundials/sundials_profiler.c:71:24: warning: function
> declaration isn't a prototype [-Wstrict-prototypes]
>  See 'd:/RCompile/CRANincoming/R-devel/sundialr.Rcheck/00install.out' for
> details.
>  Used C++ compiler: 'g++.exe (GCC) 12.3.0'
> 
> Flavor: r-devel-linux-x86_64-debian-gcc
> Check: whether package can be installed, Result: WARNING
>  Found the following significant warnings:
>    sundials/sundials/sundials_profiler.c:71:41: warning: a function
> declaration without a prototype is deprecated in all versions of C
> [-Wstrict-prototypes]
>  See '/srv/hornik/tmp/CRAN/sundialr.Rcheck/00install.out' for details.
>  Used C++ compiler: 'Debian clang version 17.0.6 (5)'
> 
> I am hesitant to change anything in the SUNDIALS library C code because I
> don't understand the consequences of changing anything there.
> 
> Any help will be kindly appreciated.
> 
> Thank you.
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 



More information about the R-package-devel mailing list