NetBSD Problem Report #56169

From www@netbsd.org  Fri May 14 18:32:11 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 2C29B1A9243
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 May 2021 18:32:11 +0000 (UTC)
Message-Id: <20210514183209.40E381A9287@mollari.NetBSD.org>
Date: Fri, 14 May 2021 18:32:09 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: modular-xorg-xephyr build problem on Solaris 10
X-Send-Pr-Version: www-1.0

>Number:         56169
>Category:       pkg
>Synopsis:       modular-xorg-xephyr build problem on Solaris 10
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    khorben
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 14 18:35:00 +0000 2021
>Closed-Date:    
>Last-Modified:  Thu Jun 24 18:45:01 +0000 2021
>Originator:     Claes Nstn
>Release:        trunk 2021-05-14
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc

>Description:
Building modular-xorg-xephyr on Solaris 10 x86_64 fails due to missing strnlen and err.h.
>How-To-Repeat:
Build modular-xorg-xephyr on Solaris 10.
>Fix:
diff --git a/x11/modular-xorg-server/Makefile.common b/x11/modular-xorg-server/Makefile.common
index 75c3600e464..4642c09239e 100644
--- a/x11/modular-xorg-server/Makefile.common
+++ b/x11/modular-xorg-server/Makefile.common
@@ -15,6 +15,7 @@ GNU_CONFIGURE=        yes
 USE_LIBTOOL=   yes
 USE_TOOLS+=    gmake pkg-config
 USE_LANGUAGES+=        c99
+USE_FEATURES+= strnlen err

 CHECK_PORTABILITY_SKIP+=       hw/xquartz/bundle/mk_bundke.sh

diff --git a/x11/modular-xorg-server/distinfo b/x11/modular-xorg-server/distinfo
index 3c45bf9ff07..6639fe06b50 100644
--- a/x11/modular-xorg-server/distinfo
+++ b/x11/modular-xorg-server/distinfo
@@ -5,7 +5,7 @@ RMD160 (xorg-server-1.20.11.tar.bz2) = 9b451d5523e9384df37e0e91f52d843090590d23
 SHA512 (xorg-server-1.20.11.tar.bz2) = 1017015b9fd5d53788abe3641d877e6df8609841fa5c1847c0a5e133ddcc1b758a5d695304ebd36828099ec201a85b6b70b46f5ea4f81c5bd3a16fa6e175e3c2
 Size (xorg-server-1.20.11.tar.bz2) = 6476116 bytes
 SHA1 (patch-configure) = 4c2d439e622ec14ec2f8a3a2f556c67e60259f82
-SHA1 (patch-hw_kdrive_ephyr_hostx.c) = b681ee28bc7af06774f10bc882d355d42ac965d3
+SHA1 (patch-hw_kdrive_ephyr_hostx.c) = ec8b6128a26d605e50e8d1be3477558eda17a096
 SHA1 (patch-hw_xfree86_common_xf86AutoConfig.c) = 70adf85be9fc6222a335686e7e9e9f385aca02f9
 SHA1 (patch-hw_xfree86_common_xf86sbusBus.h) = f56f87336b2f669413ebb1005a2b64568a111f92
 SHA1 (patch-hw_xfree86_dri2_dri2.c) = 0bf58305059321e10f6f58186301dbb7cb858c2a
@@ -17,5 +17,7 @@ SHA1 (patch-hw_xfree86_os-support_bus_Sbus.c) = 0035b970bdae1bab51b8ca6bfeed060e
 SHA1 (patch-hw_xfree86_os-support_solaris_solaris-amd64.S) = 088a3118deb7567194e08dd46e34cb6edba38400
 SHA1 (patch-hw_xfree86_os-support_xf86_OSproc.h) = e1c049857893d2f050d5fb297a3e8ef86f0b1d7e
 SHA1 (patch-hw_xfree86_os_support_bus_xf86Sbus.h) = 0e0a243b737f8f762c9f8f24a2265d1b6aefb544
-SHA1 (patch-hw_xwayland_xwayland-input.c) = b876642a56f4930dfaa88cff77d4518cfe9d73e0
+SHA1 (patch-hw_xwayland_xwayland-input.c) = 9920680b4a4dfac95737563e018253a01eb6098d
+SHA1 (patch-os_backtrace.c) = 832b0f6fd5087d2c761af42e6d354ab870704087
 SHA1 (patch-test_xtest.c) = 77622ef481e91e64b3a6dd64b8579404f33ec88f
