Title: build error: unable to find library -latomic (llvm/compiler-rt) · Issue #65900 · nodejs/node · GitHub
Open Graph Title: build error: unable to find library -latomic (llvm/compiler-rt) · Issue #65900 · nodejs/node
X Title: build error: unable to find library -latomic (llvm/compiler-rt) · Issue #65900 · nodejs/node
Description: Version b949c28 Platform Linux aarch64-unknown-linux-musl 7.2.3-gentoo-dist-hardened #1 SMP PREEMPT_DYNAMIC Sat Sep 5 05:15:30 CEST 2026 aarch64 GNU/Linux llvm stack (clang, libcxx, compiler-rt, libunwind) Subsystem No response What step...
Open Graph Description: Version b949c28 Platform Linux aarch64-unknown-linux-musl 7.2.3-gentoo-dist-hardened #1 SMP PREEMPT_DYNAMIC Sat Sep 5 05:15:30 CEST 2026 aarch64 GNU/Linux llvm stack (clang, libcxx, compiler-rt, li...
X Description: Version b949c28 Platform Linux aarch64-unknown-linux-musl 7.2.3-gentoo-dist-hardened #1 SMP PREEMPT_DYNAMIC Sat Sep 5 05:15:30 CEST 2026 aarch64 GNU/Linux llvm stack (clang, libcxx, compiler-rt, li...
Opengraph URL: https://github.com/nodejs/node/issues/65900
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"build error: unable to find library -latomic (llvm/compiler-rt)","articleBody":"### Version\n\nb949c28b7957f913bfbf042e6b07a22af59f1f3f\n\n### Platform\n\n```text\nLinux aarch64-unknown-linux-musl 7.2.3-gentoo-dist-hardened #1 SMP PREEMPT_DYNAMIC Sat Sep 5 05:15:30 CEST 2026 aarch64 GNU/Linux\n\nllvm stack (clang, libcxx, compiler-rt, libunwind)\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n```\n$ ./configure\n$ make\n```\n\n### How often does it reproduce? Is there a required condition?\n\nalways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nbuild succeeds\n\n### What do you see instead?\n\n```bash\nld.lld: error: unable to find library -latomic\nclang++: error: linker command failed with exit code 1 (use -v to see invocation)\nmake[1]: *** [node_js2c.target.mk:144: /home/pepper/dev/ghrepos/node/out/Release/node_js2c] Error 1\nmake: *** [Makefile:145: node] Error 2\n```\n\n### Additional information\n\n\n\nThis [comment in tools/v8_gypfiles/v8.gyp](https://github.com/peppergrayxyz/node/blob/b949c28b7957f913bfbf042e6b07a22af59f1f3f/tools/v8_gypfiles/v8.gyp#L1404-L1407) suggests, that `-latomic` was added to facilitate the use of atomic operations as described in the linked clang docs:\n```gyp\n# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library\n# to implement atomic memory access.\n# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).\n ['(OS==\"linux\" and clang==1) or (v8_current_cpu in [\"mips64\", \"mips64el\", \"arm\", \"riscv64\", \"loong64\"])', {\n```\n\nBut the docs also state that `compiler-rt` (LLVM) **or** `libatomic` (GNU) may be used. `-latomic` requests `libatomic` while atomics from `compiler-rt` can be used without linker settings.\n\n**Current behaviour** \nThe builds adds `-latomic` which unconditionally requests to link `libatomic` even in cases when it is not needed or desired.\n\n**Desired behaviour**\nCheck if `-latomic` is needed e.g. like mesa [meson.build](https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson.build?ref_type=heads#L1639), which checks if atomics compile successfully without link settings (which is the case with `compiler-rt`). Then append them conditionally only when needed.","author":{"url":"https://github.com/peppergrayxyz","@type":"Person","name":"peppergrayxyz"},"datePublished":"2026-09-08T02:45:30Z","url":"https://github.com/nodejs/node/issues/65900"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4e6dccfe-a43d-4718-0cf8-2193178d181b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 848A:A3A4:35BE41:4D6CC4:6AED35C3 |
| html-safe-nonce | c306cb324a0c5a7a3ac22c9f609f1a06668d979a0c8c2d8ca2a829e5ae4fb59a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDhBOkEzQTQ6MzVCRTQxOjRENkNDNDo2QUVEMzVDMyIsInZpc2l0b3JfaWQiOiIxMjA5OTEzNjI2NDc0NjU3MjE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8076ad1d8a577a141fe55e2db9a0e22353b977bb82ced6ee26d90dadeb50a08f |
| hovercard-subject-tag | issue:5381299066 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65900/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fc28325bc799096fd500ccc3e048fae2147cc87747d7ee56f0cb51bf2241d164/nodejs/node/issues/65900 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fc28325bc799096fd500ccc3e048fae2147cc87747d7ee56f0cb51bf2241d164/nodejs/node/issues/65900 |
| og:image:alt | Version b949c28 Platform Linux aarch64-unknown-linux-musl 7.2.3-gentoo-dist-hardened #1 SMP PREEMPT_DYNAMIC Sat Sep 5 05:15:30 CEST 2026 aarch64 GNU/Linux llvm stack (clang, libcxx, compiler-rt, li... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | peppergrayxyz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c629ad99c254d306375fc8354d04321c2c362236 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width