From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 7 22:10:12 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 522A5106564A for ; Thu, 7 Apr 2011 22:10:12 +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 2E5E78FC13 for ; Thu, 7 Apr 2011 22:10:12 +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 p37MABpq048989 for ; Thu, 7 Apr 2011 22:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p37MABKW048988; Thu, 7 Apr 2011 22:10:11 GMT (envelope-from gnats) Resent-Date: Thu, 7 Apr 2011 22:10:11 GMT Resent-Message-Id: <201104072210.p37MABKW048988@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, Matthew Cashdollar Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17D4A106566B for ; Thu, 7 Apr 2011 22:09:48 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E0AED8FC0A for ; Thu, 7 Apr 2011 22:09:47 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p37M9lwm026466 for ; Thu, 7 Apr 2011 22:09:47 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p37M9ldH026465; Thu, 7 Apr 2011 22:09:47 GMT (envelope-from nobody) Message-Id: <201104072209.p37M9ldH026465@red.freebsd.org> Date: Thu, 7 Apr 2011 22:09:47 GMT From: Matthew Cashdollar To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/156263: zsh fails to compile watch.c due to wtmpx.h inclusion 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: Thu, 07 Apr 2011 22:10:12 -0000 >Number: 156263 >Category: ports >Synopsis: zsh fails to compile watch.c due to wtmpx.h inclusion >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: Thu Apr 07 22:10:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Matthew Cashdollar >Release: 9.0-CURRENT from March 25th 2011 >Organization: N/A >Environment: FreeBSD freebsd-vm.internal 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sat Mar 26 18:33:34 CDT 2011 root@freebsd-vm.internal:/usr/obj/usr/src/sys/GENERIC amd64 >Description: When I attempt to compile the zsh 4.3.11 port on CURRENT, I receive the following error: cc -c -I. -I/usr/local/include -DHAVE_CONFIG_H -O2 -fno-strict-aliasing -pipe -march=core2 -o watch.o watch.c watch.c: In function 'readwtab': watch.c:465: error: 'struct utmp' has no member named 'ut_type' watch.c: In function 'dowatch': watch.c:519: error: 'struct utmp' has no member named 'ut_type' *** Error code 1 Researching this a bit, I found that utmpx.h is a new /usr/include header introduced with FreeBSD 9. (http://svn.FreeBSD.org/viewvc/base/head/include/utmpx.h?view=log) However, as you can see in the compile output, zsh is still using struct utmp instead of struct utmpx. I believe this is caused by some configure macros in zsh which look for a utmpx / wtmpx but aren't able to find it... I'm not an expert on GNU Autoconf though: checking for utmp file... no checking for wtmp file... /var/log/wtmp checking for utmpx file... no checking for wtmpx file... no Anyway, to get back to the underlying problem.. if you look at the erroring lines in watch.c, they are pulled in due to a #define USER_PROCESS. Where is this coming from? I found it in /usr/include/utmpx.h. Zsh is including that file even when it is using utmp.h instead, due to GNU Configure defining HAVE_UTMPX_H. >From zsh watch.c: #ifdef HAVE_UTMPX_H # include #endif >How-To-Repeat: Attempt to install the zsh port on FreeBSD-current. >Fix: If you comment out the utmpx.h include at the top of watch.c, it compiles. I am now using zsh as my login shell on -CURRENT. I am not sure if the 'watch' functionality actually works - I am still testing that. (I doesn't seem to be working but I need to make some changes to my shell configs to test it further.) >Release-Note: >Audit-Trail: >Unformatted: