scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Runtime does not work on Manjaro/in Flatpak

Open plata opened this issue 5 years ago • 26 comments

On Manjaro, every installation crashes with Application tried to create a window, but no driver could be loaded.. Trying to set the DISPLAY environment variable explicitly results in load_builtin_dll failed to load .so lib for builtin L"winex11.drv": libbsd.so.0.

This probably affects also other systems therefore I'm not sure anymore if we can use the runtime like we anticipated. Also we might have different issues apart from this particular one.

plata avatar Jul 02 '19 17:07 plata

Do you know the reason for this error? Does it occur because of a missing system library?

madoar avatar Jul 02 '19 18:07 madoar

Could you verify if that lib is in the runtime ?

When doing my test I had no problem with libbsd. We can still add it as a dependency in the .deb (like libc6:i386) if it is required.

ImperatorS79 avatar Jul 02 '19 18:07 ImperatorS79

Just to be clear: if I do not add the runtime to LD_LIBRARY_PATH, everything works. So I can't imagine that a system library is missing.

plata avatar Jul 02 '19 19:07 plata

Do we need to add the engine libs to the LD_LIBRARY_PATH? Is there an environment where Phoenicis doesn't work if we don't do so?

madoar avatar Jul 06 '19 13:07 madoar

If we do not add the runtime to LD_LIBRARY_PATH, the whole point of having a runtime is defeated because it will not be used.

plata avatar Jul 06 '19 20:07 plata

I don't understand why we have this problem at all. It seems to me like we're adding more libraries than we need to (because when removing the _wineEnginesDirectory libraries it is working). How can this lead to an error? Are some of the libraries corrupted?

In addition I don't understand why we have two locations for the libraries:

  • this._wineEnginesDirectory + "/runtime/libX/ and
  • this.getLocalDirectory(subCategory, version) + "/libX/

I think it would be better to add all library dependencies to this.getLocalDirectory(subCategory, version) + "/libX/, especially because different wine versions could require different dependencies right?

madoar avatar Jul 07 '19 07:07 madoar

I'm not quite sure what exactly is causing the issues. It might be that a library replaces a system library which leads to errors. @ImperatorS79 would it be enough to use the runtime as fallback, i.e. list it at the end of LD_LIBRARY_PATH? @madoar you experience the problem on Linux Mint, right? Normally this should be very close to Ubuntu. If this is not working already, I'm really concerned that using the runtime introduces more problems than it solves. @qparis what do you think?

plata avatar Jul 07 '19 10:07 plata

If you put the runtime in this.getLocalDirectory(subCategory, version) + "/libX/, that means you have the runtime for each wine version, which is insane.

If changing the order inside LD_LIBRARY_PATH solve it, do it.

Basically, you will have to have some libs inside the runtime since for some of them you need the exact right version (e.g. libavcodec,...). I was always in favour of using system libraries when they are working.

ImperatorS79 avatar Jul 07 '19 12:07 ImperatorS79

I've just tried to put the runtime at the end of LD_LIBRARY_PATH. Still the same error.

plata avatar Jul 07 '19 14:07 plata

Are there any news about this? I would like to know which linux distributions are currently affected by this? As far as I understand it there are currently at least two affected distributions:

  • Linux Mint
  • Manjaro

right? Are there other affected distributions? (What about Ubuntu?)

Is there anything we can do to fix this?

madoar avatar Aug 11 '19 10:08 madoar

I cannot test on Ubuntu because the runtime is missing libfreetype (which it should not be since it is added to it -> https://github.com/PhoenicisOrg/phoenicis-winebuild/blob/master/builders/scripts/builder_linux_x86_runtime), which prevent me to launch basic apps like 7-zip.

ImperatorS79 avatar Aug 11 '19 10:08 ImperatorS79

Is this a problem in winebuild? If yes I think you should add an issue in winebuild targeting this.

For now can't you install libfreetype globally on your system (i.e. apt install libfreetype) to give this a test and eventually debug this? When the library is finally added to our wine packages you could uninstall it again.

madoar avatar Aug 11 '19 12:08 madoar

I get

0031:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0031:err:winediag:nodrv_CreateWindow Unknown error (127).

This is strange because I never got that with wine 4.0.

ImperatorS79 avatar Aug 11 '19 15:08 ImperatorS79

@ImperatorS79 this is the same error I get in https://github.com/PhoenicisOrg/scripts/issues/1059

madoar avatar Aug 11 '19 15:08 madoar

The runtime was also missing libbsd, now it works.

Reference: https://github.com/PhoenicisOrg/phoenicis-winebuild/issues/100

ImperatorS79 avatar Aug 11 '19 15:08 ImperatorS79

So it should work after the runtimes are rebuilt with winebuild?

madoar avatar Aug 11 '19 15:08 madoar

It works for me.

ImperatorS79 avatar Aug 11 '19 16:08 ImperatorS79

@plata I think this should be fixed now. Is the issue still occurring for you?

madoar avatar Aug 23 '19 20:08 madoar

Yes. Just tried with a fresh Notepad++ installation. Installation itself was working but I could not start Notepad++. After removing the runtime from the ld path, it worked.

plata avatar Aug 24 '19 09:08 plata

Is it the same library or is it missing a different library this time?

madoar avatar Aug 24 '19 09:08 madoar

Like I said before: it cannot be that something is missing because if I do not use the runtime at all, it works.

plata avatar Aug 24 '19 09:08 plata

I mean the error when you have the runtime added.

madoar avatar Aug 24 '19 09:08 madoar

As far I understand @ImperatorS79 the reasons for this error and similar ones like #1098 is because of missing libraries in the runtime. So if we can complete the libraries it should work

madoar avatar Aug 24 '19 09:08 madoar

Ah ok. I get:

wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
000b:err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
0009:fixme:ver:GetCurrentPackageId (0x2e9610 (nil)): stub
0009:fixme:dc:DeleteDC not deleting busy DC 0xdd0049 refcount 2

But I don't think that's the issue really. Apart from that, the only thing happening is a Wine window "Unknown exception".

plata avatar Aug 24 '19 10:08 plata

I get unknown error too on ubuntu 19.04. Removing the runtime is worse because I have no i386 .deb installed except libc6.

ImperatorS79 avatar Aug 25 '19 15:08 ImperatorS79

The runtime does not work in Flatpak either.

plata avatar Oct 06 '19 16:10 plata