Ports - i386-wine does not seems to really build

Greetings to everyone.

I am running FreeBSD 12.1-RELEASE-p8 on AMD64 Arch and UFS2 filesystem. And I wanted to use wine, but it seemed slower than before, maybe ten minutes to make a window appears as if something was wrong. So I uninstalled wine and tried to build it from /usr/ports/emulators/i386-wine :

Code:
root@freebsd:/usr/home/dogers # cd /usr/ports/emulators/i386-wine
root@freebsd:/usr/ports/emulators/i386-wine # make config








  ┌───────────────────────── i386-wine-5.0_1,1 ────────────────────────────┐
  │ ┌────────────────────────────────────────────────────────────────────┐ │
  │ │+[x] GECKO  Bundle Gecko MSI package for Wine                       │ │
  │ │+[x] MONO   Bundle Mono MSI package for Wine                        │ │
  │ └────────────────────────────────────────────────────────────────────┘ │
  ├────────────────────────────────────────────────────────────────────────┤
  │                     <  OK  >           <Cancel>                        │
  └────────────────────────────────────────────────────────────────────────┘
                                                                            








root@freebsd:/usr/ports/emulators/i386-wine # make install clean
===>   NOTICE:

The wine port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:

https://bugs.freebsd.org/bugzilla

More information about port maintainership is available at:

https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port

===>  License LGPL21 LGPL3 accepted by the user
===>   i386-wine-5.0_1,1 depends on file: /usr/local/sbin/pkg - found
=> i386-wine-5.0,1.txz doesn't seem to exist in /usr/ports/distfiles/FreeBSD:12:amd64.
=> Attempting to fetch http://distcache.FreeBSD.org/local-distfiles/salvadore/i386-wine/FreeBSD:12:amd64/i386-wine-5.0,1.txz
i386-wine-5.0,1.txz                                     68 MB   13 MBps    05s
===> Fetching all distfiles required by i386-wine-5.0_1,1 for building
===>  Extracting for i386-wine-5.0_1,1
===>   NOTICE:

The wine port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:

https://bugs.freebsd.org/bugzilla

More information about port maintainership is available at:

https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port

===>  License LGPL21 LGPL3 accepted by the user
===>   i386-wine-5.0_1,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by i386-wine-5.0_1,1 for building
=> SHA256 Checksum OK for FreeBSD:12:amd64/i386-wine-5.0,1.txz.
/usr/bin/tar -xf /usr/ports/distfiles/FreeBSD:12:amd64/i386-wine-5.0,1.txz -C /usr/ports/emulators/i386-wine/work --include '/usr/local/share/licenses/i386-wine-5.0,1/LICENSE' -s '|/usr/local/share/licenses/i386-wine-5.0,1/||g'
===>  Patching for i386-wine-5.0_1,1
===>   i386-wine-5.0_1,1 depends on executable: update-desktop-database - found
===>  Configuring for i386-wine-5.0_1,1
===>  Staging for i386-wine-5.0_1,1
===>   i386-wine-5.0_1,1 depends on file: /usr/local/share/wine/gecko/wine-gecko-2.47.1-x86.msi - not found
===>  License MPL20 GPLv2 GPLv3 LGPL21 LGPL3 accepted by the user
===>   wine-gecko-2.47.1 depends on file: /usr/local/sbin/pkg - found
=> wine-gecko-2.47.1-x86.msi doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86.msi
wine-gecko-2.47.1-x86.msi                               48 MB   15 MBps    03s
===> Fetching all distfiles required by wine-gecko-2.47.1 for building
===>  Extracting for wine-gecko-2.47.1
=> SHA256 Checksum OK for wine-gecko-2.47.1-x86.msi.
===>  Patching for wine-gecko-2.47.1
===>  Configuring for wine-gecko-2.47.1
===>  Staging for wine-gecko-2.47.1
===>   Generating temporary packing list
install  -m 0644 /usr/ports/distfiles/wine-gecko-2.47.1-x86.msi  /usr/ports/emulators/wine-gecko/work/stage/usr/local/share/wine/gecko
====> Compressing man pages (compress-man)
===>  Installing for wine-gecko-2.47.1
===>  Checking if wine-gecko is already installed
===>   Registering installation for wine-gecko-2.47.1 as automatic
Installing wine-gecko-2.47.1...
===>   i386-wine-5.0_1,1 depends on file: /usr/local/share/wine/gecko/wine-gecko-2.47.1-x86.msi - found
===>   Returning to build of i386-wine-5.0_1,1
===>   i386-wine-5.0_1,1 depends on file: /usr/local/share/wine/mono/wine-mono-4.9.4.msi - not found
===>  License MIT GPLv2 LGPL20 accepted by the user
===>   wine-mono-4.9.4_1 depends on file: /usr/local/sbin/pkg - found
=> wine-mono-4.9.4.msi doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://dl.winehq.org/wine/wine-mono/4.9.4/wine-mono-4.9.4.msi
wine-mono-4.9.4.msi                                     90 MB   19 MBps    05s
===> Fetching all distfiles required by wine-mono-4.9.4_1 for building
===>  Extracting for wine-mono-4.9.4_1
=> SHA256 Checksum OK for wine-mono-4.9.4.msi.
===>  Patching for wine-mono-4.9.4_1
===>  Configuring for wine-mono-4.9.4_1
===>  Staging for wine-mono-4.9.4_1
===>   Generating temporary packing list
install  -m 0644 /usr/ports/distfiles/wine-mono-4.9.4.msi  /usr/ports/emulators/wine-mono/work/stage/usr/local/share/wine/mono
====> Compressing man pages (compress-man)
===>  Installing for wine-mono-4.9.4_1
===>  Checking if wine-mono is already installed
===>   Registering installation for wine-mono-4.9.4_1 as automatic
Installing wine-mono-4.9.4_1...
===>   i386-wine-5.0_1,1 depends on file: /usr/local/share/wine/mono/wine-mono-4.9.4.msi - found
===>   Returning to build of i386-wine-5.0_1,1
===>   i386-wine-5.0_1,1 depends on executable: update-desktop-database - found
===>   Generating temporary packing list
/usr/bin/tar -xf /usr/ports/distfiles/FreeBSD:12:amd64/i386-wine-5.0,1.txz -C / --exclude +COMPACT_MANIFEST --exclude +MANIFEST  --exclude +MTREE_DIRS --exclude share/licenses/'*'  --exclude libdata/ldconfig32/i386-wine  -s '|/usr/local|/usr/ports/emulators/i386-wine/work/stage/usr/local|gs'
tar: Removing leading '/' from member names
====> Compressing man pages (compress-man)
===>   Installing 32-bit ldconfig configuration file
===>  Installing for i386-wine-5.0_1,1
===>  Checking if i386-wine is already installed
===>   Registering installation for i386-wine-5.0_1,1
Installing i386-wine-5.0_1,1...
This system does not appear to use a nvidia graphics driver.  If this changes
and then every time the driver's version changes execute (as root)
    sh /usr/local/share/wine/patch-nvidia.sh
to get 2D/3D acceleration to work with the nvidia driver.  Without this wine
will crash when a program requires 2D/3D graphics acceleration.

Some ZFS tuning guides recommend setting KVA_PAGES=512 in your kernel
configuration.  This is incompatible with Wine.  The maximum possible
is KVA_PAGES=500, which should still be enough for ZFS.

The port also installs some of Wine's documentation which describes
additional programs that are not in the manual pages under
  /usr/local/share/doc/wine
There is more in the source tree but the others are only useful in
conjunction with the rest of the source tree.
===>   NOTICE:

The i386-wine port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:

https://bugs.freebsd.org/bugzilla

More information about port maintainership is available at:

https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib32/.libGL/dri/swrast_dri.so
/usr/local/lib32/wine/iphlpapi.dll.so
/usr/local/lib32/.libGL/dri/radeonsi_dri.so
/usr/local/lib32/.libGL/dri/r600_dri.so
/usr/local/lib32/.libGL/dri/kms_swrast_dri.so
/usr/local/lib32/.libGL/dri/r300_dri.so
/usr/local/lib32/wine/winedbg.exe.so
/usr/local/lib32/.libGL/dri/vmwgfx_dri.so
/usr/local/lib32/libXdmcp.so.6
/usr/local/bin32/wineserver

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.winehq.org/
===>  Cleaning for wine-gecko-2.47.1
===>  Cleaning for wine-mono-4.9.4_1
===>  Cleaning for i386-wine-5.0_1,1

The console tells me that wine is installed, but it does not seem to even build. I tried the same in a Virtualbox and I got the same result. So, is this port broken or am I doing something wrong ?

Thank you in advance for any response !
 
Last edited:
=> i386-wine-5.0,1.txz doesn't seem to exist in /usr/ports/distfiles/FreeBSD:12:amd64. => Attempting to fetch http://distcache.FreeBSD.org/local-...386-wine/FreeBSD:12:amd64/i386-wine-5.0,1.txz i386-wine-5.0,1.txz
....
/usr/bin/tar -xf /usr/ports/distfiles/FreeBSD:12:amd64/i386-wine-5.0,1.txz -C / --exclude +COMPACT_MANIFEST --exclude +MANIFEST --exclude +MTREE_DIRS --exclude share/licenses/'*' --exclude libdata/ldconfig32/i386-wine -s '|/usr/local|/usr/ports/emulators/i386-wine/work/stage/usr/local|gs' tar: Removing leading '/' from member names

It seems there is nothing to build, a prebuild .txz package is fetched and unpacked.
What does pkg info -l i386-wine return?
 
And I wanted to use wine, but it seemed slower than before, maybe ten minutes to make a window appears as if something was wrong.

Hmm, I am not sure why the binary build is running slowly for you. What you might want to check is if it isn't trying to resolve a hostname (for X11) or something like that.

In your /etc/hosts make sure your hostname is there and pointing towards 127.0.0.1.

Also, try disconnecting from the network (also bringing your interface down in ifconfig) and try running your program in Wine again.
 
Thank you everyone for your responses.

Here is the pkg info -l i386-wine :

###Check attached file###

I find really strange that it use pre-built binary even by using ports.

And with /etc/hosts everything is fine, I also tested with network down, it changes nothing, but it was worth the try.

Maybe the problem with wine is somewhere else...
 

Attachments

Maybe this can help :

The slow-down with wine has appeared just after the big update of pkg with quarterly updates, so it is probably related. I also tried to remove ./wine folder from my /home in order to a fresh configuration but it changed nothing.
 
I tried to launch winecfg (config utility) a few time from a terminal and every time I got different results : Different times, different errors in terminal and even no launch at all. Here is some errors I got :

Code:
winecfg
000f:err:service:process_send_command service protocol error - failed to write pipe!
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 1053
000f:err:service:process_send_command service protocol error - failed to write pipe!
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 1053

After this (5 minutes later) the winecfg Window finally appeared !

And here's what I've got from another launch :

Code:
winecfg
000f:err:service:process_send_command service protocol error - failed to write pipe!
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"MountMgr" failed to start: 1053
0014:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0014:err:winediag:nodrv_CreateWindow The explorer process failed to start.
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0014:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
000f:err:service:process_send_command service protocol error - failed to write pipe!
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"PlugPlay" failed to start: 1053

Completely random ! In this way its emulating windows behavior quite well ! And this time winecfg did not even bother to show up, even 10 minutes later.

If the problem persists I think will try to switch to latest repository to check if things are fixed or not.
 
Last edited:
0014:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.

This looks interesting, i saw this error only when i have tried out to run a gui program without a running X session for fun. But if this happends on a running X session then this could be related to your X setup.
 
I thought the same. But the fact is that I have not touched anything from X setup. I just installed it with no manual tweaking as advised in the Handbook.
I also tried the 64bit version of wine but I get the same result, so there is probably something that alters wine functioning but the issue might not be from wine directly indeed.
 
I just tried similar and noticed that if I am not running a window manager, Wine windows take a long time to "close".

Perhaps try a different Window Manager to check it isn't something to do with this?
 
Since I use IceWm it could have been the problem, but I just tried on mate and the result is still same.
 
I just tried the wine command that generates log with the good old Windows pinball, it creates a log indeed, but unfortunately it contains nothing, really strange. But at least I still get random errors in the terminal.

And for the latest repository solution, the idea is that maybe something else than wine is broken, something that may hinders wine normal behavior.
 
Have a look at the following old WINE bug report. It might be helpful for debugging:


Other bug reports found on "slow" keyword. I hadn't time to see them all through:


