{"id":19129875,"url":"https://github.com/mathworks/build-glibc-bz-19329-patch","last_synced_at":"2026-05-01T06:04:47.643Z","repository":{"id":40666179,"uuid":"440192994","full_name":"mathworks/build-glibc-bz-19329-patch","owner":"mathworks","description":"This repository provides a Dockerfile and build instructions to apply patch BZ-19329 to glibc","archived":false,"fork":false,"pushed_at":"2026-02-01T09:14:25.000Z","size":90,"stargazers_count":20,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-01T15:53:26.552Z","etag":null,"topics":["build","docker","glibc"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/mathworks.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":"SECURITY.md","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}},"created_at":"2021-12-20T14:10:15.000Z","updated_at":"2026-01-06T12:16:40.000Z","dependencies_parsed_at":"2023-02-01T06:00:54.931Z","dependency_job_id":"ac38afd1-f9f5-4ddb-ae9a-0151fc94dd44","html_url":"https://github.com/mathworks/build-glibc-bz-19329-patch","commit_stats":{"total_commits":52,"total_committers":3,"mean_commits":"17.333333333333332","dds":0.2692307692307693,"last_synced_commit":"b52b12f977c4a68a15cd9377041ed1ebe96f1684"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mathworks/build-glibc-bz-19329-patch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fbuild-glibc-bz-19329-patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fbuild-glibc-bz-19329-patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fbuild-glibc-bz-19329-patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fbuild-glibc-bz-19329-patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks","download_url":"https://codeload.github.com/mathworks/build-glibc-bz-19329-patch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fbuild-glibc-bz-19329-patch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29963125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["build","docker","glibc"],"created_at":"2024-11-09T06:08:47.866Z","updated_at":"2026-03-01T07:13:07.365Z","avatar_url":"https://github.com/mathworks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build `glibc` Patchs\n## Summary\nThis repository provides a method for working around various issues seen in older linux distributions glibc libraries. The glibc libraries are so core to the behaviour of a system that they rarely get updated in older distributions, so we provide ways to patch those libraries. \n\n## Issues Currently Patched\n* [BZ-19329](BZ-19329.md) ([bugzilla report](https://sourceware.org/bugzilla/show_bug.cgi?id=19329))  is a significant sporadic issue in all glibc versions up to 2.34. \n* [BZ-17645](BZ-17645.md) ([bugzilla report](https://sourceware.org/bugzilla/show_bug.cgi?id=17645)) is a significant performance issue on all glibc versions up to 2.35. \n\n\n### **Caution**\nNote that **all** processes on your machine share glibc libraries so these patches will apply to the system as a whole and not just to MathWorks products. Most applications and programs on your computer are likely to use glibc. Care should be taken to ensure you apply the correct version of the patch to your system based on the current version of glibc. Applying the wrong version could make your whole system unusable. Try installing the patch inside a disposable docker container first to test your install procedure – you can find instructions below.\n\nYou can find the major version of glibc you are running using, for example:\n\n```\n$ ldd --version ldd\n\nldd (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31\nCopyright (C) 2020 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions.  There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nWritten by Roland McGrath and Ulrich Drepper.\n```\n\nMore specificity on version can be found using:\n```\n$ dpkg-query --show libc6:amd64\nlibc6:amd64     2.31-0ubuntu9.2\n```\n\n## Build procedure \nTo build a specific version of glibc on your own machine you will need a version of `docker` that supports `BUILDKIT` (this feature was added in version 18.09). This repository holds patches for all glibc versions on debian derived systems from 2.24 to 2.33 inclusive, as well as a version for RHEL 8 with glibc 2.28. Running the build process takes between 10 and 60 mins based on the compute ability of your system.\n\n### Pre-built artefacts\nThis repository runs a number of github actions to build artefacts for specific Debian, Ubuntu and RHEL versions and it is likely that these are all that is needed to patch your system. You can download the matching  packages for your system from the release area.\n\n### Building\n1. Clone this repository locally and change folder into the repository\n```\n    git clone https://github.com/mathworks/build-glibc-bz-19329-patch.git\n    cd build-glibc-bz19329-patch\n```\n2. Build (using `docker build`) for the distribution and specific release you want to patch. Select the distribution and specific distribution version by setting the build argument `DIST_BASE` and `DIST_TAG`. `DIST_BASE:DIST_TAG` must be one of \n\n    | | | \n    | - | - |\n    | `debian:9` | `debian:stretch` |\n    | `debian:10`| `debian:buster` |\n    | `debian:11`| `debian:bullseye` | \n    | `ubuntu:18.04` | `ubuntu:bionic` |\n    | `ubuntu:20.04` | `ubuntu:focal` |\n    | `ubuntu:21.04` | `ubuntu:hirsute` |\n    | `almalinux:8.4` | |\n    | `almalinux:8.5` | |\n\n*Note*: You should only patch RHEL 8.4 or 8.5 if you cannot get `glibc-2.28-189.1.el8` onto the machine via the normal upgrade procedures.\n\nHere is an example build command (for `debian:9`):\n```\nDOCKER_BUILDKIT=1 docker build --build-arg DIST_BASE=debian --build-arg DIST_TAG=9 --output type=local,dest=. .\n```\n\nThe build command will use a local container image of the specific distribution requested, or pull one if none exists. To ensure you are building the most up-to-date versions of the libraries you should `docker pull` the specific `DIST_BASE:DIST_TAG` distribution before building. The build progresses and finally will copy the new debian package to a local folder called `./build/`. In that folder will be a libc6 debian package that can be installed on the appropriate distribution. For example having built for `debian:9`, `debian:10`, `debian:11`, and `ubuntu:20.04` the folder contains:\n\n```\n$ ls -x build/\nlibc6_2.24-11+deb9u4.custom_amd64.deb\nlibc6_2.27-3ubuntu1.4.custom_amd64.deb\nlibc6_2.28-10.custom_amd64.deb\nlibc6_2.31-13+deb11u2.custom_amd64.deb\n```\n\nWhen building for Almalinux you must use the `Dockerfile.rhel` rather than the debian `Dockerfile` so the build command is \n```\nDOCKER_BUILDKIT=1 docker build --build-arg DIST_TAG=8.5 -f Dockerfile.rhel --output type=local,dest=. .\n```\n\nIf you have access to a RHEL subscription you should be able to adapt the `Dockerfile.rhel` trivially to include the correct repos to support building the sources directly in a `ubi8` container.\n\n### Overriding package version string\nThe package version extension defaults to `.DIST_BASE.DIST_TAG.custom`, where\n`${DIST_TAG}` defaults to the `VERSION_CODENAME` found in `/etc/os-release`.  This version\ncan be overridden by setting the build argument `PKG_EXT`.\n\nE.g., on Debian 11, the default packages will be named like\n`libc6_2.31-13+deb11u2.debian.bullseye.custom_amd64.deb`.  If built with\n`--build-arg PKG_EXT=.test`, the package would instead be named\n`libc6_2.31-13+deb11u2.test_amd64.deb`.\n\n## Installing the built packages\n*Please note the caution above - take care not to install the wrong package version compared to the rest of your system. Consider trying the install in a disposable docker container first.*\n\nInstalling a specific debian package on a system is as simple as executing  \n```\ndpkg -i libc6_2.24-11+deb9u4.custom_amd64.deb\n```\nFor your system replace the debian package with the correct version that matches the glibc you already have (see for example the output from `dpkg-query --show libc6:amd64`)\n\nInstalling the rpms on a UBI / Almalinux system requires you to install several of the packages at once, for example\n```\ndnf install -y  glibc-2.28-164.custom.el8.x86_64.rpm  \\\n                glibc-common-2.28-164.custom.el8.x86_64.rpm \\\n                glibc-minimal-langpack-2.28-164.custom.el8.x86_64.rpm\n```\n\n### Installing in a Docker container\nWhen building a docker container with a specific patch, assuming the patch is in the top level docker context folder you would have a `Dockerfile` like\n``` docker\nFROM debian:9\n\nCOPY libc6_2.24-11+deb9u4.custom_amd64.deb /tmp/\nRUN dpkg -i /tmp/libc6_2.24-11+deb9u4.custom_amd64.deb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fbuild-glibc-bz-19329-patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks%2Fbuild-glibc-bz-19329-patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fbuild-glibc-bz-19329-patch/lists"}