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

Builds for Linux don't seem to work (unlike for Windows) #85

Open
sdasda7777 opened this issue Nov 9, 2023 · 2 comments
Open

Builds for Linux don't seem to work (unlike for Windows) #85

sdasda7777 opened this issue Nov 9, 2023 · 2 comments

Comments

@sdasda7777
Copy link

sdasda7777 commented Nov 9, 2023

Hi, I've been trying to set up a pipeline to automatically build my game. While the Windows builds work exactly as expected, Linux builds not so much (it works when built through cargo, but not through this action on GitHub)

You can check the generated releases here. The version 0.1.0 uses static linking for all platforms, and after launching the Linux build on my machines, it immediately panics (Failed to initialize any backend! Wayland status: NoCompositorListening). The version 0.1.1 uses dynamic linking for Linux (STATIC_LINKING: false), however this time I get very cryptic message bash: ./minesweeper6d: Directory or file does not exist.

Any ideas whether this is bug, issue of configuration, or something else?

@Douile
Copy link
Member

Douile commented Nov 10, 2023

I'm not sure about the missing backend, that would likely be caused by the program not being able to locate x11 or wayland: which are you using? Can other GUI apps launch from same terminal you launch this program?

It could possibly be caused if egui framework programmatically detects the display backend at compile time: the build container doesn't have wayland or x11 so they wouldn't be detected hence no backend compiled in. Although I'm just guessing, I'm not familiar with egui.

The file not found error is caused by the dynamic linking: the executable produced is trying to load a library not present on your system (that was present in the build environment). You can use a tool like ldd to find which library is missing.

@sdasda7777
Copy link
Author

Thanks for the reply. I sort of missed before that the continuation of the error I get with static linking is probably more relevant:

X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (Dynamic loading not supported); opening library failed (Dynamic loading not supported)" })

From this I am guessing egui does in fact determine the backend at runtime, not at compile time, however I'm not sure what the error really means, as I would hope static linking would be used for all the libraries.

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

No branches or pull requests

2 participants