-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-116043: Simplify HACL* build #119320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-116043: Simplify HACL* build #119320
Conversation
3861ca3
to
a1d027a
Compare
@chris21k can you comment as to whether this solves your issue? |
@msprotz Thanks for looking into it and fixing it. 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. |
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. |
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 |
Sorry, I am not familiar with freeze.py |
And me neither :( maybe @vstinner? |
I'm closing this one in favor of #132438 (since this one also has conflicts). Thanks for the initial work though! |
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.