I am trying to build Wine 1.1.40 in Fedora 12 with wine.spec from src.rpm but I get this error:
configure: Finished. Do 'make' to compile Wine.
+ /usr/bin/make depend
config.status: creating tools/Makefile
make[1]: Entering directory `/home/user/rpmbuild/BUILD/wine-1.1.40/tools'
gcc -c -I. -I. -I../include -I../include -I/usr/include/freetype2 -D__WINESRC__ -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -Werror -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -o makedep.o makedep.c
cc1: warnings being treated as errors
makedep.c: In function 'get_line':
makedep.c:207: error: ignoring return value of 'fgets', declared with attribute warn_unused_result
makedep.c:219: error: ignoring return value of 'fgets', declared with attribute warn_unused_result
make[1]: *** [makedep.o] Error 1
make[1]: Leaving directory `/home/user/rpmbuild/BUILD/wine-1.1.40/tools'
make: *** [tools/Makefile] Error 2
make depend fails when building Wine 1.1.40
Re: make depend fails when building Wine 1.1.40
*I made some headway by removing -Wp,-D_FORTIFY_SOURCE=2 from the global cflags (by creating a custom %__global_cflags in ~/.rpmmacros (the default values are in /usr/lib/rpm/redhat/macros but it is better to put custom changes in ~/.rpmmacros because that file doesn't get overwritten by every yum update...)
The new line looks like:
%__global_cflags -O2 -g -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4
*There is a big update today for Fedora 12. kernel, x, everything. Try getting the updates first. It might work.
The new line looks like:
%__global_cflags -O2 -g -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4
*There is a big update today for Fedora 12. kernel, x, everything. Try getting the updates first. It might work.
Re: make depend fails when building Wine 1.1.40
Forget about that. The maintainers, for whatever reason, enabled maintainer mode in the wine.spec file and wine's configure.ac is enabling -Werror in maintainer mode, which doesn't belong in there. Maintainer mode is for automatically detecting when files like configure.ac change and rebuilding them, but anyway I don't want to get into an argument over what maintainer mode is for. Personally, I don't use it... My relevant section now looks like:
Code: Select all
autoreconf
%build
export CFLAGS="$RPM_OPT_FLAGS"
%configure \
--sysconfdir=%{_sysconfdir}/wine \
--x-includes=%{_includedir} --x-libraries=%{_libdir} \
--with-pulse \
--with-x \
%ifarch x86_64
--enable-win64 \
%endif
--disable-tests > /dev/null
%{__make} TARGETFLAGS="" %{?_smp_mflags} -s > /dev/null
%install
rm -rf %{buildroot}
- Notice I got rid of the extraneous "make depend" as it is no longer needed.
- Ignore the -s > /dev/null bits. Those are my personal preferences and I sometimes use them at my own risk and discretion
- Also add after %{_libdir}/wine/dinput8.dll.so the line:
%{_libdir}/wine/dispex.dll.so
Thank you, hellork.
I have successfully build Wine 1.1.40 after removing of --enable-maintainer-mode and %{__make} depend.
But previous attempt to build without -Wp,-D_FORTIFY_SOURCE=2 failed because of other error:
cc1: warnings being treated as errors
net.c: In function 'netconn_init':
net.c:463: error: assignment discards qualifiers from pointer target type
make[1]: *** [net.o] Error 1
make[1]: Leaving directory `/home/user/rpmbuild/BUILD/wine-1.1.40/dlls/winhttp'
make: *** [dlls/winhttp] Error 2
I have successfully build Wine 1.1.40 after removing of --enable-maintainer-mode and %{__make} depend.
But previous attempt to build without -Wp,-D_FORTIFY_SOURCE=2 failed because of other error:
cc1: warnings being treated as errors
net.c: In function 'netconn_init':
net.c:463: error: assignment discards qualifiers from pointer target type
make[1]: *** [net.o] Error 1
make[1]: Leaving directory `/home/user/rpmbuild/BUILD/wine-1.1.40/dlls/winhttp'
make: *** [dlls/winhttp] Error 2