Title: emscripten cross-compile wasm-ld: error: duplicate symbol `_Py_LibHacl_Hacl_Hash_*` · Issue #133042 · python/cpython · GitHub
Open Graph Title: emscripten cross-compile wasm-ld: error: duplicate symbol `_Py_LibHacl_Hacl_Hash_*` · Issue #133042 · python/cpython
X Title: emscripten cross-compile wasm-ld: error: duplicate symbol `_Py_LibHacl_Hacl_Hash_*` · Issue #133042 · python/cpython
Description: Bug report Bug description: For the emscripten build, during building of the python executable, all the LIBHACL_*_LIB_SHARED are used as linker flags, however the LIBHACL_HMAC_LIB_SHARED flag contains objects that are already contained i...
Open Graph Description: Bug report Bug description: For the emscripten build, during building of the python executable, all the LIBHACL_*_LIB_SHARED are used as linker flags, however the LIBHACL_HMAC_LIB_SHARED flag conta...
X Description: Bug report Bug description: For the emscripten build, during building of the python executable, all the LIBHACL_*_LIB_SHARED are used as linker flags, however the LIBHACL_HMAC_LIB_SHARED flag conta...
Opengraph URL: https://github.com/python/cpython/issues/133042
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"emscripten cross-compile wasm-ld: error: duplicate symbol `_Py_LibHacl_Hacl_Hash_*`","articleBody":"# Bug report\n\n### Bug description:\n\nFor the emscripten build, during building of the python executable, all the `LIBHACL_*_LIB_SHARED` are used as linker flags, however the `LIBHACL_HMAC_LIB_SHARED` flag contains objects that are already contained in other `LIBHACL_*_LIB_SHARED` flags. This happens, because LIBHACL_MD5_OBJS, LIBHACL_SHA1_OBJS, LIBHACL_SHA2_OBJS, LIBHACL_SHA3_OBJS and LIBHACL_BLAKE2_OBJS are all included in `LIBHACL_HMAC_LIB_SHARED` through `LIBHACL_HMAC_OBJS` via the Makefile.pre.in file.\n\nThe configure script then sets `LIBHACL_HMAC_LDFLAGS=LIBHACL_HMAC_LIB_${LIBHACL_LDEPS_LIBTYPE}` which for a shared emscripten build leads to duplicate dependencies in the final build command which leads to duplicate symbols.\n\nSince I don't know the purpose of the object file references in the `LIBHACL_HMAC_OBJS`, I do not feel comfortable just removing them, even though that change fixes the emscripten build.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-133043\n* gh-133064\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Lukasdoe","@type":"Person","name":"Lukasdoe"},"datePublished":"2025-04-27T12:04:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/133042/cpython/issues/133042"}
| 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:35faeac7-a744-733d-8e3b-0e2998d2a830 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0C0:21AC08:CBC00C:1191E40:696A8B28 |
| html-safe-nonce | 4ceb06e6c7c8f8544338d47af183168fd59047265638b3ebe372d41356d0efb8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEMwOjIxQUMwODpDQkMwMEM6MTE5MUU0MDo2OTZBOEIyOCIsInZpc2l0b3JfaWQiOiI1MTY1NDM3MDc3MDg3MjI2NjY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3264d7c9d7ee067b043a443804ecf84e50e1eba0261694029c77f5329dd05811 |
| hovercard-subject-tag | issue:3023038713 |
| 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/python/cpython/133042/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6bf922d9d2fa550ed3e2de2a8f5d6e7b9c483d18d7149e636956c792059e5161/python/cpython/issues/133042 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6bf922d9d2fa550ed3e2de2a8f5d6e7b9c483d18d7149e636956c792059e5161/python/cpython/issues/133042 |
| og:image:alt | Bug report Bug description: For the emscripten build, during building of the python executable, all the LIBHACL_*_LIB_SHARED are used as linker flags, however the LIBHACL_HMAC_LIB_SHARED flag conta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lukasdoe |
| hostname | github.com |
| expected-hostname | github.com |
| None | d2aa6dedd7d97fa651b17c40401f2605f309df5ca5fb659bf0554cf34f1de825 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | c1dbca8981c5e3d6a69bce2f1d289e732b86241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width