+SHA1 (patch-xkb_XKBGAlloc.c) = d0ed7954600e63444c500269752e918a8d7d7541
diff --git a/x11/modular-xorg-server/patches/patch-hw_kdrive_ephyr_hostx.c b/x11/modular-xorg-server/patches/patch-hw_kdrive_ephyr_hostx.c
index a3ece3b72e9..c53ad3c1d65 100644
--- a/x11/modular-xorg-server/patches/patch-hw_kdrive_ephyr_hostx.c
+++ b/x11/modular-xorg-server/patches/patch-hw_kdrive_ephyr_hostx.c
@@ -2,9 +2,23 @@ $NetBSD: patch-hw_kdrive_ephyr_hostx.c,v 1.1 2020/09/28 01:08:15 khorben Exp $

 Fix Xephyr visual with -parent option

---- hw/kdrive/ephyr/hostx.c.orig       2020-03-29 20:21:15.000000000 +0000
+--- hw/kdrive/ephyr/hostx.c.orig       2021-04-13 14:11:40.000000000 +0000
 +++ hw/kdrive/ephyr/hostx.c
-@@ -622,7 +622,7 @@ hostx_init(void)
+@@ -36,7 +36,13 @@
+ #include <string.h>             /* for memset */
+ #include <errno.h>
+ #include <time.h>
++#if defined(HAVE_NBCOMPAT_H)
++#include <nbcompat/config.h>
++#include <nbcompat/cdefs.h>
++#include <nbcompat/err.h>
++#else
+ #include <err.h>
++#endif
+ 
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+@@ -622,7 +628,7 @@ hostx_init(void)
                                scrpriv->win_height,
                                0,
                                XCB_WINDOW_CLASS_COPY_FROM_PARENT,
diff --git a/x11/modular-xorg-server/patches/patch-hw_xwayland_xwayland-input.c b/x11/modular-xorg-server/patches/patch-hw_xwayland_xwayland-input.c
index b4edafc969e..182c22a4439 100644
--- a/x11/modular-xorg-server/patches/patch-hw_xwayland_xwayland-input.c
+++ b/x11/modular-xorg-server/patches/patch-hw_xwayland_xwayland-input.c
@@ -2,12 +2,20 @@ $NetBSD: patch-hw_xwayland_xwayland-input.c,v 1.2 2019/10/29 22:46:39 nia Exp $

 Support non-evdev platforms.

---- hw/xwayland/xwayland-input.c.orig  2019-02-26 19:28:50.000000000 +0000
+--- hw/xwayland/xwayland-input.c.orig  2021-04-13 14:11:40.000000000 +0000
 +++ hw/xwayland/xwayland-input.c
-@@ -26,7 +26,14 @@
+@@ -26,7 +26,22 @@

  #include "xwayland.h"

++#if defined(HAVE_NBCOMPAT_H)
++#include <nbcompat/config.h>
++#include <nbcompat/cdefs.h>
++#include <nbcompat/string.h>
++#else
++#include <string.h>
++#endif
++
 +#if defined(__linux__) || defined(__FreeBSD__)
  #include <linux/input.h>
 +#else
diff --git a/x11/modular-xorg-server/patches/patch-os_backtrace.c b/x11/modular-xorg-server/patches/patch-os_backtrace.c
new file mode 100644
index 00000000000..5295e193153
--- /dev/null
+++ b/x11/modular-xorg-server/patches/patch-os_backtrace.c
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- os/backtrace.c.orig        2021-04-13 14:11:40.000000000 +0000
++++ os/backtrace.c
+@@ -29,6 +29,7 @@
+ #include "misc.h"
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ 
+ #ifdef HAVE_LIBUNWIND
+ 
diff --git a/x11/modular-xorg-server/patches/patch-xkb_XKBGAlloc.c b/x11/modular-xorg-server/patches/patch-xkb_XKBGAlloc.c
new file mode 100644
index 00000000000..d6f851448f7
--- /dev/null
+++ b/x11/modular-xorg-server/patches/patch-xkb_XKBGAlloc.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- xkb/XKBGAlloc.c.orig       2021-04-13 14:11:40.000000000 +0000
++++ xkb/XKBGAlloc.c
+@@ -29,6 +29,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #endif
+ 
+ #include <stdio.h>
++#if defined(HAVE_NBCOMPAT_H)
++#include <nbcompat/config.h>
++#include <nbcompat/cdefs.h>
++#include <nbcompat/string.h>
++#else
++#include <string.h>
++#endif
+ #include <X11/X.h>
+ #include <X11/Xproto.h>
+ #include "misc.h"

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->khorben
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 17 May 2021 12:34:58 +0000
Responsible-Changed-Why:
Over to maintainer


