ku1ik / stderred

stderr in red
MIT License
990 stars 115 forks source link

Compatibility with WINE #58

Open phil294 opened 7 years ago

phil294 commented 7 years ago

When trying to run a windows program with wine, I get LD_PRELOAD cannot be preloaded (see below)

$ .wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe 
ERROR: ld.so: object '/home/phi/bin/stderred/build/libstderred.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/phi/bin/stderred/build/libstderred.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
$ .wine/drive_c/Program\ Files/AutoHotkey/AutoHotkey.exe /ErrorStdOut 1.ahk
ERROR: ld.so: object '/home/phi/bin/stderred/build/libstderred.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/phi/bin/stderred/build/libstderred.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Z:\home\phi\1.ahk (3) : ==> This line does not contain a recognized action.
     Specifically: some_nonsense

None of this is red.

eigengrau commented 7 years ago

It’s possible to use the syntax/usr/${LIB}/libstderred.so in LD_PRELOAD, where ${LIB} will contextually expand to either lib or lib32, etc. However, this will still result in error messages by ld.so unless you have the 32-bit build of stderred installed.

darioseidl commented 3 weeks ago

The readme includes a note that Ubuntu doesn't support $LIB, but that doesn't seem to be true. LD_PRELOAD='/$LIB/libstderred.so' expands to /lib/x86_64-linux-gnu/libstderred.so / /lib/i386-linux-gnu/libstderred.so on Debian/Ubuntu. I found that info here.