Compile error

Questions about Wine on Linux
Locked
RGeri77
Newbie
Newbie
Posts: 3
Joined: Sun Sep 22, 2019 11:27 am

Compile error

Post by RGeri77 »

Hello,

I tried to compile wine 4.15 with --enable-win64 option, but I get the error under. If I skip the --enable-win64 option the compile succeed. I'm on Fedora 30 64 bit.Thnks

gcc -m64 -c -o x11drv_main.o x11drv_main.c -I. -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe \
-fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \
-Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits \
-Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op -gdwarf-2 \
-gstrict-dwarf -g -O2
x11drv_main.c: In function ‘process_attach’:
x11drv_main.c:542:33: error: ‘SONAME_LIBX11’ undeclared (first use in this function); did you mean ‘SONAME_LIBPNG’?
542 | void *libx11 = wine_dlopen( SONAME_LIBX11, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error) );
| ^~~~~~~~~~~~~
| SONAME_LIBPNG
x11drv_main.c:542:33: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:514: x11drv_main.o] Error 1
make[1]: Leaving directory '/usr/local/src/wine-4.15/dlls/winex11.drv'
make: *** [Makefile:8606: dlls/winex11.drv] Error 2
[root@skynet-x2 wine-4.15]#
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Compile error

Post by Bob Wya »

@ RGeri77

Please can you use the forum Code tags when posting terminal commands and output:

Code: Select all

...
To assist with your issue we'd need the full log. I.e. the configure part of the log as well.

I presume you are following the Building Wine: Shared WoW64 guide?

Bob
RGeri77
Newbie
Newbie
Posts: 3
Joined: Sun Sep 22, 2019 11:27 am

Re: Compile error

Post by RGeri77 »

@Bob Wya,

Oh sorry, yes I will use it.
Here is the config.log:
config.tar.gz
(58.13 KiB) Downloaded 130 times
Thanks,
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Compile error

Post by Bob Wya »

There is clearly an X library configuration error:

Code: Select all

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/9/../../../libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible //lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible //usr/lib/libX11.so when searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
This is very likely to occur "silently" if you don't force some sane default configuration options.

E.g. plucked from the 32-bit configure phase of my Gentoo build:

Code: Select all

/tmp/portage/app-emulation/wine-vanilla-4.15/work/wine-4.15/configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/wine-vanilla-4.15 --htmldir=/usr/share/doc/wine-vanilla-4.15/html --prefix=/usr/lib/wine-vanilla-4.15 --datarootdir=/usr/share/wine-vanilla-4.15 --datadir=/usr/share/wine-vanilla-4.15 --docdir=/usr/share/doc/wine-vanilla-4.15 --includedir=/usr/include/wine-vanilla-4.15 --libdir=/usr/lib/wine-vanilla-4.15 --libexecdir=/usr/libexec/wine-vanilla-4.15 --localstatedir=/var/wine-vanilla-4.15 --mandir=/usr/share/wine-vanilla-4.15/man --sysconfdir=/etc/wine --with-alsa --without-capi --with-cms --with-cups --with-curses --with-faudio --with-fontconfig --with-gnutls --enable-mshtml --with-gphoto --with-gsm --with-gstreamer --without-hal --with-jpeg --with-gssapi --with-krb5 --with-ldap --enable-mscoree --with-mpg123 --with-netapi --with-gettext --with-openal --with-opencl --with-opengl --with-osmesa --without-oss --with-pcap --with-png --with-pulse --with-pthread --with-sane --with-sdl --disable-tests --with-freetype --with-udev --with-dbus --with-v4l2 --with-vkd3d --with-vulkan --with-x --with-xfixes --with-xcomposite --with-xinerama --with-xml --with-xslt --disable-win64
You'll want at minimum for graphical application support:

Code: Select all

--with-x --with-freetype
to force a configuration error - if the necessary libraries/ headers aren't available on the host system.

Bob
RGeri77
Newbie
Newbie
Posts: 3
Joined: Sun Sep 22, 2019 11:27 am

Re: Compile error

Post by RGeri77 »

Thank you Bob. I will try with these configure options. If not working I will look around X11 libs.
francisCarvalho
Newbie
Newbie
Posts: 3
Joined: Tue Apr 07, 2020 10:07 pm

Re: Compile error

Post by francisCarvalho »

Hi!

While trying to install in CRUX linux.
The same error happens with "make install" after compiling with no errors, even after configuration using "--with-x --with-freetype".
But no configuration errors ...
francisCarvalho
Newbie
Newbie
Posts: 3
Joined: Tue Apr 07, 2020 10:07 pm

Re: Compile error

Post by francisCarvalho »

PS: Wine versions tested: 5.0 and 5.5
francisCarvalho
Newbie
Newbie
Posts: 3
Joined: Tue Apr 07, 2020 10:07 pm

Re: Compile error

Post by francisCarvalho »

Fixed! :-)

Wine 5.6 can be installed on CRUX just by using "prt-get depinst wine".
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Compile error

Post by Bob Wya »

Hmmm... Sounds a bit easier! :lol:
Locked