NetBSD Problem Report #54608

From palle@netbsd.org  Mon Oct  7 19:39:38 2019
Return-Path: <palle@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id DFA077A184
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  7 Oct 2019 19:39:37 +0000 (UTC)
Message-Id: <20191007193937.94DCB84DBE@mail.netbsd.org>
Date: Mon,  7 Oct 2019 19:39:37 +0000 (UTC)
From: palle@netbsd.org
Reply-To: palle@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: devel/glib2 fails to build on Solaris 11
X-Send-Pr-Version: 3.95

>Number:         54608
>Category:       pkg
>Synopsis:       devel/glib2 fails to build on Solaris 11
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 07 19:40:00 +0000 2019
>Closed-Date:    Sun Mar 08 19:49:25 +0000 2020
>Last-Modified:  Sun Mar 08 19:50:01 +0000 2020
>Originator:     Palle Lyckegaard
>Release:        Solaris 11 (Solaris 11.3)
>Organization:
NetBSD
>Environment:
SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise
>Description:
Referencing a field in the msghdr struct fails since relevant defines are not specified
>How-To-Repeat:
Build devel/glib2 on a Solaris 11.3 system
>Fix:
The following patch solved the issue (unsure if the devel/glib2/options.mk file is
                the correct place to put the define...)
Index: devel/glib2/options.mk                                                                              ===================================================================
RCS file: /cvsroot/pkgsrc/devel/glib2/options.mk,v                                                         retrieving revision 1.21                                                                                   diff -u -r1.21 options.mk                                                                                  --- devel/glib2/options.mk      3 Jun 2019 09:53:50 -0000       1.21                                       +++ devel/glib2/options.mk      7 Oct 2019 19:24:45 -0000                                                  @@ -12,3 +12,5 @@
 PLIST.fam=     yes                                                                                         .include "../../mk/fam.buildlink3.mk"                                                                      .endif                                                                                                    +                                                                                                          +CPPFLAGS.SunOS+=-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1                                                                                                                                                      


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Tue, 08 Oct 2019 08:45:07 +0000
Responsible-Changed-Why:
A Solarish problem.


From: "Patrick Welche" <prlw1@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54608 CVS commit: pkgsrc/devel/glib2
Date: Tue, 8 Oct 2019 08:48:15 +0000

 Module Name:	pkgsrc
 Committed By:	prlw1
 Date:		Tue Oct  8 08:48:15 UTC 2019

 Modified Files:
 	pkgsrc/devel/glib2: Makefile

 Log Message:
 Fix build on SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise
 from Palle Lyckegaard in PR pkg/54608.


 To generate a diff of this commit:
 cvs rdiff -u -r1.259 -r1.260 pkgsrc/devel/glib2/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54608: devel/glib2 fails to build on Solaris 11
Date: Tue, 8 Oct 2019 09:52:35 +0100

 For the purposes of an upstream report, could you please post the errors you saw?

From: "Patrick Welche" <prlw1@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54608 CVS commit: pkgsrc/devel/glib2
Date: Tue, 8 Oct 2019 10:58:17 +0000

 Module Name:	pkgsrc
 Committed By:	prlw1
 Date:		Tue Oct  8 10:58:17 UTC 2019

 Modified Files:
 	pkgsrc/devel/glib2: Makefile

 Log Message:
 Revert previous as per note from jpkerin@ (PR pkg/54608)


 To generate a diff of this commit:
 cvs rdiff -u -r1.260 -r1.261 pkgsrc/devel/glib2/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Palle Lyckegaard <palle@lyckegaard.dk>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, gnats-admin@netbsd.org,
        pkgsrc-bugs@netbsd.org, palle@netbsd.org
Subject: Re: pkg/54608: devel/glib2 fails to build on Solaris 11
Date: Tue, 8 Oct 2019 19:18:39 +0000 (UTC)

 On Tue, 8 Oct 2019, Patrick Welche wrote:

 >
 > For the purposes of an upstream report, could you please post the errors you saw?
 >
 >

 Sure - here it comes...


 ...
 In file included from ../glib/glib.h:30:0,
                   from ../gobject/gbinding.h:28,
                   from ../glib/glib-object.h:23,
                   from ../gio/gioenums.h:28,
                   from ../gio/giotypes.h:28,
                   from ../gio/gsocket.h:30,
                   from ../gio/gsocket.c:30:
 ../gio/gsocket.c:4460:43: error: 'struct msghdr' has no member named 
 'msg_controllen'; did you mean 'msg_namelen'?
         _msg->msg_control = g_alloca (_msg->msg_controllen); \
   ...


 Solaris header file sys/socket.h has the following definition of the 
 msghdr struct (msg_controllen is only present when _XPG4_2 is defined):

 /*
   * Message header for recvmsg and sendmsg calls.
   */
 struct msghdr {
          void            *msg_name;              /* optional address */
          socklen_t       msg_namelen;            /* size of address */
          struct iovec    *msg_iov;               /* scatter/gather array */
          int             msg_iovlen;             /* # elements in msg_iov 
 */

 #if defined(__lint) || defined(_XPG4_2) || defined(_KERNEL)
          void            *msg_control;           /* ancillary data */
          socklen_t       msg_controllen;         /* ancillary data buffer 
 len */
          int             msg_flags;              /* flags on received 
 message */
 #else
          caddr_t         msg_accrights;  /* access rights sent/received */
          int             msg_accrightslen;
 #endif  /* defined(_XPG4_2) || defined(_KERNEL) */
 };



 Based on the standards(5) Solaris man page, in order to enable XPGv2 (SUS) 
 ...
     XPG4            The  application  must  define  _XOPEN_SOURCE  and  set
                     _XOPEN_VERSION=4.  If  _XOPEN_SOURCE  is defined with a
                     value, the value must be less than 500.
 ...


