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

Floresta.exeerror #304

Open
Gudnessuche opened this issue Dec 9, 2024 · 17 comments
Open

Floresta.exeerror #304

Gudnessuche opened this issue Dec 9, 2024 · 17 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file help wanted Extra attention is needed OS: Windows Problems related to windows builds

Comments

@Gudnessuche
Copy link
Contributor

image

How do I fix this error?

@jaoleal
Copy link
Contributor

jaoleal commented Dec 10, 2024

Can you provide more details ? Firstly, how did you install it ?

My guess is:

  1. You installed it in a wrong way, so cargo didnt binded the dlls as was supposed to do.
    OR
  2. The dlls in your system arent in the environment variables. (Not sure if this the right windows name for it).

But please, provide more context so we can help you.

@Gudnessuche
Copy link
Contributor Author

I just downloaded the .exe file and opened. I am presuming that's wrong.
Also we need a youtube vid for how to do this.
Should maybe speak to BTC Sessions about this

@Davidson-Souza
Copy link
Collaborator

Davidson-Souza commented Dec 11, 2024

Hmm. To be honest, I just use the out-of-the-box cross compilation to windows, but never tried to run it. We need to figure out the best way to ship stuff for windows. Probably need some installer to get libstdc++ along with floresta.exe? I couldn't get the MSVC build to work so far...

@jaoleal did you succeed in running on windows?

@Gudnessuche
Copy link
Contributor Author

Also, @Davidson-Souza I wanted to find out if there's plans for a Start9 plugin. Cos that'll be nice as well

@jaoleal
Copy link
Contributor

jaoleal commented Dec 11, 2024

Also, @Davidson-Souza I wanted to find out if there's plans for a Start9 plugin. Cos that'll be nice as well

This may be unrelated to this issue. You can open a discussion or tag us from discord to chat abour floresta... let this ambience for solving problems.

@jaoleal did you succeed in running on windows?

No, got the same error. Supporting this kind of binaries for windows will be a pain.

Looks like the solution is to include statically the missing lib while compiling.

We need to figure out the best way to ship stuff for windows.

The best way is just telling them to use wsl2 instead of offering native support.

Windows, by principle, is not a proper ambience to run Floresta:

Windows is not optimized like unix systems and the development paradigm is different... it follows a GUI approach instead of TUI in unix systems.

This makes harder to maintain and will force us to maintain it when the project evolves, possibly compromising Floresta in how it works and we already have some untested features which can be possibly broken on Windows rn...
One of the points of Floresta is to be fast and run on low-end devices, windows is incompatible with these keywords since by itself consumes a lot of resources like RAM, STORAGE, PROCESSOR and etc...

Im not against windows, i love to play games and i recognize that, in the moment, is the best OS for this... And i cant find any other way to talk any good about windows if not by gaming...

@storopoli
Copy link

storopoli commented Dec 11, 2024

I think that windows support is important.
I don't touch windows for more than 10 years, but I think is good to bring alternative implementations of a Bitcoin node for normies that use windows.

Just include the damn thing with #[cfg(target_os = "windows")] and a CI windows check.
Bill gates is paying your CI bills anyways...

I had to do this recently at Strata with macOS.

EDIT: Also this is libc FFS and not some unknown ancient long-forgotten and unmaintened 32-bit DLL.

@jaoleal
Copy link
Contributor

jaoleal commented Dec 11, 2024

I think that windows support is important.

We should support windows, yes, but trough WSL... thats my point.

I don't touch windows for more than 10 years, but I think is good to bring alternative implementations of a Bitcoin node for normies that use windows.

Yes, delivering culture for them. WSL offers an unix like environment in a safe way inside windows, basically a virtual machine with a lot of native functionalities, the point of WSL was this, bringing the unix environment the best way possible without great changes to the System Architecture.

" Linux distributions run as isolated containers inside of the WSL 2 managed VM. Linux distributions running via WSL 2 will share the same network namespace, device tree (other than /dev/pts), CPU/Kernel/Memory/Swap, /init binary, but have their own PID namespace, Mount namespace, User namespace, Cgroup namespace, and init process." - Microsoft

" WSL is designed to provide a seamless and productive experience for developers who want to use both Windows and Linux at the same time. " - Microsoft

