Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Inconsistencies with CRAN fedora-clang-devel #63

Open
gowerc opened this issue Oct 28, 2022 · 4 comments
Open

Inconsistencies with CRAN fedora-clang-devel #63

gowerc opened this issue Oct 28, 2022 · 4 comments

Comments

@gowerc
Copy link

gowerc commented Oct 28, 2022

We have been trying to track down a bug in our package that only appears on CRAN fredora-clang-devel. Whilst investigating it looks like there are a number of inconsistencies between the image on Rhub vs what CRAN are running. That being said I'm not very experienced with this system configuration stuff so apologies if I have got this wrong.

In particular:

  • It looks like you are using Fedora 33 whilst they are using Fedora 36

  • They are using clang-15 whereas it looks like you are using the rpms clang which appears to be clang-11

  • It looks like you are using different Makevars compared to them

The impact though is that my unit tests are running fine on your image via rhub::check(platform = "fedora-clang-devel") even though they are failing to run on CRAN.

@jameslamb
Copy link
Contributor

I've observed the same thing with the debian-clang-devel images.

The images are using clang 14

docker run \
    --rm \
    rhub/debian-clang-devel:latest \
    clang --version
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix

But according to https://cran.r-project.org/web/checks/check_flavors.html#r-devel-linux-x86_64-debian-clang, CRAN is using clang 15.

Screen Shot 2023-01-04 at 2 28 41 PM

@jameslamb
Copy link
Contributor

Over in {lightgbm}, we recently experienced an issue where CRAN raised a warning for the r-devel-linux-x86_64-debian-clang check flavor (link to logs) that we didn't observe running R CMD check --as-cran in the rhub/debian-clang-devel image published here.

Found the following significant warnings:
  io/json11.cpp:207:47: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
  ...

microsoft/LightGBM#5661

I just found that I was able to reproduce the warning I see over on CRAN by running the following in a container using that image, to upgrade to clang v15.

# remove clang stuff that comes installed in the image
apt-get autoremove -y --purge \
    clang-* \
    libclang-* \
    libunwind-* \
    llvm-*

# download equivalent clang-15 packages
apt-get update -y
apt-get install --no-install-recommends -y \
    gnupg \
    lsb-release \
    software-properties-common \
    wget

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -

add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main"
apt-get install -y --no-install-recommends \
    clang-15 \
    clangd-15 \
    clang-format-15 \
    clang-tidy-15 \
    clang-tools-15 \
    lldb-15 \
    lld-15 \
    llvm-15-dev \
    llvm-15-tools \
    libomp-15-dev \
    libc++-15-dev \
    libc++abi-15-dev \
    libclang-common-15-dev \
    libclang-15-dev \
    libclang-cpp15-dev \
    libunwind-15-dev

# overwrite everything in /usr/bin with the new v15 versions
cp --remove-destination /usr/lib/llvm-15/bin/* /usr/bin/

@gaborcsardi @maelle are you open to a pull request with something similar to this, to upgrade the debian and fedora images to clang 15? I'd be happy to work on such a change, test it, and propose a pull request if you support the general idea.

@gaborcsardi
Copy link
Contributor

We are planning on rolling out new images in a week or so.

@jameslamb
Copy link
Contributor

Oh great, glad to hear it! Thanks so much.

My offer still stands, I'm happy to help out here any time if you want. I depend on these images so much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants