Hello, I am trying package to update the https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-glib2 package that I branched https://build.opensuse.org/package/show/home:Infrandomness:branches:windows:mingw:win64/mingw64-glib2,
I use the %meson macro but for some reason, that macro sets up some environment variables bringing up -Werror=return-type,
whenever the project tries to compile, it fails because gcc detects a warning of type return-type and treats it as an error, and gcc stops compiling;
I tried to retrace back that environment variable with the command " rpm --eval “%meson” ", but that’s what it brings up :
export LANG=C.UTF-8
export CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}"
export CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}"
export FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}"
export FCFLAGS="${FCFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}"
/usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-suse-linux
I then checked the spec file https://build.opensuse.org/package/view_file/GNOME:Factory/glib2/glib2.spec?expand=1of the glib2 package https://build.opensuse.org/package/show/GNOME:Factory/glib2 from the factory, I can’t seem to figure out how it works there and not here, I have checked the patch files to see if the meson buildscript or the macro was being changed to remove that warning but it doesn’t seem to be the case…
I really don’t know where that “-Werror=return-type” comes from, and even less how to remove it or tell meson/gcc to continue even if a warning of type “return-type” is encountered, if someone has already worked around that, I’d like to know how.