Summary: | databases/memcached Builds on i386, fails on amd64 with assert tautology error | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Phil <phil> |
Component: | Individual Port(s) | Assignee: | Steve Wills <swills> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | c.kworr |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(swills) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Phil
2015-09-20 03:02:48 UTC
Either disable ccache or set the CCACHE_CPP2 environment variable during your build. Turning ccache off only transforms that into: items.c:1141:28: warning: comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] assert(it->slabs_clsid < LARGEST_ID); ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ /usr/include/assert.h:54:21: note: expanded from macro 'assert' #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ ^ 1 warning generated. Already should be fixed upstream though, yet the highlighted line was probably forgotten: https://github.com/memcached/memcached/commit/f0358c023e79d0ffc320222afe8a978f528e52a3 (In reply to c.kworr from comment #2) I see the assert and agree that the fix is probably to simply remove it, but what I don't understand is why the issue is an error for you and only a warning in my build. Any ideas? (In reply to c.kworr from comment #2) I noticed too that in the initial bug report it was an error, but in comment 2 it shows as only a warning. ccache it is: # without CCACHE_CPP2 clang37 -DHAVE_CONFIG_H -I. -I/usr/local/include -m64 -O3 -pipe -march=native -fstack-protector -fno-strict-aliasing -std=c99 -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-slabs.o -MD -MP -MF .deps/memcached_debug-slabs.Tpo -c -o memcached_debug-slabs.o `test -f 'slabs.c' || echo './'`slabs.c mv -f .deps/memcached_debug-slabs.Tpo .deps/memcached_debug-slabs.Po clang37 -DHAVE_CONFIG_H -I. -I/usr/local/include -m64 -O3 -pipe -march=native -fstack-protector -fno-strict-aliasing -std=c99 -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-items.o -MD -MP -MF .deps/memcached_debug-items.Tpo -c -o memcached_debug-items.o `test -f 'items.c' || echo './'`items.c items.c:1141:28: error: comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Werror,-Wtautological-constant-out-of-range-compare] assert(it->slabs_clsid < LARGEST_ID); ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ /usr/include/assert.h:54:21: note: expanded from macro 'assert' #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ ^ 1 error generated. *** Error code 1 # with CCACHE_CPP2 clang37 -DHAVE_CONFIG_H -I. -I/usr/local/include -m64 -O3 -pipe -march=native -fstack-protector -fno-strict-aliasing -std=c99 -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-slabs.o -MD -MP -MF .deps/memcached_debug-slabs.Tpo -c -o memcached_debug-slabs.o `test -f 'slabs.c' || echo './'`slabs.c mv -f .deps/memcached_debug-slabs.Tpo .deps/memcached_debug-slabs.Po clang37 -DHAVE_CONFIG_H -I. -I/usr/local/include -m64 -O3 -pipe -march=native -fstack-protector -fno-strict-aliasing -std=c99 -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-items.o -MD -MP -MF .deps/memcached_debug-items.Tpo -c -o memcached_debug-items.o `test -f 'items.c' || echo './'`items.c items.c:1141:28: warning: comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] assert(it->slabs_clsid < LARGEST_ID); ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ /usr/include/assert.h:54:21: note: expanded from macro 'assert' #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ ^ 1 warning generated. It ends up adding -Werror from somewhere. A commit references this bug: Author: swills Date: Tue Oct 27 18:01:29 UTC 2015 New revision: 400333 URL: https://svnweb.freebsd.org/changeset/ports/400333 Log: databases/memcached: fix build with ccache on 64bit systems PR: 203219 Changes: head/databases/memcached/files/patch-items.c Fixed, please let me know if you are still experiencing issues. |