From: Pierre Pronchery <khorben@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org,
 pkgsrc-bugs@netbsd.org,
 gnats-admin@netbsd.org,
 "wiz@netbsd.org" <wiz@NetBSD.org>,
 pekdon@gmail.com
Subject: Re: pkg/56169 (modular-xorg-xephyr build problem on Solaris 10)
Date: Thu, 3 Jun 2021 02:38:56 +0200

 			Hi everyone,

 > On 17. May 2021, at 14:34, wiz@netbsd.org <wiz@NetBSD.org> wrote:
 >=20
 > Synopsis: modular-xorg-xephyr build problem on Solaris 10
 >=20
 > Responsible-Changed-From-To: pkg-manager->khorben
 > Responsible-Changed-By: wiz@NetBSD.org
 > Responsible-Changed-When: Mon, 17 May 2021 12:34:58 +0000
 > Responsible-Changed-Why:
 > Over to maintainer

 I just had a look at the changes and they look good to me.

 I can only test building on NetBSD right now, but I will try to find a =
 way to validate the changes and commit them after that.

 Cheers,
 --=20
 khorben=

Responsible-Changed-From-To: khorben->pekdon@gmail.com
Responsible-Changed-By: khorben@NetBSD.org
Responsible-Changed-When: Tue, 08 Jun 2021 22:53:03 +0000
Responsible-Changed-Why:
Patch applied


State-Changed-From-To: open->feedback
State-Changed-By: khorben@NetBSD.org
State-Changed-When: Tue, 08 Jun 2021 22:53:03 +0000
State-Changed-Why:
Patch applied


Responsible-Changed-From-To: pekdon@gmail.com->pkg-maintainer
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 09 Jun 2021 04:09:21 +0000
Responsible-Changed-Why:
only developers are supposed to own prs


Responsible-Changed-From-To: pkg-maintainer->pkg-manager
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 09 Jun 2021 05:06:18 +0000
Responsible-Changed-Why:
use right address


Responsible-Changed-From-To: pkg-manager->khorben
Responsible-Changed-By: tnn@NetBSD.org
Responsible-Changed-When: Thu, 24 Jun 2021 15:20:10 +0000
Responsible-Changed-Why:
This change broke modular-xorg-server on Linux.
I think Linux os a more used target than Solaris 10,
so I would like this to be reverted until it can be addressed.

xvmc.c: In function 'xf86XvMCRegisterDRInfo':
xvmc.c:819:5: error: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Werror=implicit-function-declaration]
  819 |     strlcpy(pScreenPriv->clientDriverName, name, DR_CLIENT_DRIVER_NAME_SIZE);
      |     ^~~~~~~
      |     strncpy
xvmc.c:819:5: warning: nested extern declaration of 'strlcpy' [-Wnested-externs]
  CC       saver.lo
cc1: some warnings being treated as errors


State-Changed-From-To: feedback->open
State-Changed-By: tnn@NetBSD.org
State-Changed-When: Thu, 24 Jun 2021 15:20:10 +0000
State-Changed-Why:



From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56169 (modular-xorg-xephyr build problem on Solaris 10)
Date: Thu, 24 Jun 2021 17:50:19 +0000

 On Thu, Jun 24, 2021 at 03:20:11PM +0000, tnn@NetBSD.org wrote:
  > This change broke modular-xorg-server on Linux.
  > I think Linux os a more used target than Solaris 10,
  > so I would like this to be reverted until it can be addressed.

 Did your commit fix the linux build? Does it build now on Solaris? I'm
 unclear on the resultant situation.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Tobias Nygren <tnn@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: David Holland <dholland-pbugs@netbsd.org>, pekdon@gmail.com
