NetBSD Problem Report #37435

From martin@duskware.de  Mon Nov 26 10:48:01 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 8EC8763B888
	for <gnats-bugs@gnats.netbsd.org>; Mon, 26 Nov 2007 10:48:01 +0000 (UTC)
Message-Id: <20071126102916.A0C0F63B888@narn.NetBSD.org>
Date: Mon, 26 Nov 2007 10:29:16 +0000 (UTC)
From: nakaji@jp.freebsd.org
Reply-To: nakaji@jp.freebsd.org
To: netbsd-bugs-owner@NetBSD.org
Subject: sysutils/fam fails on SunOS
X-Send-Pr-Version: www-1.0

>Number:         37435
>Category:       pkg
>Synopsis:       sysutils/fam fails on SunOS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 26 10:50:00 +0000 2007
>Last-Modified:  Tue Nov 27 01:38:30 +0000 2007
>Originator:     NAKAJI Hiroyuki
>Release:        SunOS 5.10 Generic_127112-03
>Organization:
>Environment:
SunOS deepsea.4407.kankyo-u.ac.jp 5.10 Generic_127112-03 i86pc i386 i86pc
>Description:
The compile of fam/lib/Client.c++ fails with these errors:

 CC -DHAVE_CONFIG_H -I. -I.. -I../include -DFAM_CONF=\"/usr/pkg/etc/fam.conf\" -xarch=amd64 -c Client.c++  -KPIC -DPIC -o .libs/Client.o
"Client.c++", line 133: Error: Use ";" to terminate declarations.
"Client.c++", line 134: Error: The "&" operator can only be applied to a variable or other l-value.
"Client.c++", line 135: Error: int is not a structure type.
"Client.c++", line 139: Error: int is not a structure type.
"Client.c++", line 139: Error: An integer constant expression is required within the array subscript operator.
"Client.c++", line 139: Warning: inbuf hides Client::inbuf.
"Client.c++", line 154: Error: int is not a structure type.
"Client.c++", line 173: Error: int is not a structure type.
"Client.c++", line 174: Error: int is not a structure type.
"Client.c++", line 186: Error: The "&" operator can only be applied to a variable or other l-value.
9 Error(s) and 1 Warning(s) detected.

Because "sun" is used as a variable's name and "sun" is defined to be "1" on SunOS, the code around line 133 is changed like this:

  struct sockaddr_un sun; -> struct sockaddr_un 1;

This happens by both Sun Studio and GNU Compiler Collection.

I think it is a bug of fam itself, but I don't want to create an account on sgi bugzilla.
>How-To-Repeat:
1. Prepare SunOS.
2. run following commands

cd /usr/pkgsrc/sysutils/fam
bmake all

>Fix:
patches/patch-ba should be updated.
see http://heimat.jp/~nakaji/NetBSD/pkgsrc/fam.diff

>Release-Note:

>Audit-Trail:
From: NAKAJI Hiroyuki <nakaji@jp.freebsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/37435: sysutils/fam fails on SunOS
Date: Mon, 26 Nov 2007 20:20:50 +0900

 Oops, my patch was incomplete. More changes are needed. I've updated my
 patch. http://heimat.jp/~nakaji/public_html/NetBSD/pkgsrc/fam.diff
 -- 
 NAKAJI Hiroyuki

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: snj@netbsd.org
Responsible-Changed-When: Tue, 27 Nov 2007 01:38:30 +0000
Responsible-Changed-Why:
Solaris problem.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.