From owner-freebsd-ports@FreeBSD.ORG Thu May 26 10:00:53 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A08991065670; Thu, 26 May 2011 10:00:53 +0000 (UTC) (envelope-from magik@roorback.net) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3BB8FC08; Thu, 26 May 2011 10:00:51 +0000 (UTC) Received: by wyf23 with SMTP id 23so492623wyf.13 for ; Thu, 26 May 2011 03:00:51 -0700 (PDT) Received: by 10.227.178.14 with SMTP id bk14mr625766wbb.102.1306404050960; Thu, 26 May 2011 03:00:50 -0700 (PDT) Received: from [10.1.1.66] ([157.25.200.146]) by mx.google.com with ESMTPS id ge4sm349309wbb.13.2011.05.26.03.00.49 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 03:00:50 -0700 (PDT) Message-ID: <4DDE24D0.1050306@roorback.net> Date: Thu, 26 May 2011 12:00:48 +0200 From: Grzegorz Blach User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: wen heping References: <4DDE006D.2090405@gmail.com> <4DDE0276.8050903@roorback.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------070303020600030305010206" Cc: David Demelier , wen@freebsd.org, freebsd-ports@freebsd.org Subject: Re: sysutils/tmux fails to compile X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 10:00:53 -0000 This is a multi-part message in MIME format. --------------070303020600030305010206 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2011-05-26 10:40, wen heping wrote: > 2011/5/26 Grzegorz Blach: >> On 2011-05-26 09:25, David Demelier wrote: >>> >>> Hello, >>> >>> Since the last update tmux fails to compile : >>> >>> ===> Building for tmux-1.4_5 >>> cc -iquote. -O2 -pipe -march=core2 -DBUILD="\"1.4\"" -c attributes.c -o >>> attributes.o >>> In file included from attributes.c:23: >>> tmux.h:30:19: error: event.h: No such file or directory >>> In file included from attributes.c:23: >>> tmux.h:830: error: field 'name_timer' has incomplete type >>> tmux.h:1032: error: field 'key_timer' has incomplete type >>> tmux.h:1093: error: field 'event' has incomplete type >>> tmux.h:1117: error: field 'repeat_timer' has incomplete type >>> tmux.h:1139: error: field 'identify_timer' has incomplete type >>> tmux.h:1142: error: field 'message_timer' has incomplete type >>> *** Error code 1 >>> >>> Stop in /usr/ports/sysutils/tmux/work/tmux-1.4. >>> >>> >>> It fails even if LIBEVENT2 is not selected. >>> >>> markand@Melon /usr/ports/sysutils/tmux $ make showconfig >>> ===> The following configuration options are available for tmux-1.4_5: >>> KQUEUE=on "Build without define HAVE_BROKEN_KQUEUE " >>> LIBEVENT2=on "Use libevent version 2" >>> LIBEVENT_STATIC=off "Build with static libevent" >>> BACKSPACE=off "Build with tty/keys patch" >>> ===> Use 'make config' to modify these settings >>> >>> Cheers, >>> >> >> >> I fixed this yesterday on my machine. >> Generally, CFLAGS from tmux/Makefile is replaced with CLFAGS from >> /etc/make.conf. For defined include path in tmux/Makefile >> "CFLAGS+= -I..." should be replaced with "CPPFLAGS+= -I..." > > Yes, this way fix the build when define CFLAGS in /etc/make.conf. > > But it will fail when define CPPFLAGS in /etc/make.conf. > > > wen > Attached patch fix (I hope) build when CFLAGS and/or CPPFLAGS is defined in /etc/make.conf. --------------070303020600030305010206 Content-Type: text/x-diff; name="tmux-Makefile.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tmux-Makefile.diff" --- Makefile.orig 2011-05-26 09:57:23.000000000 +0000 +++ Makefile 2011-05-26 09:56:55.000000000 +0000 @@ -35,14 +35,14 @@ .include .if defined(WITH_LIBEVENT2) -CFLAGS+= -I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include +EXTRA_CPPFLAGS+= -I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib/event2 .else -CFLAGS+= -I${LOCALBASE}/include +EXTRA_CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib .endif -MAKE_ENV+= LDFLAGS="${LDFLAGS}" +MAKE_ENV+= EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}" LDFLAGS="${LDFLAGS}" .if defined(WITH_LIBEVENT_STATIC) . if defined(WITH_LIBEVENT2) @@ -81,6 +81,7 @@ ${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h @${REINPLACE_CMD} -e 's|-I/usr/local/include||g' \ -e 's|/usr/local|${LOCALBASE}|g' \ + -e 's|$${CPPFLAGS}$$|${CPPFLAGS} ${EXTRA_CPPFLAGS}|g' \ -e 's|LDFLAGS+=|#LDFLAGS+=|g' \ ${WRKSRC}/Makefile @${REINPLACE_CMD} -e 's|-levent|${_LEVENT_LIB}|g' \ --------------070303020600030305010206--