Closed mdsumner closed 1 year ago
I used this Dockerfile to test with the -Wbitwise-instead-of-logical
in Makevars
FROM tuxmake/clang-15
RUN apt-get update -y ; apt-get install -y curl
RUN curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-latest.tar.gz | tar xz -C /usr/local
RUN rig add devel
RUN mkdir ~/.R
RUN apt-get install -y libc++abi-15-dev libc++-15-dev
RUN printf 'CC = clang\nCXX = clang++ -stdlib=libc++\nCXX11 = clang++ -stdlib=libc++\nCXX14 = clang++ -stdlib=libc++\nCXX17 = clang++ -stdlib=libc++\nCXX20 = clang++ -stdlib=libc++\n' > ~/.R/Makevars
RUN flags="-O2 -g -Wunneeded-internal-declaration -Winvalid-utf8 -Wformat -Wsizeof-pointer-div -Wliteral-conversion -Wempty-body -Wreturn-stack-address -Wnon-c-typedef-for-linkage -Wstrict-prototypes"; \
echo "CFLAGS=$flags" >> ~/.R/Makevars; \
echo "CXXFLAGS=$flags" >> ~/.R/Makevars; \
echo "CXX11FLAGS=$flags" >> ~/.R/Makevars; \
echo "CXX14FLAGS=$flags" >> ~/.R/Makevars; \
echo "CXX17FLAGS=$flags" >> ~/.R/Makevars; \
echo "CXX20FLAGS=$flags" >> ~/.R/Makevars
RUN apt-get install -y nano git libxml2-dev libfontconfig1-dev libharfbuzz-dev libproj-dev libgeos-dev libgdal-dev
RUN export MAKEFLAGS=-j15
RUN R -e 'options(Ncpus = 15); install.packages("remotes"); remotes::install_cran(c("markdown", "spelling", "jsonlite", "raster", "sp", "RcppArmadillo"));'
#docker build . -t hypertidy/clang-wconversion
#docker run -it --rm -v $(pwd):/fasterize hypertidy/clang-wconversion
## now edit src/Makevars.in to put -W ito CPPFLAGS, and:
#R CMD build fasterize --no-build-vignettes
#R CMD INSTALL fasterize_0.?.?.tar.gz > INSTALL.out 2>&1
1.0.4 is on CRAN 🎉, will close this when all the builds complete without warnings
Excellent! Thanks, Dr. Sumner, for taking this on (and also to Noam Ross and to EcoHealth Alliance for having supported development of this package in addition to all of the other terrific work they do).
no issues, all builds clean on CRAN 🙂
TODO
Received this email
I believe this fixes:
https://github.com/mdsumner/fasterize/tree/fix-bitwise-logical
happy to maintain, or submit as PR, or both - to be discussed
CRAN results
(as reported, and seen on 2022-12-05)