open-quantum-safe / liboqs-python

Python 3 bindings for liboqs
https://openquantumsafe.org/
MIT License
106 stars 36 forks source link

giving set PATH="%PATH%;C:\some\dir\liboqs\build\bin" on windows cmd.exe stops py.exe nodejs from working properly. #53

Closed evil-user closed 2 years ago

evil-user commented 2 years ago

in liboqs-python docs it is given to set PATH="%PATH%;C:\some\dir\liboqs\build\bin" on windows to make use of liboqs shared library.

i placed liboqs.dll cross compiled on ubuntu on my windows desktop .

i opened cmd.exe gave node --help py (to start python)

everything worked . then:- i gave set PATH="%PATH%;C:\Users\eviluser\Desktop"

then tried node --help and py it shows node is not recognised similar error with python on windows too.

baentsch commented 2 years ago

I'm not sure I follow everything: Can you please confirm the contents of %PATH%? Can you confirm that node and py both work OK if C:\some\dir\liboqs\build\bin is not included in %PATH% and both do not work if (the only difference is that) C:\some\dir\liboqs\build\bin is part of "%PATH%"?

evil-user commented 2 years ago

@baentsch hope these screenshots might help in understanding the problem . error e

i have placed liboqs.dll on Desktop so trying to add it to path using set command

baentsch commented 2 years ago

The contents of %PATH% cannot be read in the above. I also don't see what (else) is in /Users/dev/desktop. Can you confirm that node works OK when liboqs.dll is not in that directory?

Also, what's happening with python? If that fails in the same form (?) this cannot have anything to do with liboqs as only an "import" instruction would (try to) load liboqs.dll.

To me this looks very much like a Windows setup problem for which I am absolutely no expert.

evil-user commented 2 years ago

@baentsch now i created an empty folder test in my Desktop

checked contents of path it is : -

PATH=C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C;C:\Users\dev\AppData\Local\Microsoft\WindowsApps;

then tried to set path using : -

set PATH="%PATH%;C:\Users\dev\Desktop\test"

then i got the following output : -

update_error

Irrespective of whether liboqs.dll is present in test folder or not i get same error. python also fails similar to node.

baentsch commented 2 years ago

Irrespective of whether liboqs.dll is present in test folder or not i get same error.

I guessed so -- in that case this is clearly no issue with liboqs but one with Windows I'm afraid we don't have the knowledge to help with :-( -- I even don't have a Windows machine at my disposal to reproduce... So maybe you should ask this question in a Windows-python community.