Created attachment 159309 [details] Patch for games/iourbanterror on CURRENT and most recent ports/tree On FreeBSD CURRENT (FreeBSD 11.0-CURRENT #12 r285890: Sun Jul 26 13:26:39 CEST 2015 amd64) and most recent ports/tree (Rev: 392988) games/iourbanterror rejects to compile due to an interface mismatch in code/libspeex/bits.c with most recent port's libspeex installed: [...] CC code/libspeex/bits.c code/libspeex/bits.c:109:6: error: conflicting types for 'speex_bits_read_from' void speex_bits_read_from(SpeexBits *bits, char *chars, int len) ^ /usr/local/include/speex/speex_bits.h:80:6: note: previous declaration is here void speex_bits_read_from(SpeexBits *bits, const char *bytes, int len); ^ code/libspeex/bits.c:156:6: error: conflicting types for 'speex_bits_read_whole_bytes' void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes) ^ /usr/local/include/speex/speex_bits.h:88:6: note: previous declaration is here void speex_bits_read_whole_bytes(SpeexBits *bits, const char *bytes, int len); ^ 2 errors generated. [...] The problem can be (syntactically) simply solved by the attached patchfile, which adjusts the call of the speex routines in question to the definitions given by the speex library.
I'm not sure this patch solves the root of the problem. iourbanterror doesn't seem to depend on speex at all, it ships bundled libspeex and tries to build it. The problem occurs when speex is installed on the system and its headers are used instead of a bundled speex's. cc -O2 -pipe -fstack-protector -fno-strict-aliasing -MMD -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -DHOMEPATH=\"/.ioUrbanTerror\" -DDEFAULT_LIBDIR=\"/usr/local/lib/iourbanterror\" -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON -I/usr/local/include/SDL -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -DUSE_CURL -I/usr/local/include -DUSE_CODEC_VORBIS -I/usr/local/include -DUSE_MUMBLE -DUSE_VOIP -DFLOATING_POINT -DUSE_ALLOCA -Icode/libspeex/include -DDEFAULT_BASEDIR=\"/usr/local/share/quake3\" -DSTANDALONE -DPRODUCT_VERSION=\"1.36+4.2.018\" -o build/release-freebsd-amd64/client/buffer.o -c code/libspeex/buffer.c code/libspeex/bits.c:109:6: error: conflicting types for 'speex_bits_read_from' void speex_bits_read_from(SpeexBits *bits, char *chars, int len) ^ If you take a look at the "-I"s in CFLAGS you'll see that /usr/local/include comes before code/libspeex/include. I think the proper fix would be to make build system pass -Icode/libspeex/include before -I/usr/local/include to make it use right header files.
Created attachment 161502 [details] Fix include order for bundled libspee Could you please try this patch? It's for master port, ioquake3, and it fixes problem for me for iourbanterror.
A commit references this bug: Author: novel Date: Wed Sep 30 15:18:07 UTC 2015 New revision: 398218 URL: https://svnweb.freebsd.org/changeset/ports/398218 Log: Fix build when system libspeex is installed The build system uses incorrect include order and it picks system libspeex headers instead of bundled one so build fails because of the interface difference. Fix that by forcing including bundled libspeex. This also fixes build of iourbanterror build. PR: 201926 Changes: head/games/ioquake3/files/patch-Makefile
This has been committed a month ago.