Compile earlier versions of Wine on modern Linux distro

Questions about Wine on Linux
Locked
WhiteRiver_original
Newbie
Newbie
Posts: 2
Joined: Wed Sep 19, 2018 7:13 am

Compile earlier versions of Wine on modern Linux distro

Post by WhiteRiver_original »

Hello!

Due to changes in Fontconfig 2.8.1, all pre-compiled versions of Wine earlier than 2.18 is not compatible with modern Linux distributions. In particular, PlayOnLinux archive is not suitable for use after this changes. Therefore, it is necessary to compile then manually, if we want to obtain this earlier versions.

But sometimes it's not an easy objective. Earlier versions often requires a specific patches to build within modern environment, which can not always be found through Wine bugtracker.

I'm trying to build some versions from 1.9.x branch. After obtaining and applying some necessary patches, I finally faced a dead end: one compile error is not seems resolvable from my point. Not google nor Wine bugtracker doesn't help me solve it.

Wine 1.9.13 compile error log:

Code: Select all

make[1]: Entering directory '/home/user/src/asp/wine/repos/multilib-x86_64/src/wine-64-build/dlls/wpcap'
gcc -m64 -c -o wpcap.o ../../../wine/dlls/wpcap/wpcap.c -I. -I../../../wine/dlls/wpcap -I../../include \
  -I../../../wine/include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wshift-overflow=2 \
  -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith \
  -Wlogical-op -D_FORTIFY_SOURCE=2 -march=native -O2 -pipe -fstack-protector-strong -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
../../tools/winegcc/winegcc -o wnaspi32.dll.so -B../../tools/winebuild -m64 -fasynchronous-unwind-tables -shared ../../../wine/dlls/wnaspi32/wnaspi32.spec \
  aspi.o winaspi32.o -ladvapi32 ../../libs/port/libwine_port.a -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
In file included from ../../../wine/dlls/wpcap/wpcap.c:21:
../../../wine/include/winsock.h:395:18: error: two or more data types in declaration specifiers
 typedef UINT_PTR SOCKET;
                  ^~~~~~
In file included from ../../../wine/include/winsock2.h:47,
                 from ../../../wine/dlls/wpcap/wpcap.c:22:
../../../wine/include/winsock.h:395:1: warning: useless type name in empty declaration
 typedef UINT_PTR SOCKET;
 ^~~~~~~
../../../wine/include/winsock.h:401: warning: "INVALID_SOCKET" redefined
 #define INVALID_SOCKET             (SOCKET)(~0)

In file included from ../../../wine/dlls/wpcap/wpcap.c:21:
/usr/include/pcap/pcap.h:958: note: this is the location of the previous definition
   #define INVALID_SOCKET -1

../../../wine/dlls/wpcap/wpcap.c: In function 'wine_pcap_lookupdev':
../../../wine/dlls/wpcap/wpcap.c:183:5: warning: 'pcap_lookupdev' is deprecated: use 'pcap_findalldevs' and use the first device [-Wdeprecated-declarations]
     return pcap_lookupdev(errbuf);
     ^~~~~~
In file included from ../../../wine/dlls/wpcap/wpcap.c:21:
/usr/include/pcap/pcap.h:326:16: note: declared here
 PCAP_API char *pcap_lookupdev(char *)
                ^~~~~~~~~~~~~~
../../../wine/dlls/wpcap/wpcap.c: At top level:
../../../wine/dlls/wpcap/wpcap.c:234: warning: "PCAP_OPENFLAG_PROMISCUOUS" redefined
 #define PCAP_OPENFLAG_PROMISCUOUS 1

In file included from ../../../wine/dlls/wpcap/wpcap.c:21:
/usr/include/pcap/pcap.h:690: note: this is the location of the previous definition
 #define PCAP_OPENFLAG_PROMISCUOUS  0x00000001

make[1]: Leaving directory '/home/user/src/asp/wine/repos/multilib-x86_64/src/wine-64-build/dlls/wpcap'
../../tools/winegcc/winegcc -o wnaspi32.dll.fake -B../../tools/winebuild -m64 -fasynchronous-unwind-tables -shared ../../../wine/dlls/wnaspi32/wnaspi32.spec \
  aspi.o winaspi32.o -ladvapi32 ../../libs/port/libwine_port.a -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
make[1]: *** [Makefile:167: wpcap.o] Error 1
make: *** [Makefile:16625: dlls/wpcap] Error 2
I'm using slightly modified PKGBUILD from Archlinux to build it. So, does it possible to build those versions? How to do it?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Compile earlier versions of Wine on modern Linux distro

Post by Bob Wya »

WhiteRiver_original wrote:...
I'm using slightly modified PKGBUILD from Archlinux to build it. So, does it possible to build those versions? How to do it?
@WhiteRiver_original

Please post the full build log - as a Github Gist or a forum attachment (good luck getting that to work :roll: ).

You can disable packet capture support, by adding:

Code: Select all

--without-pcap
to the configure options. You probably don't need this support anyway... 8)

Bob
WhiteRiver_original
Newbie
Newbie
Posts: 2
Joined: Wed Sep 19, 2018 7:13 am

Re: Compile earlier versions of Wine on modern Linux distro

Post by WhiteRiver_original »

Oh, --without-pcap is available? I missed it accidentally, thanks! I don't need packet capture support, you are right. By the way, downgrading libpcap package from 1.9.0 to 1.8.1 also solves compilation error (it was updated a few weeks ago).

About full build log... It's pretty strange, but registration on Github not working for me (something with captcha loading, I think), and this forum also rejected almost 3 Mb-sized log... so I cannot post it at this moment. I will try post it later.

Thank you for support!
mogorva
Level 4
Level 4
Posts: 107
Joined: Fri Oct 16, 2009 10:27 am

Re: Compile earlier versions of Wine on modern Linux distro

Post by mogorva »

You need to apply this patch to compile against newer libpcap.
Locked