WineHQ

Haiku: Difference between revisions

(Remove ASL section. No longer relevant according to extrowerk on IRC.)
(Big Update)
 
Line 4: Line 4:
* Homepage: http://www.haiku-os.org
* Homepage: http://www.haiku-os.org


=== Problems ===
=== Wine port ===
The first problem you'll run into is missing libpthread, libc and libm. However, they aren't missing, they are just one lib, libroot.
AJ won't fix Wine to support libroot, understandable as it would lead to some ugly checks in winegcc/winebuild.
Haiku won't add dummy libs because the POSIX Standard doesn't force them to have those libs and it's the nature of Haiku to only have libroot.


Also note that LD_LIBRARY_PATH is not supported, so you need to modify LIBRARY_PATH.
Haiku meanwhile has ported Wine: [https://github.com/X547/wine github repo]


=== Build ===
It can be installed via HaikuDepot and also includes a Haiku specific display driver!
To get around these problems, do:


ln -s /system/lib/libroot.so /system/lib/libpthread.so
For more information see: [https://discuss.haiku-os.org/t/my-progress-in-porting-wine My progress in porting Wine by X512]
ln -s /system/lib/libroot.so /system/lib/libc.so
ln -s /system/lib/libroot.so /system/lib/libm.so
ln -s /system/lib/libroot.so /boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-100818/lib/libpthread.so
ln -s /system/lib/libroot.so /boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-100818/lib/libc.so
ln -s /system/lib/libroot.so /boot/develop/abi/x86/gcc2/tools/gcc-2.95.3-haiku-100818/lib/libm.so
./configure --without-x --without-freetype --disable-tests
LIBRARY_PATH=$LIBRARY_PATH:/path/to/buildtree/libs/wine make


You will have other problems, such as missing ELF structures and compiler crashes.
== What Wine needs from Haiku (as of ~2012) ==
 
== Running ==
If you worked around all of the problems while compiling you can close all open applications and try to run Wine:
 
LIBRARY_PATH=$LIBRARY_PATH:/path/to/buildtree/libs/wine ./wine cmd
 
It won't work and your system will become unstable, you need to reboot.
The reason is that Wine expects for most mmap calls to succeed, but also that mmap returns the requested memory address.
Haiku doesn't mmap 0x7ffe0000 for us with errorcode 0x80000000 (B_NO_MEMORY).
This ends in an nearly endless loop of Wine trying to map memory. You can see this with:
 
LIBRARY_PATH=$LIBRARY_PATH:/path/to/buildtree/libs/wine strace ./loader/wine cmd
 
With gdb I analysed which part of the Wine code does that:
 
LIBRARY_PATH=$LIBRARY_PATH:/path/to/buildtree/libs/wine gdb ./loader/wine
 
It is reserve_area in libs/wine/mmap.c that tries to halve the size of the mapping until it succeeds, which will never happen.
 
== What Wine needs from Haiku ==
* in general: LDT support, m(un)lock, pthread_attr_setstack, a fix for the Address Space Layout problem
* in general: LDT support, m(un)lock, pthread_attr_setstack, a fix for the Address Space Layout problem
* dbghelp: Elf32_Ehdr, Elf32_Shdr, Elf32_Phdr, Elf32_Dyn, DT_DEBUG, DT_NULL, SHT_NULL, SHT_NOBITS, SHT_SYMTAB, SHT_DYNSYM, SHT_DYNAMIC, STT_NOTYPE, STT_FILE, STT_OBJECT, STT_FUNC, SHN_UNDEF, STB_LOCAL, ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, EI_CLASS, ELFCLASS32, ELFCLASS64, PT_LOAD
* dbghelp: Elf32_Ehdr, Elf32_Shdr, Elf32_Phdr, Elf32_Dyn, DT_DEBUG, DT_NULL, SHT_NULL, SHT_NOBITS, SHT_SYMTAB, SHT_DYNSYM, SHT_DYNAMIC, STT_NOTYPE, STT_FILE, STT_OBJECT, STT_FUNC, SHN_UNDEF, STB_LOCAL, ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, EI_CLASS, ELFCLASS32, ELFCLASS64, PT_LOAD
Line 62: Line 31:
[http://dev.haiku-os.org/ticket/7502 Bug 7502 at Haiku] (missing LDT table)
[http://dev.haiku-os.org/ticket/7502 Bug 7502 at Haiku] (missing LDT table)


[http://dev.haiku-os.org/ticket/9205 Bug 9205 at Haiku] (needed mmap improvements)
<strike>[http://dev.haiku-os.org/ticket/9205 Bug 9205 at Haiku] (needed mmap improvements)</strike>
 
[https://depot.haiku-os.org/#!/pkg/wine_bin/haikuports/haikuports_x86_64/7/5/-/-/1/x86_64 Wine on HaikuDepot]
----
----
[[Category:Distributions]]
[[Category:Distributions]]

Latest revision as of 14:43, 20 May 2022

Haiku

Haiku is an open source operating system inspired by the Be Operating System. Haiku is fast, simple to use, easy to learn and yet very powerful.

Wine port

Haiku meanwhile has ported Wine: github repo

It can be installed via HaikuDepot and also includes a Haiku specific display driver!

For more information see: My progress in porting Wine by X512

What Wine needs from Haiku (as of ~2012)

  • in general: LDT support, m(un)lock, pthread_attr_setstack, a fix for the Address Space Layout problem
  • dbghelp: Elf32_Ehdr, Elf32_Shdr, Elf32_Phdr, Elf32_Dyn, DT_DEBUG, DT_NULL, SHT_NULL, SHT_NOBITS, SHT_SYMTAB, SHT_DYNSYM, SHT_DYNAMIC, STT_NOTYPE, STT_FILE, STT_OBJECT, STT_FUNC, SHN_UNDEF, STB_LOCAL, ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, EI_CLASS, ELFCLASS32, ELFCLASS64, PT_LOAD
  • network related: ESOCKTNOSUPPORT, ETOOMANYREFS
  • ntdll: SIGIO, an improved ucontext_t

See also

Thread on haiku-development mailing list from June 2014

Patchseries: configure.ac: fix libpthread detection on Haiku

older Patch

Bug 20116

Bug 4606 at Haiku

Bug 7502 at Haiku (missing LDT table)

Bug 9205 at Haiku (needed mmap improvements)

Wine on HaikuDepot


This page was last edited on 20 May 2022, at 14:43.