Urbanterror 4.3.x fail to build with errors below (or full build.log attachement) Reproducible: Always Steps to Reproduce: 1. emerge games-fps/urbanterror 2. 3. Actual Results: In file included from code/qcommon/unzip.h:57:0, from code/qcommon/files.c:34: code/qcommon/ioapi.h:38:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); ^~ code/qcommon/ioapi.h:39:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); ^~ code/qcommon/ioapi.h:40:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); ^~ code/qcommon/ioapi.h:41:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); ^~ code/qcommon/ioapi.h:42:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); ^~ code/qcommon/ioapi.h:43:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); ^~ code/qcommon/ioapi.h:44:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); ^~ -- I see that the ebuild adds '-DOF=_Z_OF' as a cppflags, but we also need it for cflags. Adding append-cflags "-DOF=_Z_OF" to src_compile() works fine for me.
Created attachment 523526 [details] build.log
Created attachment 523528 [details] emerge info
In fact with GCC 6 we only need append-cflags "-DOF=_Z_OF"
Hi, thanks for the report. I can't reproduce it though on my ~amd64 system (with gcc-6.4.0-r1 and your CFLAGS and USE flags). I’m setting up a complete stable system and will test there again. Which version of zlib do you use? Do you apply any user patches (e.g. via /etc/portage/patches/)? PS: cpp-flags are for the C preprocessor, not C++ flags. As far as I understood them they're (mostly) for "#include"s, and would be the correct place for the zlib flag here.
I use sys-libs/zlib-1.2.11-r1 with minizip use flag which is a www-client/chromium requirement. No user patches, except for gentoo-sources. I was talking about GCC 6, because in my mind, the build failure has started after the upgrade of GCC but it's not clearly related. I will try to re-build with zlib without minizip use flag.
Nop It's not related to minizip as I see that urbanterror need the flag too.
The bug actually depends on USE="server" as I overlooked the necessary parts of the Makefile. I added the neccessary lines to the Makefile patch.
Created attachment 524382 [details, diff] updated patch
> Adding append-cflags "-DOF=_Z_OF" to src_compile() works fine for me. Thanks, David! I added append-cflags "-DOF=_Z_OF" to the src_compile() and emerge is successfull now with USE="server".
I've looked at the source. They've bundled their own fork of zlib's minizip and not kept it up to date. I don't know how different their fork is but it would be worth comparing the latest minizip against this. Look at unzip.c and unzip.h.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d26453b62aa943abea979a8804dbcd0cfd54b4fb commit d26453b62aa943abea979a8804dbcd0cfd54b4fb Author: Nils Freydank <holgersson@posteo.de> AuthorDate: 2018-03-19 11:20:44 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-03-19 16:52:26 +0000 games-fps/urbanterror: Fix Makefile patch. Closes: https://bugs.gentoo.org/650232 Closes: https://github.com/gentoo/gentoo/pull/7506 Package-Manager: Portage-2.3.24, Repoman-2.3.6 .../files/urbanterror-4.3-fix-build_system.patch | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-)