In the last quote, you notice how they made WSL with having linux apps running inside windows in mind... And they did it... Some of the linux functionalities inside WSL actually improves windows ones, inclusive the Security flaws that windows have. I dont want to go deeper in this, but here some weak examples that i can find without wasting 5 minutes:

(Yes, in windows you can access some users accounts if you have access do the device and a generic rescue ISO).
Windows was the very first OS that i touched almost 10 years ago and i used some of these flaws for my personal purposes.

Just include the damn thing with #[cfg(target_os = "windows")] and a CI windows check.
Bill gates is paying your CI bills anyways...
I had to do this recently at Strata with macOS.
EDIT: Also this is libc FFS and not some unknown ancient long-forgotten and unmaintened 32-bit DLL.

Yes, we can do native support. But we can do it smartly by supporting WSL instead of native Windows... will require less work and less boilerplate code to maintain.

@storopoli
Copy link

We should support windows, yes, but trough WSL... thats my point.

No, bitcoin-core does not support through WSL.
I think that you should support vanilla Windows .exe files.

In my humble opinion, what you should do:

Just cross-compile it to an windows .exe by adding a static link to the missing DLL as you pointed in the answer that you've found a solution.

Then if that works, then you should close this off with:

  1. Adding windows notes somewhere in your "Build from source" instructions.
  2. Adding a simple CI job that triggers on every new tag that does a release and adds all major OS'es binaries: macOS, Linux, and Windows:
  • Linux: static binary with musl.
  • macOS: only Apple Silicon arch for now.
  • Windows: cross-compile linking the missing DLL/libc thing.

You can do that with this GitHub action: https://github.com/ncipollo/release-action

In fact, here's an example with macOS and Linux: https://github.com/storopoli/stoic-quotes/blob/4d0f58276be6189c77a276023d5391b256d932c6/.github/workflows/release.yml

@Gudnessuche
Copy link
Contributor Author

To be fair, whatever gets enabled, I want to, as an app dev, build a Wallet that runs Floresta, that'll help for scanning for Silent Payment and not having to worry about doing that as a light client. That's one of the futures I see for this project, asides using for my DATUM server to call GBT rpc in the future while pointing to Ocean pool

@Davidson-Souza Davidson-Souza added bug Something isn't working help wanted Extra attention is needed dependencies Pull requests that update a dependency file labels Dec 11, 2024
@Davidson-Souza
Copy link
Collaborator

I agree that having first-class support for Windows is a priority. Leaning towards statically building it, like I'm doing with *nix systems.

Btw, it's really nice that now we have people using it in other environments, so we can find this kind of stuff.

@Davidson-Souza Davidson-Souza added the OS: Windows Problems related to windows builds label Dec 11, 2024
@jaoleal
Copy link
Contributor

jaoleal commented Dec 11, 2024

I agree that having first-class support for Windows is a priority. Leaning towards statically building it, like I'm doing with *nix systems.

image

@jaoleal
Copy link
Contributor

jaoleal commented Dec 11, 2024

@Gudnessuche A solution to run the executable that were offering RN (without static link) is to run inside the git bash binary, the one that comes with git installation on windows or including libc on environment variables(which i personally recomend you to do to avoid encountering this type of issue again).

Im just taking some tests inside a VM to upload the PR to solve this.

@Gudnessuche
Copy link
Contributor Author

LFG!!!!!!!!!!!! @jaoleal 🚀🚀

@Gudnessuche
Copy link
Contributor Author

A solution to run the executable that were offering RN (without static link) is to run inside the git bash binary, the one that comes with git installation on windows or including libc on environment variables(which i personally recomend you to do to avoid encountering this type of issue again).

Once PR gets merged, we also need articulate documentation. I'd proof read the hell outta that and shill to normies at bitdevs

@Davidson-Souza
Copy link
Collaborator

I got it working on a Windows 11 using this. I'm also working on an actual installer.

@Gudnessuche
Copy link
Contributor Author

🔥🔥🔥🚀🚀🚀🚀🚀🫡🫡🫡🫡
Salute to you.

@Gudnessuche
Copy link
Contributor Author

Click here to view screenshot of the process from my Twitter.
@Davidson-Souza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file help wanted Extra attention is needed OS: Windows Problems related to windows builds
Projects
None yet
Development

No branches or pull requests

4 participants