-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
How to get libsecp256k1 when running from source on Windows? #5976
Comments
Like the README says, libsecp256k1 is a non-python dependency; you should not install it via pip.
This package you installed is named libsecp256k1 but it is virtually empty. Someone is probably just namesquatting it. What you will need is a dll, named Our own build script for the Windows binaries is cross-compiling from Linux to Windows. Whether you need a 32 bit or a 64 bit binary depends on the Python interpreter you have installed.
To compile a 64 bit (x86_64, amd64) dll, run:
I guess this should be made easier... We weren't/aren't sure how many people there are running from source on Windows. |
Thanks! I'll try it later. |
I can't seem to get this to work either... I compiled libsecp256k1 using the .sh in the contrib folder as advised and then copied the .dll and the .so that it generated to my Windows box... Still getting:
After hacking in some debug into ecc_fast.py
Seems the .dll being produced isn't correct? ??? |
I get that exception if the dll is for the wrong architecture (32 vs 64 bit). Let's keep this issue open, as the current workaround is not ideal. |
Turns out that: Is a "good idea"™ if you're building this outside of the build-wine docker "fresh_clone" thing ;) Not sure why it didn't complain and still produced a .dll file earlier? Anyway, it seems to have produced a "proper" x64 bit .dll file now
And with that copied over to the Windows 10 box and put in the /electrum-master/electrum directory, Electrum is starting up OK when running from source |
Download the raw nupkg file from https://www.nuget.org/packages/Secp256k1.Net (use "Download package" link in "Info" section on the right), unzip the file, extract |
On my station from my MINGW64 shell on Windows 10
Everything worked fine. Verified with a Trezor-1 |
I've built a 64-bit DLL for people - that trust me - to use.
|
Thank you, guys! I was able to build libsecp256k1-0.dll following your advices. Now you can easily build your own libsecp256k1-0.dll (x86 and x64) using docker and |
after doing this command through WSL I get the error "collect2: error: ld returned 1 exit status |
I made it work |
Note: I've added a "Running Electrum from source on Windows" guide now in 941db42. |
I followed this the MSYS2 method and the .dll was made no problem but when I get to the final step I get this error: python3 ./run_electrum |
try |
The dependencies should have been installed as part of step 1:
Try running electrum in the original shell you used for those steps, e.g. powershell/cmd/"windows terminal", instead of msys2 (which is used solely for building libsecp). |
Tested on Feb10 Build to the Latest Build.
OS: Windows10
Python versions: 3.6.1 and 3.8
All other dependencies are installed
When trying to run Electrum:
C:\Python\Python361>python electrum-master/run_electrum
libsecp256k1 was installed through:
C:\Python\Python361>python -m pip install libsecp256k1
In comparison, the dev build copy that I have downloaded last February 5 is working despite not having libsecp256k1.
It's just crashing when I'm trying to enable lightning due to obvious reasons.
This might be caused by this PR: #5947
"make libsecp256k1 a mandatory dependency"
The text was updated successfully, but these errors were encountered: