From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Oct 22 23:40:06 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD2C1065673 for ; Sat, 22 Oct 2011 23:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0ECEA8FC13 for ; Sat, 22 Oct 2011 23:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9MNe5MM009966 for ; Sat, 22 Oct 2011 23:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9MNe5OF009965; Sat, 22 Oct 2011 23:40:05 GMT (envelope-from gnats) Resent-Date: Sat, 22 Oct 2011 23:40:05 GMT Resent-Message-Id: <201110222340.p9MNe5OF009965@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nali Toja Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C3DC1065670 for ; Sat, 22 Oct 2011 23:35:33 +0000 (UTC) (envelope-from nalitoja@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id D66F28FC18 for ; Sat, 22 Oct 2011 23:35:32 +0000 (UTC) Received: by eyd10 with SMTP id 10so6302793eyd.13 for ; Sat, 22 Oct 2011 16:35:31 -0700 (PDT) Received: by 10.14.16.97 with SMTP id g73mr2244817eeg.73.1319326531552; Sat, 22 Oct 2011 16:35:31 -0700 (PDT) Received: from nil ([184.107.230.50]) by mx.google.com with ESMTPS id q28sm8321312eea.6.2011.10.22.16.35.27 (version=SSLv3 cipher=OTHER); Sat, 22 Oct 2011 16:35:30 -0700 (PDT) Message-Id: <86sjmkd3wr.fsf@gmail.com> Date: Sat, 22 Oct 2011 23:34:56 +0000 From: Nali Toja To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/161911: [patch] editors/emacs-devel: broken pthread_sigmask() X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 23:40:06 -0000 >Number: 161911 >Category: ports >Synopsis: [patch] editors/emacs-devel: broken pthread_sigmask() >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 22 23:40:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Nali Toja >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: BATCH= WITHOUT_X11= WITHOUT_DBUS= WITHOUT_GNUTLS= >Description: The last gnulib merge in r105666 breaks the one defined in libthr by marking it with defines checked against the stub in libc. PTHREAD_SIGMASK_INEFFECTIVE [1] PTHREAD_SIGMASK_UNBLOCK_BUG [2] while HAVE_PTHREAD assumes the symbol comes from -lpthread. It's a bit unclear whether this is a bug in gnulib, emacs or actually a feature[3], so let's follow gnulib instructions (at least for now) dnl The module 'threadlib' is not in use, due to --avoid=threadlib being dnl specified. dnl The package either has prepared CPPFLAGS and LIBS for use of POSIX:2008 dnl threads, or wants to build single-threaded programs. if test $ac_cv_func_pthread_sigmask = yes; then dnl pthread_sigmask exists and does not require extra libraries. dnl Assume that it is declared. : as according to GNULIB_TOOL_FLAGS in WRKSRC/Makefile.in emacs uses --avoid=threadlib and some system libs (e.g. dbus) bring -lpthread, anyway. [1] http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=2616a65 [2] http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=2909043 [3] nox11 emacs seems to work fine without linking against -lpthread >How-To-Repeat: $ emacs -Q -nw /path/to/bsd.port.mk (or any other versioned file) M-x vc-annotate (Annotate [waiting...] from bsd.port.mk) In my case it permanently waits while consuming 100% cpu in top(1) where `cvs' process (from `list-processes') has long since exited. >Fix: --- pthread_sigmask.diff begins here --- Index: editors/emacs-devel/Makefile =================================================================== RCS file: /a/.csup/ports/editors/emacs-devel/Makefile,v retrieving revision 1.58 diff -u -p -r1.58 Makefile --- editors/emacs-devel/Makefile 17 Oct 2011 04:55:31 -0000 1.58 +++ editors/emacs-devel/Makefile 22 Oct 2011 21:55:34 -0000 @@ -32,8 +32,8 @@ GNU_CONFIGURE= yes USE_GMAKE= yes USE_NCURSES= yes USE_XZ= yes -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS} +LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} CONFIGURE_ARGS= --localstatedir=/var WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USE_AUTOTOOLS= autoconf:env automake:env aclocal:env autoheader:env --- pthread_sigmask.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: