GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-116043: Simplify HACL* build by msprotz · Pull Request #119320 · python/cpython

Conversation

@msprotz

@msprotz msprotz commented May 21, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Per #116043, the usage of a static library causes concerns in some legacy scenarios. Now that that HACL* SHA2 file is properly packaged as a single C file, there isn't much incentive to have a static archive being built, so let's get rid of that if it helps.

  • Issue: freeze cannot find Modules/_hacl/libHacl_Hash_SHA2.a #116043

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@msprotz
Simplify HACL* build
3695f5d
@bedevere-app bedevere-app Bot added the awaiting review label May 21, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 21, 2024
freeze cannot find Modules/_hacl/libHacl_Hash_SHA2.a #116043
Closed
@msprotz
Blurb entry
a1d027a
@msprotz
msprotz force-pushed the protz_hacl_build_fix branch from 3861ca3 to a1d027a Compare May 21, 2024 16:15
@msprotz

msprotz commented Jun 19, 2024

Copy link
Copy Markdown
Contributor Author

@chris21k can you comment as to whether this solves your issue?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@msprotz msprotz mentioned this pull request Jun 25, 2024
gh-99108: Add HACL* Blake2 implementation to hashlib #119316
Merged
@chris21k

chris21k commented Jul 17, 2024

Copy link
Copy Markdown

@msprotz Thanks for looking into it and fixing it.
Unfortunately it is somehow hard to test it for me, or could you give me some hints? Currently I am using Ubuntu 24.04 standard python 3.12 installation...

However, I can give you detailed but easy instructions to test it on your fixed python installation (you just have to apdapt your path to the python installation containing the PR):

First we create a simple python program. Using hashlib or not I think plays no role. However, we take the following one:

import hashlib

print("Hello, World!")

m = hashlib.sha256()
m.update(b"nobody inspects")
print(m.hexdigest())

Then we do the follwing steps:

$ ls
helloworld.py
$ /usr/bin/python3 helloworld.py
Hello, World!
5880e257e70b83842737244b412a2f282e0f230953027a22104efc615d90d3f9
$ /usr/share/doc/python3.12/examples/freeze/freeze.py -o frozen helloworld.py
$ cd frozen
$ #mkdir -p Modules/_hacl; touch Modules/_hacl/libHacl_Hash_SHA2.a # should not be necessary any more
$ make
$ ./helloworld
Hello, World!
5880e257e70b83842737244b412a2f282e0f230953027a22104efc615d90d3f9

If make runs through without errors and creates the helloworld binary then everthing should be all right.

Sorry for the late reply.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz mentioned this pull request Nov 3, 2024
gh-99108: add HACL*-based 1-shot HMAC implementation #126359
Closed
@msprotz msprotz mentioned this pull request Mar 16, 2025
Undefined references to HACL symbols when statically linking Python 3.12 #131298
Closed
@luis605

luis605 commented Mar 17, 2025

Copy link
Copy Markdown

Given that this pull request has been open for several months, I kindly request the maintainers consideration in reviewing and merging it. Implementing these changes would be beneficial for developers who rely on a simplified and robust build process.

Thank you for your attention.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@msprotz

msprotz commented Mar 17, 2025

Copy link
Copy Markdown
Contributor Author

My issue here is that I am not familiar with freeze.py, and since the time I submitted this PR, the build system of Python gained another .a file (for Hacl's Blake2), so it sounds like we should fix freeze.py rather than undo the changes to the build system and no longer rely on .a files.

Maybe @picnixz or @chris-eibl know about freeze.py? Also pinging @gpshead FYI

luis605 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Mar 17, 2025

Copy link
Copy Markdown
Member

Sorry, I am not familiar with freeze.py

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Mar 17, 2025

Copy link
Copy Markdown
Member

And me neither :( maybe @vstinner?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz mentioned this pull request Apr 12, 2025
gh-131298: eliminate HACL* static libraries for cryptographic modules #132438
Merged
@picnixz

picnixz commented Apr 12, 2025

Copy link
Copy Markdown
Member

I'm closing this one in favor of #132438 (since this one also has conflicts). Thanks for the initial work though!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz closed this Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@msprotz @chris21k @luis605 @chris-eibl @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.