Wine test image

Hello community,
if you, like me, also can’t wait to test the upcoming Wine package, now I have something for you.
Fortunately I found some hints on IRC Channel how to test the Wine package:
https:// oftc(dot)irclog.whitequark(dot)org/haiku/2022-01-26

So yes, there is already a package for Wine and yes it is disabled for now until @korli and @axeld gives their okay to kernel changes.

So to test the Wine package you have to patch the kernel and build a new Haiku image for now. So I went ahead and compiled a nightly image with this patch applied.

You can download the image from here:

I also managed to compile the Wine package, you can download it from here:

then extract it, and install it, with:
´pkgman install wine-6.23-1-x86_64.hpkg´

The output looks like:

~> pkgman install wine-6.23-1-x86_64.hpkg 
100% repochecksum-1 [65 Bytes]
Überprüfen der Checksumme für Haiku...done.
100% repochecksum-1 [64 Bytes]
Überprüfen der Checksumme für HaikuPorts...done.
The following changes will be made:
  in system:
    install package vulkan-1.2.203-1 from repository HaikuPorts
    install package libusb-1.0.24-1 from repository HaikuPorts
    install package libusb_compat-0.1.7-1 from repository HaikuPorts
    install package wine-6.23-1 from local file
Continue? [yes/no] (yes) :

Happy testing :slight_smile:

PS.: as it is my first post in this forum, I have to say big thanks to all developers an contributors - TANK YOU guys, you are amazing!

PPS.: I had to install two additional packages to build Haiku on Haiku_x64: “zstd_devel” and “xorriso” - is this a known issue?

I managed to build a nightly iso image with Wine package pre installed.
You can download it from here:

There is one problem: Wine wont start in a live environment.
See my post below: Wine test image - #15 by Waffel
Also still no networking support :frowning: (is a limitation of current available Wine package)


Not implying anything, but everyone should be aware of the risks of downloading and installing something from someone the net…


you’re absolutely right, but considering mine is a test pendrive with haiku, it’s not too much of a big deal …


Great job. Too bad you didn’t do it yesterday :slight_smile:

I also wanted to look at wine and had to rebuild the haiku sources with the correct patch.

Total Commander 64bit

7z 64bit

Lazarus 64bit :slight_smile:


X512’s changes get reviewed, and eventually merged if someone has the time to fix them. See the list. Help welcome :slight_smile:


Can you write your opinion for Is it OK to have additional syscall, or path with emulating WRGSBASE is required? Setting GSBASE is not speed critical, it is done once when creating Win32 thread.


Thank you!

Actually I had a working build at the time, but I thought it would be cool to have the Wine package preinstalled in the image, so anybody can test it in a live environment without to have to install additional packages - man that was a bad idea :wink:

I spend hours with compiling, recompiling, web search and a lot of trial and error but finally I gave up - no chance :roll_eyes:

So if someone knows how to build Haiku with preinstalled custom packages, please write an HowTo, at least I would be very grateful for that.

Everybody likes screenshots, so here is one:


It is IrfanView 4.59-64bit. This was my image viewer to go as I was using Windows. It is Freeware and has a lot of features.

@X512 is there an easy way to disable HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS? In order to get networking support in Wine. I want to test some alternative browsers, like Pale Moon or older versions of chromium, maybe we have luck :slight_smile:


In haiku/build/jam/UserBuildConfig:
AddHaikuImagePackages <…> ;

1 Like

For more info: UserBuildConfig.ReadMe and UserBuildConfig.sample

1 Like

Thank you for the hint! :+1:

But it didn’t work for me. I get always the message:

AddHaikuImagePackages: package wine not available!

I also don’t really know where I have to place the package so that jam could find it.
I’ve tried to put it in the $(HAIKU_TOP), $(HAIKU_TOP)/generated.x86_64 and $(HAIKU_TOP)/generated.x86_64/downloads directory, but without any success.

I also found in the rule definition of AddHaikuImagePackages (File: ‘ImageRules’) that it takes a second argument for a directory, so I put:

AddHaikuImagePackages wine : /path/to/package ;

in ‘UserBuildConfig’ but again without any success.

Finally to see if it works and how it works, I decided to take the example of ‘UserBuildConfig.sample’ and give it a try, but it also fail. Here the output:

~/Projekte/Haiku/haiku/build/jam> cat UserBuildConfig
# Add the optional package WonderBrush to the image.
AddHaikuImagePackages WonderBrush ;

~/Projekte/Haiku/haiku/generated.x86_64> jam -q -j4 @nightly-anyboot
Starting build of type regular ... 
AddHaikuImagePackages: package WonderBrush not available! 
Building Haiku Nightly 

I also found some discussion on the freelist about this bug, but according them it should be already fixed:

There are also two more rules described in ‘UserBuildConfig.ReadMe’:

AddHaikuImageSystemPackages and AddOptionalHaikuImagePackages but they didn’t work either.

So I have two questions now :nerd_face:

Where do I have to put ‘wine-6.23-1-x86_64.hpkg’ package, so that jam can find it?
And which of the three rules:


should I use?

Thanks in advance.

1 Like

AddHaikuImagePackages will only work for HaikuPorts packages which are referenced in build/jam/repositories/HaikuPorts/ and wine isn’t one of them.

1 Like