From: Palle Lyckegaard <palle@lyckegaard.dk>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, gnats-admin@netbsd.org,
        pkgsrc-bugs@netbsd.org, palle@netbsd.org
Subject: Re: pkg/54608: devel/glib2 fails to build on Solaris 11
Date: Thu, 10 Oct 2019 17:55:23 +0000 (UTC)

 Updated patch below.

 Comments?


 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/glib2/Makefile,v
 retrieving revision 1.261
 diff -u -r1.261 Makefile
 --- Makefile    8 Oct 2019 10:58:17 -0000       1.261
 +++ Makefile    10 Oct 2019 17:50:23 -0000
 @@ -11,6 +11,7 @@
   # Avoid linux dependency on libmount-dev
   MESON_ARGS+=   -Dlibmount=false

 +CPPFLAGS.SunOS+=        -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1
   LDFLAGS.SunOS+=                -lintl -lnsl

   REPLACE_PYTHON+=       gio/gio-querymodules-wrapper.py




State-Changed-From-To: open->feedback
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 29 Feb 2020 11:01:05 +0000
State-Changed-Why:
Palle, you posted a new patch after Patrick made a commit
(on Oct 8). Does updating glib2 to the latest version fix
the problem?


From: Palle Lyckegaard <palle.lyckegaard@gmail.com>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, pkgsrc-bugs@netbsd.org, 
	gnats-admin@netbsd.org, bsiegert@netbsd.org, 
	Palle Lyckegaard <palle@netbsd.org>
Subject: Re: pkg/54608 (devel/glib2 fails to build on Solaris 11)
Date: Mon, 2 Mar 2020 20:54:43 +0100

 --0000000000009bba96059fe48f77
 Content-Type: text/plain; charset="UTF-8"

 Hi.

 I will try to verify this.

 Regards
 Palle

 On Sat, Feb 29, 2020 at 12:01 PM <bsiegert@netbsd.org> wrote:

 > Synopsis: devel/glib2 fails to build on Solaris 11
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: bsiegert@NetBSD.org
 > State-Changed-When: Sat, 29 Feb 2020 11:01:05 +0000
 > State-Changed-Why:
 > Palle, you posted a new patch after Patrick made a commit
 > (on Oct 8). Does updating glib2 to the latest version fix
 > the problem?
 >
 >
 >
 >

 --0000000000009bba96059fe48f77
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr">Hi.<div><br></div><div>I will try to verify this.<div><br>=
 </div><div>Regards</div></div><div>Palle</div></div><br><div class=3D"gmail=
 _quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Feb 29, 2020 at 12:01=
  PM &lt;<a href=3D"mailto:bsiegert@netbsd.org">bsiegert@netbsd.org</a>&gt; =
 wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
 px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Synopsis:=
  devel/glib2 fails to build on Solaris 11<br>
 <br>
 State-Changed-From-To: open-&gt;feedback<br>
 State-Changed-By: bsiegert@NetBSD.org<br>
 State-Changed-When: Sat, 29 Feb 2020 11:01:05 +0000<br>
 State-Changed-Why:<br>
 Palle, you posted a new patch after Patrick made a commit<br>
 (on Oct 8). Does updating glib2 to the latest version fix<br>
 the problem?<br>
 <br>
 <br>
 <br>
 </blockquote></div>

 --0000000000009bba96059fe48f77--

State-Changed-From-To: feedback->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sun, 08 Mar 2020 19:49:25 +0000
State-Changed-Why:
Submitter says it works now.


From: Palle Lyckegaard <palle@lyckegaard.dk>
To: Palle Lyckegaard <palle.lyckegaard@gmail.com>
Cc: gnats-bugs@netbsd.org, solaris-pkg-people@netbsd.org,
        pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org, bsiegert@netbsd.org,
        Palle Lyckegaard <palle@netbsd.org>
Subject: Re: pkg/54608 (devel/glib2 fails to build on Solaris 11)
Date: Sun, 8 Mar 2020 19:48:27 +0000 (UTC)

 On Mon, 2 Mar 2020, Palle Lyckegaard wrote:

 > Hi.
 > I will try to verify this.
 > Regards
 > Palle
 >

 builds fine on a 11.3 system with PATH properly setup so the GNU 
 version of the ar command is picked up instead of Solaris default 
 /usr/bin/ar


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.