{"id":15759908,"url":"https://github.com/wangyoucao577/libmath-finite","last_synced_at":"2025-08-01T09:13:28.408Z","repository":{"id":92174548,"uuid":"476309274","full_name":"wangyoucao577/libmath-finite","owner":"wangyoucao577","description":"A simple library to solve the `__xxx_finite` symbols missed problem due to `glibc` upgrade.","archived":false,"fork":false,"pushed_at":"2023-06-07T00:51:40.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T22:52:25.513Z","etag":null,"topics":["c","libc","libm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangyoucao577.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-03-31T13:05:24.000Z","updated_at":"2024-07-02T02:45:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"90fcb72f-680c-4c73-938b-2b6d2d959bc1","html_url":"https://github.com/wangyoucao577/libmath-finite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyoucao577%2Flibmath-finite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyoucao577%2Flibmath-finite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyoucao577%2Flibmath-finite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyoucao577%2Flibmath-finite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangyoucao577","download_url":"https://codeload.github.com/wangyoucao577/libmath-finite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251795425,"owners_count":21645020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["c","libc","libm"],"created_at":"2024-10-04T10:23:53.091Z","updated_at":"2025-04-30T22:52:28.679Z","avatar_url":"https://github.com/wangyoucao577.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libmath-finite     \n**libmath-finite** intends to solve the `__xxx_finite` symbols missed problem due to `glibc` upgrade. It generally happens when distribute your pre-built binray(`.a/.so/executable`) from `glibc\u003c2.31` build enviornment to `glibc\u003e=2.31` systems, such as `Debian 10 -\u003e Debian 11`, or `Ubuntu18.04 -\u003e Ubuntu20.04`. [Math changes in glibc 2.31](https://sourceware.org/pipermail/libc-alpha/2020-May/113773.html) also discusses the problem.          \nIt's a very simple library, which only wraps functions of the standard math library `libm`. **Many thanks to **Étienne** who proposes the idea in [Link errors with -ffast-math (-ffinite-math-only) and glibc 2.31](https://stackoverflow.com/questions/63261220/link-errors-with-ffast-math-ffinite-math-only-and-glibc-2-31)**.    \n\n## Why need it\nPlease read [Undefined reference to `__xxx_finite` - why and how?](./doc/undefined_reference_to__xxx_finite__why_and_how.md).       \n\n## How to use\nThere're various ways to use it. The simplest way is just copy the sources into your project and compile them together. Alternativesly build static/shared library to and link them. Read [Undefined reference to `__xxx_finite` - why and how?](./doc/undefined_reference_to__xxx_finite__why_and_how.md) for more details.        \n\n- Build static library\n\n```bash\n$ gcc -c -o libmath-finite.o libmath-finite.c\n$ ar rcs libmath-finite.a libmath-finite.o\n```\n\n- Build shared library\n\n```bash\n$ gcc -c -fPIC -o libmath-finite.o libmath-finite.c\n$ gcc -shared -fPIC -o libmath-finite.so libmath-finite.o -lm\n```\n\n## References\n- [Math changes in glibc 2.31](https://sourceware.org/pipermail/libc-alpha/2020-May/113773.html)\n- [Math changes in glibc 2.31 - Answer page](https://sourceware.org/pipermail/libc-alpha/2020-May/113840.html)\n- [Proposal: Remove or reduce math-finite.h](https://sourceware.org/legacy-ml/libc-alpha/2019-03/msg00395.html)\n- [Link errors with -ffast-math (-ffinite-math-only) and glibc 2.31](https://stackoverflow.com/questions/63261220/link-errors-with-ffast-math-ffinite-math-only-and-glibc-2-31)\n- [sourceware.org - glibc.git](https://sourceware.org/git/?p=glibc.git)\n- [sourceware.org - glibc.git - commit: remove math-finite.h redirections for math functions](https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7bdb921d70bf9f93948e2e311fef9ef439314e41)\n- [C - Common mathematical functions](https://en.cppreference.com/w/c/numeric/math)\n- [GCC - FloatingPointMath Optimiation](https://gcc.gnu.org/wiki/FloatingPointMath)\n- [GCC - Options That Control Optimization](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html)\n- [How the GNU C Library handles backward compatibility](https://developers.redhat.com/blog/2019/08/01/how-the-gnu-c-library-handles-backward-compatibility)    \n- [Undefined reference to `__xxx_finite` - why and how?](./doc/undefined_reference_to__xxx_finite__why_and_how.md)    \n- [Undefined reference to `__xxx_finite` - why and how? - medium.com](https://medium.com/@wangyoucao577/undefined-reference-to-xxx-finite-why-and-how-84f52766f1b4)\n- [Undefined reference to `__xxx_finite` - why and how? - github.io](https://wangyoucao577.github.io/en/2022/04/03/undefined_reference_to__xxx_finite__why_and_how.html)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangyoucao577%2Flibmath-finite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangyoucao577%2Flibmath-finite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangyoucao577%2Flibmath-finite/lists"}