Subject: Re: pkg/56169 (modular-xorg-xephyr build problem on Solaris 10)
Date: Thu, 24 Jun 2021 20:23:41 +0200

 On Thu, 24 Jun 2021 17:55:01 +0000 (UTC)
 David Holland <dholland-pbugs@netbsd.org> wrote:

 > The following reply was made to PR pkg/56169; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/56169 (modular-xorg-xephyr build problem on Solaris 10)
 > Date: Thu, 24 Jun 2021 17:50:19 +0000
 > 
 >  On Thu, Jun 24, 2021 at 03:20:11PM +0000, tnn@NetBSD.org wrote:
 >   > This change broke modular-xorg-server on Linux.
 >   > I think Linux os a more used target than Solaris 10,
 >   > so I would like this to be reverted until it can be addressed.
 >  
 >  Did your commit fix the linux build? Does it build now on Solaris? I'm
 >  unclear on the resultant situation.

 It builds on Linux now.
 I'm am not sure if modular-xorg-server builds on SunOS.
 The fix was for modular-xorg-xephyr but may or may not be necessary for
 -server and may in fact break it in the same manner as it broke for
 Linux. I guess in that case we can move USE_FEATURES from
 Makefile.common to -xephyr/Makefile to avoid the issue.

From: Tobias Nygren <tnn@NetBSD.org>
To: David Holland <dholland-pbugs@netbsd.org>
Cc: gnats-bugs@netbsd.org, pekdon@gmail.com
Subject: Re: pkg/56169 (modular-xorg-xephyr build problem on Solaris 10)
Date: Thu, 24 Jun 2021 20:35:46 +0200

 On Thu, 24 Jun 2021 20:23:41 +0200
 Tobias Nygren <tnn@NetBSD.org> wrote:

 > It builds on Linux now.
 > I'm am not sure if modular-xorg-server builds on SunOS.
 > The fix was for modular-xorg-xephyr but may or may not be necessary for
 > -server and may in fact break it in the same manner as it broke for
 > Linux. I guess in that case we can move USE_FEATURES from
 > Makefile.common to -xephyr/Makefile to avoid the issue.

 It is broken on SunOS due to this according to bulk builds:

 https://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-trunk/20210622.1454/modular-xorg-server-1.20.11/build.log

 As such I think libnbcompat is not a feasible approach to
 solve this problem and we should back out the patches entirely and
 provide the package with a local copy of strnlen until we have a
 USE_FEATURES framework that can support better symbol granularity.

From: "Tobias Nygren" <tnn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56169 CVS commit: pkgsrc/x11/modular-xorg-server
Date: Thu, 24 Jun 2021 18:43:09 +0000

 Module Name:	pkgsrc
 Committed By:	tnn
 Date:		Thu Jun 24 18:43:08 UTC 2021

 Modified Files:
 	pkgsrc/x11/modular-xorg-server: Makefile.common distinfo
 	pkgsrc/x11/modular-xorg-server/patches: patch-hw_kdrive_ephyr_hostx.c
 	    patch-hw_xwayland_xwayland-input.c
 Removed Files:
 	pkgsrc/x11/modular-xorg-server/patches: patch-os_backtrace.c
 	    patch-xkb_XKBAlloc.c

 Log Message:
 modular-xorg-server: revert PR pkg/56169 patch. Different solution needed.

 ok khorben


 To generate a diff of this commit:
 cvs rdiff -u -r1.41 -r1.42 pkgsrc/x11/modular-xorg-server/Makefile.common
 cvs rdiff -u -r1.108 -r1.109 pkgsrc/x11/modular-xorg-server/distinfo
 cvs rdiff -u -r1.2 -r1.3 \
     pkgsrc/x11/modular-xorg-server/patches/patch-hw_kdrive_ephyr_hostx.c
 cvs rdiff -u -r1.3 -r1.4 \
     pkgsrc/x11/modular-xorg-server/patches/patch-hw_xwayland_xwayland-input.c
 cvs rdiff -u -r1.1 -r0 \
     pkgsrc/x11/modular-xorg-server/patches/patch-os_backtrace.c \
     pkgsrc/x11/modular-xorg-server/patches/patch-xkb_XKBAlloc.c

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

>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.