Bug 202590 - databases/memcached: port fails to compile
Summary: databases/memcached: port fails to compile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 10:45 UTC by Christoph H. Larsen
Modified: 2015-09-20 02:46 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph H. Larsen 2015-08-23 10:45:24 UTC
Thanks a lot, Everyone, for the hard work! memcached is a great piece of software and has saved my neck several times.
However, since the latest upgrade via ports, I fail to compile memcached from ports (and have to use the pkg instead). Here is what happens:

-------------------------------%<-------------------------------
cc -DHAVE_CONFIG_H -I.   -I/usr/local/include  -m64 -O2 -pipe -march=athlon64  -fstack-protector -fno-strict-aliasing -std=c99 -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -MT memcached_debug-stats.o -MD -MP -MF .deps/memcached_debug-stats.Tpo -c -o memcached_debug-stats.o `test -f 'stats.c' || echo './'`stats.c
--- memcached_debug-items.o ---
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.
*** [memcached_debug-items.o] Error code 1

make[4]: stopped in /var/ports/basejail/usr/ports/databases/memcached/work/memcached-1.4.24
--- memcached_debug-daemon.o ---
mv -f .deps/memcached_debug-daemon.Tpo .deps/memcached_debug-daemon.Po
--- memcached_debug-assoc.o ---
mv -f .deps/memcached_debug-assoc.Tpo .deps/memcached_debug-assoc.Po
--- memcached_debug-jenkins_hash.o ---
mv -f .deps/memcached_debug-jenkins_hash.Tpo .deps/memcached_debug-jenkins_hash.Po
--- memcached_debug-stats.o ---
mv -f .deps/memcached_debug-stats.Tpo .deps/memcached_debug-stats.Po
--- memcached_debug-thread.o ---
mv -f .deps/memcached_debug-thread.Tpo .deps/memcached_debug-thread.Po
--- memcached_debug-slabs.o ---
mv -f .deps/memcached_debug-slabs.Tpo .deps/memcached_debug-slabs.Po
--- memcached_debug-memcached.o ---
mv -f .deps/memcached_debug-memcached.Tpo .deps/memcached_debug-memcached.Po
1 error

make[4]: stopped in /var/ports/basejail/usr/ports/databases/memcached/work/memcached-1.4.24
*** [all-recursive] Error code 1

make[3]: stopped in /var/ports/basejail/usr/ports/databases/memcached/work/memcached-1.4.24
1 error

make[3]: stopped in /var/ports/basejail/usr/ports/databases/memcached/work/memcached-1.4.24
*** [all] Error code 2

make[2]: stopped in /var/ports/basejail/usr/ports/databases/memcached/work/memcached-1.4.24
1 error

make[2]: stopped in /var/ports/basejail/usr/ports/databases/memcached/work/memcached-1.4.24
===> Compilation failed unexpectedly.
-------------------------------%<-------------------------------

I have this installed automatically, via ports for compilation:
autoconf-wrapper-20131203
automake-wrapper-20131203
autoconf-2.69
automake-1.15

Any ideas, clues, something obvious I may have missed?
Thanks a lot for your help!

Chris
Comment 1 Jason Unovitch freebsd_committer freebsd_triage 2015-08-23 14:12:40 UTC
Fix title and assign to maintainer.

I can't replicate a build failure in either an ezjail with existing cruft or clean Poudriere on 9.3, 10.1, 10.2, and 11.0 jails.

What is in make.conf?  Does it compile without the flags being passed for the '-march=athlon64'?
Comment 2 Steve Wills freebsd_committer freebsd_triage 2015-08-24 13:39:24 UTC
This is caused by ccache, disable it.
Comment 3 Christoph H. Larsen 2015-09-05 12:09:01 UTC
Alas, I am not using ccache.
Plus, this only came up about one month ago, after an port upgrade of memcached.
Comment 4 Christoph H. Larsen 2015-09-05 12:10:22 UTC
Here is my /etc/make.conf (inside the respective jail):

# set CPU type
CPUTYPE?=athlon64

# use pkgng
WITH_PKGNG=yes

# no profiling
NO_PROFILE=YES

# always compile MySQL with SSL, UTF-8 support and optimized
.if ${.CURDIR:M*/databases/mysql*}
    WITH_OPENSSL=yes
    WITHOUT_YASSL=yes
    WITH_XCHARSET=utf8
    BUILD_OPTIMIZED=yes
.endif

# we run a headless server
OPTIONS_UNSET=X11

# give jails their own ports management area
WRKDIRPREFIX=           /var/ports
DISTDIR=                /var/ports/distfiles
PACKAGES=               /var/ports/packages
INDEXDIR=               /var/ports
Comment 5 Steve Wills freebsd_committer freebsd_triage 2015-09-08 18:46:08 UTC
(In reply to Christoph H. Larsen from comment #4)
Ok, I guess ccache isn't the issue then.

The port does build fine in the cluster:

http://portsmon.freebsd.org/portoverview.py?category=databases&portname=memcached

and for me and Jason, so I have to think it's something local, though right now I can't figure out what.
Comment 6 Steve Wills freebsd_committer freebsd_triage 2015-09-09 22:22:08 UTC
(In reply to Steve Wills from comment #5)
Could you send the full build log for this failure?
Comment 7 Christoph H. Larsen 2015-09-13 15:57:35 UTC
Dear All,

With the latest port upgrade from memcached-1.4.24 to memcached-1.4.24_1, compilation works fine, provided I set MAKE_JOBS_UNSAFE=yes. Not sure why the latter works this time, but it does.

Thanks a lot, indeed!
Best regards from Sierra Leone,
Chris
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-09-14 18:52:58 UTC
A commit references this bug:

Author: swills
Date: Mon Sep 14 18:52:17 UTC 2015
New revision: 396926
URL: https://svnweb.freebsd.org/changeset/ports/396926

Log:
  databases/memcached: mark MAKE_JOBS_UNSAFE

  PR:		202590

Changes:
  head/databases/memcached/Makefile
Comment 9 Steve Wills freebsd_committer freebsd_triage 2015-09-14 18:53:39 UTC
That would explain it, and why I couldn't figure it out. Marked MAKE_JOBS_UNSAFE, thanks for the hint.
Comment 10 Phil 2015-09-20 02:46:40 UTC
(In reply to Steve Wills from comment #9)
Updated /usr/ports this morning.  Commenced FULL ports rebuild (a fortightly event).

I've built memcached successfully on FreeBSD10.2S (updated last night): i386, but not on amd64. Both using ccache.
After the amd64 failure, the ccache was cleared.  Retry resulted in:

make -DBATCH -DUSE_CORE2 package
===>  Building for memcached-1.4.24_2
/usr/bin/make  all-recursive
Making all in doc
/usr/bin/make  all-am
/usr/local/libexec/ccache/cc -DHAVE_CONFIG_H -I.   -I/usr/local/include -O2 -pipe -g0 -ggdb0 -DSTRIP_FBSDID -march=core-avx-i  -I/usr/local/include -fno-strict-aliasing -std=c99  -m64 -O2 -pipe -g0 -ggdb0 -DSTRIP_FBSDID -march=core-avx-i  -I/usr/local/include -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