From owner-freebsd-current@FreeBSD.ORG Sat Jul 12 07:01:30 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96E0037B401 for ; Sat, 12 Jul 2003 07:01:30 -0700 (PDT) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [66.31.45.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B89943FBF for ; Sat, 12 Jul 2003 07:01:29 -0700 (PDT) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h6CE2Wrx043216; Sat, 12 Jul 2003 10:02:32 -0400 (EDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h6CE2VHJ043210; Sat, 12 Jul 2003 10:02:31 -0400 (EDT) Date: Sat, 12 Jul 2003 10:02:31 -0400 From: Craig Rodrigues To: Michael Reifenberger Message-ID: <20030712140231.GA42299@crodrigues.org> References: <20030712105817.B22886@nihil.reifenberger.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <20030712105817.B22886@nihil.reifenberger.com> User-Agent: Mutt/1.4i cc: FreeBSD-Current Subject: Re: -current buildworld failure in libpam X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2003 14:01:30 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jul 12, 2003 at 10:59:44AM +0200, Michael Reifenberger wrote: > ===> lib/libpam/modules/pam_echo > cc -O2 -pipe > -I/usr/src/lib/libpam/modules/pam_echo/../../../../contrib/openpam/include > -I/usr/src/lib/libpam/modules/pam_echo/../../libpam -Wsystem-headers -Werror > -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow > -Wcast-align -Wno-uninitialized -c > /usr/src/lib/libpam/modules/pam_echo/pam_echo.c > /usr/src/lib/libpam/modules/pam_echo/pam_echo.c: In function `_pam_echo': > /usr/src/lib/libpam/modules/pam_echo/pam_echo.c:92: warning: dereferencing > type-punned pointer will break strict-aliasing rules > *** Error code 1 What do you have in your /etc/make.conf? If you change optimization from -O2 to -O, then this problem goes away. I looked into this problem, and created a patch based on a workaround for a similar problem that I saw here: http://sources.redhat.com/ml/libc-hacker/2002-11/msg00048.html Can you try this patch? -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch1.txt" Index: pam_echo.c =================================================================== RCS file: /home/ncvs/src/lib/libpam/modules/pam_echo/pam_echo.c,v retrieving revision 1.3 diff -u -u -r1.3 pam_echo.c --- pam_echo.c 6 Feb 2003 14:19:50 -0000 1.3 +++ pam_echo.c 12 Jul 2003 13:57:29 -0000 @@ -48,7 +48,11 @@ int argc, const char *argv[]) { char msg[PAM_MAX_MSG_SIZE]; - const char *str, *p, *q; + const char *p, *q; + union { + const char *s; + const void *ptr; + } str; int err, i, item; size_t len; @@ -89,12 +93,12 @@ } if (item == -1) continue; - err = pam_get_item(pamh, item, (const void **)&str); + err = pam_get_item(pamh, item, &str.ptr); if (err != PAM_SUCCESS) return (err); - if (str == NULL) - str = "(null)"; - for (q = str; *q != '\0' && len < sizeof(msg) - 1; ++q) + if (str.s == NULL) + str.s = "(null)"; + for (q = str.s; *q != '\0' && len < sizeof(msg) - 1; ++q) msg[len++] = *q; } } --2fHTh5uZTiUOsy+g--