Thank you!
I have already thought that but it should be somehow possible to install local packages?
Or do you guys upload anything, when you test you packages?

You can install local packages while Haiku is running (using pkgman install or simply double click the package to open it in HaikuDepot). But you can’t easily do it from the buildsystem unless the packages are in our repositories. It may be possible to add it manually to the generated/downloads folder but you will need to change some things in Jamfiles (a bit more than just using AddHaikuImagePackages, the package needs to be declared first somewhere in build/jam/).

1 Like

It seems possible to add package to “download” directory and to Jamfile list.

1 Like

I’ve got it – finally :partying_face:

You can download the iso image with pre installed Wine package from here:

The bad news is: Wine refuses to start in a live environment :roll_eyes:
I get this massage:

~> winecfg 
wine: created the configuration directory '/boot/home/.wine'
wineserver: bind: Operation not supported

Thank you guys, the hint with downloads directory was the game changer :+1:

Here a quick HowTo in case someone is also searching for a way to include pre compiled local packages in a nightly image.

Fist: compile the image like described on Haiku homepage.

Then copy your packages to $(HAIKU_TOP)/generated.x86_64/download directory.
In my case: libusb-1.0.24-1-x86_64.hpkg, libusb_compat-0.1.7-1-x86_64.hpkg, vulkan-1.2.203-1-x86_64.hpkg, wine-6.23-1-x86_64.hpkg packages.

Then edit the file: $(HAIKU_TOP)/build/jam/repositories/HaikuPorts/x86_64 and add your packages there.
Here are my changes:

~/Projekte/Haiku/haiku/build/jam/repositories/HaikuPorts> diff -uNr x86_64.orig x86_64
--- x86_64.orig 2022-02-03 14:06:14.061603840 +0100
+++ x86_64      2022-02-03 15:33:54.930611200 +0100
@@ -140,6 +140,8 @@
+       libusb-1.0.24-1
+       libusb_compat-0.1.7-1
@@ -213,10 +215,12 @@
+       vulkan-1.2.203-1
+       wine-6.23-1

Then edit the file: $(HAIKU_TOP)/build/jam/DefaultBuildProfiles
Look for the line: case "nightly-*" : {
In this section increase the HAIKU_IMAGE_SIZE from 600 to 650MB and add your packages to the list after AddHaikuImageSystemPackages rule.
Here are my changes:

~/Projekte/Haiku/haiku/build/jam> diff -uNr DefaultBuildProfiles.orig DefaultBuildProfiles 
--- DefaultBuildProfiles.orig   2022-02-03 14:06:14.058195968 +0100
+++ DefaultBuildProfiles        2022-02-03 17:59:57.951058432 +0100
@@ -130,16 +130,20 @@
                        if $(DEBUG) != 0 {
                                HAIKU_IMAGE_SIZE ?= 850 ;
-                       HAIKU_IMAGE_SIZE ?= 600 ;
+                       HAIKU_IMAGE_SIZE ?= 650 ;
                        HAIKU_NIGHTLY_BUILD = 1 ;
+                               libusb
+                               libusb_compat
+                               vulkan
+                               wine
                                # xz_utils can't be built with gcc2, so we install it for
                                # primary gcc 8 architectures or gcc 2 hybrids.

Now go back to $(HAIKU_TOP)/generated.x86_64 directory and execute the jam command again.
In my case: jam -q -j4 @nightly-anyboot

That’s it - congratulation - jam should now produce a new image with your packages included :slight_smile:

An alternative approach would be, instead to add your packages to $(HAIKU_TOP)/build/jam/DefaultBuildProfiles, to create a new file $(HAIKU_TOP)/build/jam/UserBuildConfig and add the packages there (see also UserBuildConfig.ReadMe and UserBuildConfig.sample for some examples). Here is how it looks like:

~/Projekte/Haiku/haiku/build/jam> cat UserBuildConfig 
# Add the optional package Wine to the image.
AddHaikuImagePackages vulkan libusb libusb_compat wine ;

But there is one problem, instead to copy the packages to /boot/system/packages directory, the AddHaikuImagePackages rule, puts them in the /boot directory. Here is my output:

/boot> ls
home                               trash
libusb_compat-0.1.7-1-x86_64.hpkg  vulkan-1.2.203-1-x86_64.hpkg
libusb-1.0.24-1-x86_64.hpkg        wine-6.23-1-x86_64.hpkg

– Bug :question:

So here is the answer to my question in the previous post - since DefaultBuildProfiles file use the AddHaikuImageSystemPackages rule and it seems to work, use it, instead of the AddHaikuImagePackages rule which is suggested in UserBuildConfig.sample file.

See also korlis comment bellow: Wine test image - #22 by korli

Happy testing :slight_smile:


Nice. I am thinking of tinkering around with it later today. Thanx! <3

Thanx 2. It is fun to test it eg. in a VM, but the lack of network support is a drawback for me. I hope X512 will update the package in the near future, with network enabled.

1 Like

Ill try on bare metal.

1 Like

Good luck andreas_dr and have fun, I’m waiting for new screenshots :slight_smile:

BTW: does anyone know how I can edit my first post?
I want to add the new link there, so people can profit from it, but don’t see the edit button, I see it only for my recent posts. Is it impossible?

1 Like

You need to have a certain level of activity (at least 10 posts? I do not remember tbh) to have this functionality enabled.