Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444294 - www-server/varnish-3.0.3 doesn't compile on x86/amd64 uclibc systems
Summary: www-server/varnish-3.0.3 doesn't compile on x86/amd64 uclibc systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://www.varnish-cache.org/trac/ti...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 11:44 UTC by Michael Davies
Modified: 2012-12-12 03:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log importated from pastebin (build.log,176.28 KB, text/plain)
2012-11-22 16:33 UTC, Anthony Basile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Davies 2012-11-22 11:44:34 UTC
When I try to compile varnish-3.0.3 on a uclibc-based system, it gets this error:

In file included from /tmp/portage/www-servers/varnish-3.0.3/work/varnish-3.0.3/bin/varnishd/mgt_child.c:46:0:
/tmp/portage/www-servers/varnish-3.0.3/work/varnish-3.0.3/bin/varnishd/mgt.h:113:2: error: #error "Keep pthreads out of in manager process"

See full build.log: http://bpaste.net/show/59705/

emerge --info: http://bpaste.net/show/59709/


Reproducible: Always

Steps to Reproduce:
1. Retrieve appropriate stage3 for uclibc from mirror, e.g. 
<mirror>/gentoo/experimental/amd64/uclibc/stage3-amd64-uclibc-*-*.tar.bz2
(note that this bug occurs both for hardened and vanilla systems)
and install as usual

2. Unmask varnish 3.0.3 

3. emerge =www-servers/varnish-3.0.3
Actual Results:  
Varnish fails to compile with error regarding pthreads, which I believe is related to uclibc

Expected Results:  
Varnish should compile as expected
Comment 1 Anthony Basile gentoo-dev 2012-11-22 16:33:53 UTC
Created attachment 330238 [details]
build.log importated from pastebin

Please attach all logs since pastebins are likely to disappear in the future.
Comment 2 Anthony Basile gentoo-dev 2012-11-22 16:34:29 UTC
You may inline emerge --info:

Portage 2.1.11.31 (hardened/linux/uclibc/amd64, gcc-4.7.2, uclibc-0.9.33.2-r2, 3.6.7-ck1-grsec-lambda x86_64)
=================================================================
System uname: Linux-3.6.7-ck1-grsec-lambda-x86_64-QEMU_Virtual_CPU_version_-cpu64-rhel6-with-gentoo-2.2
Timestamp of tree: Thu, 22 Nov 2012 08:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p39
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.10.1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.5
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/uclibc:          0.9.33.2-r2
Repositories:

gentoo
    location: /usr/portage
    sync: rsync://rsync5.us.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
