{"id":23415311,"url":"https://github.com/mlampros/fedora_clang_rdsan","last_synced_at":"2026-04-18T04:33:05.059Z","repository":{"id":108724291,"uuid":"528416025","full_name":"mlampros/fedora_clang_rdsan","owner":"mlampros","description":"Fedora LLVM Clang ASAN UBSAN to build \u0026 check R package before CRAN submission","archived":false,"fork":false,"pushed_at":"2025-05-05T06:26:51.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T06:35:21.783Z","etag":null,"topics":["asan","clang","cran","fedora","llvm","r","ubsan"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlampros.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["mlampros"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-08-24T12:33:55.000Z","updated_at":"2025-05-05T06:26:55.000Z","dependencies_parsed_at":"2024-05-29T08:49:04.476Z","dependency_job_id":"e02fa611-04ca-43c8-8a76-4f288ed39cd8","html_url":"https://github.com/mlampros/fedora_clang_rdsan","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"98baa9520a608f0f57f0c9678f90a628d5f25918"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlampros/fedora_clang_rdsan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2Ffedora_clang_rdsan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2Ffedora_clang_rdsan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2Ffedora_clang_rdsan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2Ffedora_clang_rdsan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlampros","download_url":"https://codeload.github.com/mlampros/fedora_clang_rdsan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2Ffedora_clang_rdsan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31956962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asan","clang","cran","fedora","llvm","r","ubsan"],"created_at":"2024-12-22T21:14:40.892Z","updated_at":"2026-04-18T04:33:05.052Z","avatar_url":"https://github.com/mlampros.png","language":"Perl","funding_links":["https://github.com/sponsors/mlampros"],"categories":[],"sub_categories":[],"readme":"\n[![](https://img.shields.io/docker/automated/mlampros/fedora_clang_san.svg)](https://hub.docker.com/r/mlampros/fedora_clang_san)\n\n\n## **fedora_clang_rdsan**\n\n\u003cbr\u003e\n\n- **2025-05-05**: I modified the [Dockerfile_fedora](https://github.com/mlampros/fedora_clang_rdsan/blob/master/Dockerfile_fedora) file (split the commands into multiple groups) to fix an error.\n- **2023-12-02**: I modified the [Dockerfile_fedora_clang](https://github.com/mlampros/fedora_clang_rdsan/blob/master/Dockerfile_fedora_clang) file so that the latest clang version is installed.\n\n\u003cbr\u003e\n\n* This repository includes slight modifications of the [Dockerfiles from the rhub project](https://github.com/r-hub/rhub-linux-builders) to reproduce CRAN ASAN-UBSAN errors on Fedora Clang (latest version) using a [Github Action](https://github.com/mlampros/fedora_clang_rdsan/blob/master/.github/workflows/gh_action.yml)\n* In the Github Action an [.R file](https://github.com/mlampros/fedora_clang_rdsan/blob/master/fedora_latest_version.R) is used to retrieve the latest version of the existing [Fedora Docker images](https://hub.docker.com/v2/repositories/library/fedora/tags) using the Docker API. Then, the highest numeric version (and not a character string such as \"latest\") will be used to build the Docker Image and check for potential CRAN ASAN-UBSAN Errors.\n* Finally a [docker image is pushed to my Docker Account](https://hub.docker.com/repository/docker/mlampros/fedora_clang_san) that can be used to fix potential CRAN ASAN-UBSAN errors.\n* This Github Action updates (currently) the [mlampros/fedora_clang_san:latest](https://hub.docker.com/repository/docker/mlampros/fedora_clang_san) docker image once per week.\n\n\u003cbr\u003e\n\nCurrently, as of *August 2022*, there is an issue when building an ASAN-UBSAN docker image using the latest Fedora version, which seems to be related to [a change in 'glibc'](https://bugzilla.redhat.com/show_bug.cgi?id=1900021#c3)\n\nA temporary solution is to include **one** of the following two commands in the **docker run** command (*runtime*):\n\n* `--cap-add=SYS_PTRACE --security-opt seccomp=unconfined`\n* `--security-opt seccomp=unconfined`\n\n\u003cbr\u003e\n\n**References** (*related to the 'glibc' issue*)\n\n* https://stat.ethz.ch/pipermail/r-devel/2021-April/080679.html\n* https://stat.ethz.ch/pipermail/r-sig-fedora/2021-March/000732.html\n* https://bugzilla.redhat.com/show_bug.cgi?id=1900021#c3\n* https://bugzilla.redhat.com/show_bug.cgi?id=1900021#c21\n* https://bugzilla.redhat.com/show_bug.cgi?id=1900021#c42\n* https://bugzilla.redhat.com/show_bug.cgi?id=1900021#c44\n* https://github.com/r-hub/rhub/issues/464\n\n\u003cbr\u003e\n\nReproducing the [CRAN script](https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-clang) (so that [LLVM, Clang](https://github.com/llvm/llvm-project/releases) can be built from source) using a Github Action is not an option, because the workflow requires more disk space than available (even after using a Github Action step to reduce the disk space). Thus, by using the latest Fedora version an LLVM-Clang version close to the CRAN requirement is installed so that an R package can be checked for ASAN-UBSAN errors.\n\n\u003cbr\u003e\n\n### **How to use the [ASAN-UBSAN Docker Image](https://hub.docker.com/repository/docker/mlampros/fedora_clang_san)**\n\n\u003cbr\u003e\n\nThere are a couple of ways that the Docker image can be used:\n\n**1. From the command line** (*the user can bind a directory such as 'pkg_dir', that includes an R package, in my case 'OpenImageR'*)\n\n\u003cbr\u003e\n\n* `docker pull mlampros/fedora_clang_san:latest`\n* `docker image ls`\n* `docker run -it mlampros/fedora_clang_san:latest clang --version`\n* `docker run --rm -ti --security-opt seccomp=unconfined -v /home/pkg_dir:/pkg_dir mlampros/fedora_clang_san:latest`\n* `dnf install -y openssl-devel`\n* `RDsan`\n* `install.packages('devtools', dependencies = TRUE, repos = 'https://cloud.r-project.org/')`\n* `install.packages(c( 'Rcpp', 'graphics', 'grDevices', 'grid', 'shiny', 'jpeg', 'png', 'tiff', 'R6', 'RcppArmadillo', 'testthat', 'knitr', 'rmarkdown', 'covr', 'remotes' ), repos = 'https://cloud.r-project.org/')`\n* `setwd('/pkg_dir')`\n* `system(\"RDsan CMD build OpenImageR\")`\n* `system(\"RDsan CMD check --as-cran OpenImageR_1.2.5.tar.gz\")`\n\n\u003cbr\u003e\n\n**2. From an R session using a saved bash file (see the [example_R_Sys_requirements.sh file](https://github.com/mlampros/fedora_clang_rdsan/blob/master/example_R_Sys_requirements.sh) in this repo) in a specified by the user *pkg_dir* directory that includes the (R \u0026 system) requirements. Assuming 'docker' and 'R' are already installed in the Operating System a user can use the following by first openning a command line window (the 'pkg_dir' is a positional parameter when using '/bin/bash' in 'docker run')**\n\n\u003cbr\u003e\n\n* `R` (begin an R session)\n* `system(\"docker pull mlampros/fedora_clang_san:latest\")`\n* `system(\"docker image ls\")`\n* `system(\"docker run -it mlampros/fedora_clang_san:latest clang --version\")`\n* `system(\"docker run --security-opt seccomp=unconfined -v /home/pkg_dir:/pkg_dir mlampros/fedora_clang_san:latest /bin/bash /pkg_dir/example_R_Sys_requirements.sh 'pkg_dir'\")`\n\n\u003cbr\u003e\n\nIn both cases (*1.* and *2.*) the output CRAN *.Rcheck* folder is saved in the (adjusted) by the user directory '/home/pkg_dir' so that the user can fix the errors and re-run the CRAN checks.\n\nMy preferred way is *1.* because once the R packages are installed in the R session, the user has only to re-adjust the code (in 'pkg_dir') and re-run the 'R CMD build \u0026 check'. Whereas, the second case (when using the 'system()' command from within an R session) requires the re-installation of the R packages after a potential adjustment of the code.\n\nBoth cases (*1.* and *2.*) were tested on *Ubuntu 18.04* and *Linux Mint 18.2*\n\n\u003cbr\u003e\n\n### **Similar Projects:**\n\n* https://github.com/r-hub/rhub-linux-builders (*all OS's*)\n* https://github.com/rocker-org/r-devel-san-clang (*OS: Debian*)\n* https://github.com/wch/r-debug (*all OS's*)\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlampros%2Ffedora_clang_rdsan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlampros%2Ffedora_clang_rdsan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlampros%2Ffedora_clang_rdsan/lists"}