René's URL Explorer Experiment


Title: Error compiling HACL* Blake2 support for macOS universal binaries · Issue #123748 · python/cpython · GitHub

Open Graph Title: Error compiling HACL* Blake2 support for macOS universal binaries · Issue #123748 · python/cpython

X Title: Error compiling HACL* Blake2 support for macOS universal binaries · Issue #123748 · python/cpython

Description: Bug report Bug description: #99108 tracks the addition of a native HACL implementation to CPython. #119316 added an implementation of Blake2 to hashlib. This compiles fine on single architecture macOS builds (as verified by CI); but univ...

Open Graph Description: Bug report Bug description: #99108 tracks the addition of a native HACL implementation to CPython. #119316 added an implementation of Blake2 to hashlib. This compiles fine on single architecture ma...

X Description: Bug report Bug description: #99108 tracks the addition of a native HACL implementation to CPython. #119316 added an implementation of Blake2 to hashlib. This compiles fine on single architecture ma...

Opengraph URL: https://github.com/python/cpython/issues/123748

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error compiling HACL* Blake2 support for macOS universal binaries","articleBody":"# Bug report\n\n### Bug description:\n\n#99108 tracks the addition of a native HACL implementation to CPython. #119316 added an implementation of Blake2 to `hashlib`.\n\nThis compiles fine on single architecture macOS builds (as verified by CI); but universal2 builds running on an ARM64 laptop generate a compilation error:\n\nTo reproduce the problem: on a macOS machine, configure the build with:\n```\n$ configure --enable-universalsdk=\"`xcrun --show-sdk-path`\" --with-universal-archs=universal2\n$ make\n```\n\nThis will eventually yield the compilation error:\n```\ngcc -c -I../../../Modules/_hacl -I../../../Modules/_hacl/include -D_BSD_SOURCE -D_DEFAULT_SOURCE -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk    -fstack-protector-strong -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I../../../Include/internal -I../../../Include/internal/mimalloc -IObjects -IInclude -IPython -I. -I../../../Include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk     -mavx2 -DHACL_CAN_COMPILE_VEC256 -o Modules/_hacl/Hacl_Hash_Blake2b_Simd256.o ../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c\nIn file included from ../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:26:\nIn file included from ../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:40:\n../../../Modules/_hacl/internal/../Hacl_Hash_Blake2b_Simd256.h:56:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *fst;\n  ^\n../../../Modules/_hacl/internal/../Hacl_Hash_Blake2b_Simd256.h:57:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *snd;\n  ^\nIn file included from ../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:26:\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:44:32: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\nHacl_Hash_Blake2b_Simd256_init(Lib_IntVector_Intrinsics_vec256 *hash, uint32_t kk, uint32_t nn);\n                               ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:49:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *wv,\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:50:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *hash,\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:59:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *wv,\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:60:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *hash,\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:71:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *hash\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:76:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *st,\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:83:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *st\n  ^\n../../../Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h:86:1: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\nLib_IntVector_Intrinsics_vec256 *Hacl_Hash_Blake2b_Simd256_malloc_with_key(void);\n^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:34:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *wv,\n  ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:35:3: error: unknown type name 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 *hash,\n  ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:53:3: error: use of undeclared identifier 'Lib_IntVector_Intrinsics_vec256'\n  Lib_IntVector_Intrinsics_vec256 mask = Lib_IntVector_Intrinsics_vec256_zero;\n  ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:72:3: error: use of undeclared identifier 'mask'\n  mask =\n  ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:73:5: error: call to undeclared function 'Lib_IntVector_Intrinsics_vec256_load64s'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\n    Lib_IntVector_Intrinsics_vec256_load64s(FStar_UInt128_uint128_to_uint64(totlen),\n    ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:77:33: error: use of undeclared identifier 'Lib_IntVector_Intrinsics_vec256'; did you mean 'Lib_IntVector_Intrinsics_vec256_load64s'?\n  memcpy(wv, hash, 4U * sizeof (Lib_IntVector_Intrinsics_vec256));\n                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n                                Lib_IntVector_Intrinsics_vec256_load64s\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:33: note: expanded from macro 'memcpy'\n                __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))\n                                              ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:73:5: note: 'Lib_IntVector_Intrinsics_vec256_load64s' declared here\n    Lib_IntVector_Intrinsics_vec256_load64s(FStar_UInt128_uint128_to_uint64(totlen),\n    ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:78:3: error: use of undeclared identifier 'Lib_IntVector_Intrinsics_vec256'; did you mean 'Lib_IntVector_Intrinsics_vec256_load64s'?\n  Lib_IntVector_Intrinsics_vec256 *wv3 = wv + 3U;\n  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  Lib_IntVector_Intrinsics_vec256_load64s\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:73:5: note: 'Lib_IntVector_Intrinsics_vec256_load64s' declared here\n    Lib_IntVector_Intrinsics_vec256_load64s(FStar_UInt128_uint128_to_uint64(totlen),\n    ^\n../../../Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c:78:36: error: use of undeclared identifier 'wv3'\n  Lib_IntVector_Intrinsics_vec256 *wv3 = wv + 3U;\n                                   ^\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\n20 errors generated.\nmake: *** [Modules/_hacl/Hacl_Hash_Blake2b_Simd256.o] Error 1\n```\n\nFrom what I can make out, the error comes from the detection of `-mavx2` support. On a bare configure on an ARM64 machine, `-mavx2` support is apparently unsupported:\n```\nconfigure:30537: checking whether C compiler accepts -mavx2\nconfigure:30557: gcc -c  -Werror -mavx2  conftest.c \u003e\u00265\nclang: error: argument unused during compilation: '-mavx2' [-Werror,-Wunused-command-line-argument]\n```\nand as a result, the `Hacl_Hash_Blake2b_Simd256.c` module isn't compiled. However, when universal support is enabled, `-mavx2` *is* supported:\n```\nconfigure:30537: checking whether C compiler accepts -mavx2\nconfigure:30557: gcc -c -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk  -Werror -mavx2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk  conftest.c \u003e\u00265\nconfigure:30557: $? = 0\nconfigure:30566: result: yes\n```\nand the module is included. Based on recent configure logs for x86_64 macOS builds, it appears that `-mavx2` *is* supported on x86_64. \n\nI'm not sufficiently familiar with the subject matter to comment on whether the fix here is to fix the autoconf detection to *disable* the problematic module on universal builds, or to correct the implementation so that it can compile for universal builds.\n\nTagging @msprotz @R1kM as the authors of the recent HACL* changes.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-123927\n* gh-123989\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/freakboy3742","@type":"Person","name":"freakboy3742"},"datePublished":"2024-09-05T22:56:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/123748/cpython/issues/123748"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:87889352-e02a-f89d-694b-6d7eea4e6535
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCD20:1A500C:102FFC8:1516767:696B0B6E
html-safe-noncef6d237da63d8dd3413c5ca08d7231ff53fe32b5bfc2545ae8e61cde2410d0264
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDIwOjFBNTAwQzoxMDJGRkM4OjE1MTY3Njc6Njk2QjBCNkUiLCJ2aXNpdG9yX2lkIjoiNzQ3ODk4ODM5NzI1MTA3MDgzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbb91738eed293ebae44d595a5acf5b0cfa4754096595bdc7ff11134f6214d876
hovercard-subject-tagissue:2508966162
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/123748/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4212b15e38e9f33dad1616c8e57729cc8e2bcb086350d55f172eabbfae830d15/python/cpython/issues/123748
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4212b15e38e9f33dad1616c8e57729cc8e2bcb086350d55f172eabbfae830d15/python/cpython/issues/123748
og:image:altBug report Bug description: #99108 tracks the addition of a native HACL implementation to CPython. #119316 added an implementation of Blake2 to hashlib. This compiles fine on single architecture ma...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefreakboy3742
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/123748#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F123748
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F123748
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/123748
Reloadhttps://github.com/python/cpython/issues/123748
Reloadhttps://github.com/python/cpython/issues/123748
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/123748
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/123748
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/123748
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/123748
#123989https://github.com/python/cpython/pull/123989
Error compiling HACL* Blake2 support for macOS universal binarieshttps://github.com/python/cpython/issues/123748#top
#123989https://github.com/python/cpython/pull/123989
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
OS-machttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-mac%22
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/freakboy3742
https://github.com/freakboy3742
freakboy3742https://github.com/freakboy3742
on Sep 5, 2024https://github.com/python/cpython/issues/123748#issue-2508966162
#99108https://github.com/python/cpython/issues/99108
#119316https://github.com/python/cpython/pull/119316
@msprotzhttps://github.com/msprotz
@R1kMhttps://github.com/R1kM
gh-123748: Disable HACL SIMD256 on universal builds. #123927https://github.com/python/cpython/pull/123927
gh-123748: Add conditional compilation rules to allow HACL SIMD256 to be compiled on universal #123989https://github.com/python/cpython/pull/123989
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
OS-machttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-mac%22
buildThe build process and cross-buildhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22build%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.