ACCEPT_PROPERTIES="*"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode hardened nptl pax_kernel pic -berkdb"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump"
CAMERAS="ptp2"
CBUILD="x86_64-gentoo-linux-uclibc"
CFLAGS="-O2 -march=corei7 -pipe -fmodulo-sched -fpredictive-commoning -ftree-vectorize -mfpmath=sse -g0 -fomit-frame-pointer --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mno-avx -maes -mpclmul -mpopcnt -mrdrnd -msahf"
CHOST="x86_64-gentoo-linux-uclibc"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog conntrack contextswitch cpu disk dns entropy ethstat filecount fscache iptables md memcached network nginx ntpd numa ping processes protocols rrdcached sensors tail tcpconns write_http uptime exec match_value vmem logfile write_graphite unixsock"
COLLISION_IGNORE="/lib/modules/* *.py[co]"
CONFIG_PROTECT="/etc /etc/TZ:/etc/env.d/00basic"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CURL_SSL="openssl"
CXXFLAGS="-O2 -march=corei7 -pipe -fmodulo-sched -fpredictive-commoning -ftree-vectorize -mfpmath=sse -g0 -fomit-frame-pointer --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mno-avx -maes -mpclmul -mpopcnt -mrdrnd -msahf"
DISTDIR="/home/portage/distfiles"
EDITOR="nano"
ELIBC="uclibc"
EMERGE_DEFAULT_OPTS="-v --with-bdeps=y --complete-graph --quiet-build=n"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles merge-sync noinfo noman parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec sftp -P \${port} \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
FFLAGS="-O2 -pipe"
GCC_SPECS=""
GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx"
GREP_COLOR="00;38;5;214"
GRUB_PLATFORMS=""
HOME="/root"
HTTPD_GROUP="www-data"
HTTPD_USER="www-data"
INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-gentoo-linux-uclibc/4.7.2/info:/usr/share/binutils-data/x86_64-gentoo-linux-uclibc/2.23.1/info"
INPUT_DEVICES="keyboard mouse evdev"
IUSE_IMPLICIT="prefix"
I_PROMISE_TO_SUPPLY_PATCHES_WITH_BUGS="1"
KERNEL="linux"
KVM="-mno-avx -maes -mpclmul -mpopcnt -mrdrnd -msahf"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed,-z,now,-z,combreloc -lm"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LOGNAME="root"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
MAIL="/var/mail/root"
MAKEOPTS="-j4"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-gentoo-linux-uclibc/4.7.2/man:/usr/share/binutils-data/x86_64-gentoo-linux-uclibc/2.23.1/man"
MENUCONFIG_COLOR="blackbg"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
NGINX_MODULES_HTTP="access autoindex auth_basic charset fastcgi gzip map referer rewrite scgi split_clients ssi userid uwsgi upload gzip_static xslt fancyindex browser upload_progress stub_status"
NGINX_MODULES_MAIL=""
NOCOLOR="true"
OLDPWD="/var/lib/collectd/rrd"
OTHER="-fmodulo-sched -fpredictive-commoning -ftree-vectorize -mfpmath=sse -g0 -fomit-frame-pointer"
PAGER="/usr/bin/less"
PARAMS="--param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-gentoo-linux-uclibc/gcc-bin/4.7.2"
PHP_INI_VERSION="production"
PHP_TARGETS="php5-4"
PKGDIR="/home/portage/packages"
PORTAGE_ARCHLIST="ppc sparc64-freebsd ppc-openbsd x86-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 arm-linux x86-macos x64-openbsd ia64-hpux hppa x86-netbsd ppc64-linux x86-cygwin amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris m68k sh x86-solaris sparc-fbsd"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_GPG_DIR="/etc/portage/gpg"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_IONICE_COMMAND="ionice -c 3 -p ${PID}"
PORTAGE_LIBC="uClibc"
PORTAGE_NICENESS="15"
PORTAGE_OVERRIDE_EPREFIX=""
PORTAGE_PYM_PATH="/usr/lib/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="2"
PORTAGE_SYNC_STALE="2"
PORTAGE_TMPDIR="/home/portage/tmp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PROMPT="%{[0;31m%}%D %*%{[0m%} %{[1;31m%}%n%{[30m%}@%{[31m%}%m%{[1;30m%}:%{[0;31m%}%~%{[0m%} %# "
PS2="%{[1;33m%}>%{[1;37m%}[%{[1;31m%}%_%{[1;37m%}]%{[0m%} "
PWD="/etc/nginx"
PYTHONDONTWRITEBYTECODE="1"
PYTHONPATH="/usr/lib/portage/pym"
PYTHON_TARGETS="python3_2 python2_7"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-gentoo-linux-uclibc/gcc-bin/4.7.2:/usr/lib/subversion/bin"
RPMDIR="/usr/portage/rpm"
RUBY_TARGETS="ruby18 ruby19"
SHELL="/bin/zsh"
SHLVL="2"
SSH_CLIENT="124.168.146.142 3267 22443"
SSH_CONNECTION="124.168.146.142 3267 192.30.32.171 22443"
SSH_TTY="/dev/pts/0"
SYMLINK_LIB="no"
SYNC="rsync://rsync5.us.gentoo.org/gentoo-portage"
TERM="screen-256color"
TMUX="/tmp/tmux-0/default,1601,0"
TMUX_PANE="%4"
UCLIBC_CPU="PENTIUM4"
UNINSTALL_IGNORE="/lib/modules/*"
USE="aio amd64 bash-completion cjk cracklib crypt curl cxx dri etags extraengine extras force-cgi-redirect fortran fpm gcj gd-external git glibc-omitfp gmp hardened hipe iproute2 ipv6 ithreads jpeg json kpoll libatomic markdown mhash mudflap ncurses nptl old-output openntpd optimization pax_kernel pcntl pcre pdo pic pppd python3 readline secure-delete security session sha512 smp sockets sse sse2 ssl static static-libs stats suhosin sysvipc threads tools tor-hardening uclibc unicode uuid vim-syntax xml xmlwriter xsl xtradb zlib zsh-completion" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog conntrack contextswitch cpu disk dns entropy ethstat filecount fscache iptables md memcached network nginx ntpd numa ping processes protocols rrdcached sensors tail tcpconns write_http uptime exec match_value vmem logfile write_graphite unixsock" CURL_SSL="openssl" ELIBC="uclibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="access autoindex auth_basic charset fastcgi gzip map referer rewrite scgi split_clients ssi userid uwsgi upload gzip_static xslt fancyindex browser upload_progress stub_status" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin FreeBSD glibc HPUX Interix mintlib NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Cygwin Darwin FreeBSD freemint HPUX Interix linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
USE_PYTHON="3.2 2.7"
VIDEO_CARDS="dummy fbdev v4l"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
_="/usr/bin/emerge"
Comment 3 Anthony Basile gentoo-dev 2012-11-22 20:10:15 UTC
Okay, the problem here is the way that glibc and uclibc stack their include files.  A reduced case .c to demonstrate this is:

    #include <stdio.h>

    #ifdef PTHREAD_CANCELED
    #warning "Why is PTHREAD_CANCELED in here?"
    #endif

    #ifdef PTHREAD_MUTEX_DEFAULT
    #warning "Why is PTHREAD_MUTEX_DEFAULT in here?"
    #endif

    #warning "Done with warnings."

This is to simulate the define checks at the end of varnish's

    bin/varnishd/mgt/mgt.h
    bin/varnishd/mgt/mgt_main.c

where we have

    #if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT)

Precompiling my reduced case .c above with `gcc -Wcpp -c test.c` you get the following on uclibc:

    test.c:4:2: warning: #warning "Why is PTHREAD_CANCELED in here?" [-Wcpp]
    test.c:11:2: warning: #warning "Done with warnings." [-Wcpp]

Note: Its PTHREAD_CANCELED that's triggering it, not PTHREAD_MUTEX_DEFAULT.  Compare to glibc you get only

    test.c:11:2: warning: #warning "Done with warnings."

Having seen problems with uclibc header file stacking, even if one concludes the problem is there, it might be a big project to reorganize them (Mike is this worth my looking into?).  As far as varnish goes, this can be fixed by just changing the check to

    #if (defined(PTHREAD_CANCELED) && !defined(__UCLIBC__)) || defined(PTHREAD_MUTEX_DEFAULT)

I'll have the patch varnish-3.0.3 by the end of the day and push a patch upstream to varnish.  After some more investigation, I'll decide whether to tackle uclibc upstream.
Comment 4 Anthony Basile gentoo-dev 2012-11-22 21:05:24 UTC
The patch is in the tree.  Please test.
Comment 5 SpanKY gentoo-dev 2012-11-25 04:03:42 UTC
(In reply to comment #4)

the stdio.h/pthread.h mess is a known issue.  it needs to be sorted out in uclibc upstream.  i've looked once or twice but moved on to other things because it's an ugly rats nest.
Comment 6 Anthony Basile gentoo-dev 2012-11-25 05:39:10 UTC
I've pushed this varnish's way: https://www.varnish-cache.org/trac/ticket/1230
Comment 7 Michael Davies 2012-11-25 06:27:57 UTC
Hi
Thanks for the prompt response and patch. 
I've been testing varnishd & other the other varnish tools built with this patch for the last couple days and it seems to be working flawlessly.
Comment 8 Anthony Basile gentoo-dev 2012-12-12 03:05:44 UTC
(In reply to comment #7)
> Hi
> Thanks for the prompt response and patch. 
> I've been testing varnishd & other the other varnish tools built with this
> patch for the last couple days and it seems to be working flawlessly.

The upstream solution is to go even further and remove the "bogus" phtread test althogether.  Next release and this should all be fixed.  In the mean time, my patch is good enough for 3.0.3.