Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

msprotz
Copy link
Contributor

@msprotz msprotz commented May 21, 2024

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.

@msprotz
Copy link
Contributor Author

msprotz commented Jun 19, 2024

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

@chris21k
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants