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

setup.py is wrong for BSD (non-Mac, Linux, Windows) machines #13

Open
jmgurney opened this issue Apr 24, 2022 · 0 comments
Open

setup.py is wrong for BSD (non-Mac, Linux, Windows) machines #13

jmgurney opened this issue Apr 24, 2022 · 0 comments

Comments

@jmgurney
Copy link

setup.py has an else clause for unknown operating systems:
https://github.com/flamewow/argon2_py/blob/master/setup.py#L36

This else clause causes an error:

[...]
$ python setup.py build
cc -pthread -shared -L/usr/local/lib -fstack-protector-strong build/temp.freebsd-14.0-CURRENT-arm64-3.9/./phc-winner-argon2/src/argon2.o build/temp.freebsd-14.0-CURRENT-arm64-3.9/./phc-winner-argon2/src/blake2/blake2b.o build/temp.freebsd-14.0-CURRENT-arm64-3.9/./phc-winner-argon2/src/core.o build/temp.freebsd-14.0-CURRENT-arm64-3.9/./phc-winner-argon2/src/encoding.o build/temp.freebsd-14.0-CURRENT-arm64-3.9/./phc-winner-argon2/src/ref.o build/temp.freebsd-14.0-CURRENT-arm64-3.9/./phc-winner-argon2/src/thread.o build/temp.freebsd-14.0-CURRENT-arm64-3.9/./src/argon2_py.o -L/usr/local/lib -lc_argon2 -o build/lib.freebsd-14.0-CURRENT-arm64-3.9/_argon2.cpython-39.so
ld: error: unable to find library -lc_argon2
cc: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/cc' failed with exit code 1

Simply converting the previous elif (https://github.com/flamewow/argon2_py/blob/master/setup.py#L32) to an else, and eliminating the clause fixes things.

Also, the define HAVE_SYSCTL_HW_USERMEM appears to not be used anywhere in the code.

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

No branches or pull requests

1 participant