What comes next to mind is file a bug report on https://bugs.freebsd.org/ and/or https://bugs.winehq.org/ if the latest package repository approach doesn't give a desired result.
 
Okay I have taken time to test network related issues with wine and updated to the lastest repository. And it changes nothing, I will try to further investigate and I will probably fill a bug report.
 
Surprise - I forced a portsnap fetch extract on an old system because I thought I am getting crazy:

Code:
root@service:/usr/_ports.new/emulators/i386-wine-devel # make fetch
===>  i386-wine-devel-5.8_1,1 binaries compiled for FreeBSD 11.4+, 12.2+ and
13.0+ only.
*** Error code 1

Stop.
make: stopped in /usr/_ports.new/emulators/i386-wine-devel

And... surprise indeed: it does not compile. Both the ports and pkg install methods just uncompress some archive which contains pre-compiled binaries, but exensive google search is silent about the specific configurations to apply to wine (or wine-devel) to compile from source code, for the same result.

[off-topic] I researched this because I am trying to add CUPS support. I am using some old 32-bit .gov-released finance programs for accounting and I don't want to contaminate anything with Evil Billy's OS, not even VirtualBox anymore. So far I have been trying to install print-to-file utilities (primo pdf, cute pdf writer) without effect: notepad.exe displays both pdf printers, it prints but no virtual printer responds with any PDF output.

Further searching revealed that i386-wine is the normal wine built in a 32-bit jail, as it won't compile on a x64 system.
So the i386-wine FreeBSD Wiki explains all the required steps in the "poudriere" section.

Work is in progress for i386-wine tweaking. Poudriere ports configuration takes a lot of time even on fast ssd. It seems it is both a time- and storage space-consuming process, that's why the i386-wine port distfile contains pre-compiled binaries: to save time and avoid headache. I wish to know if 'make config' shows more options. If it helps me, maybe it helps you too.
 
well, compiling i386-wine takes a lot of time and a lot of space. if hdd = mechanic then process lasts longer and gives headache.
in /usr/local/poudriere/data, while poudriere is started, there is a directory called ".m" where the jail directory exists. in 01/<jailname>/wrkdirs/usr/ports/emulators/i386-wine/work/ I found wine src dir. In my case, wine-5.0.3.

trying to hack into ./configure args to enable cups support - work is in progress.

so if I have to try again... let me guess (I'm sure I am wrong again): are there any blobs hidden inside?
 
Alright, here is how you do it:

Bash:
#!/bin/sh

pkg install poudriere


# cloning the existing ports tree, this will take a lot of time - patience required

poudriere ports -c



#This one will download and install the required i386 base environment to work with,
# in my case from https://download.freebsd.org/ftp/snapshots/i386/i386/12.2-STABLE/

poudriere jail -c -j wine-build -a i386 -v 12.2-STABLE  
#<<jailname>> is wine-build,   version is for 12.2-stable.  12.1-stable is no longer available.

echo "WINE_CROSS_BUILD=yes" >> /usr/local/etc/poudriere.d/make.conf


# This will show the user-specified options to set:

poudriere options -j wine-build emulators/i386-wine


#It is the equivalent of "make config-recursive".

#I do not wish to configure all the dependencies, so I aborted poudriere. After restarting, "poudriere options -j i386-wine emulators/i386-wine"

# no longer shows the options for i386-wine - this means the options I set are saved.


#now get to work:
# if you enabled Vulkan video acceleration and dosbox, more patience is required as lang/rust build process will take many hours 
# for this purpose I am using an intel core i-7 with a fast samsung 4-TB SSD drive and 32 GB RAM
poudriere bulk -j wine-build emulators/i386-wine


#According to i386-wine FreeBSD wiki, the package is available at:

echo /usr/local/poudriere/data/packages/wine-build-default/All/$(make -C /usr/ports/emulators/i386-wine -V PKGNAME ARCH=i386).txz


i386-wine comes with many disabled options - CUPS included. CUPS support enabled, I want MsDos apps ran in dosbox, build is now work in progress.

I have freebsd 12.1-stable, but poudriere works with 12.2-stable. 12.1 is no longer available - so I am doing this for testing purpose only. Problems are to be expected with the package. I can't freebsd-update without a proper backup, so I may postpone the tests.
 
Back
Top