NetBSD Problem Report #58339

From www@netbsd.org  Thu Jun 13 01:11:24 2024
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1E9DA1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Jun 2024 01:11:24 +0000 (UTC)
Message-Id: <20240613011122.C68161A923A@mollari.NetBSD.org>
Date: Thu, 13 Jun 2024 01:11:22 +0000 (UTC)
From: rwhitlock22@gmail.com
Reply-To: rwhitlock22@gmail.com
To: gnats-bugs@NetBSD.org
Subject: cad/kicad fails without wayland being installed
X-Send-Pr-Version: www-1.0

>Number:         58339
>Category:       pkg
>Synopsis:       cad/kicad fails without wayland being installed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 13 01:15:00 +0000 2024
>Last-Modified:  Sat Sep 21 11:05:01 +0000 2024
>Originator:     Robert Whitlock
>Release:        pkgsrc current, June 10 2024
>Organization:
>Environment:
NetBSD thinkpad 10.0_STABLE NetBSD 10.0_STABLE (GENERIC) #0: Sun May  5 15:20:02 EDT 2024  rob@thinkpad:/usr/netbsd/10.0/build/generic/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
cad/kicad fails to build when the wayland option is disabled. kicad's CMakeLists.txt enables support for kicad if the KICAD_USE_EGL CMake option is set, and the pkgsrc Makefile sets the KICAD_USE_EGL option if EGL is available. Since wayland's buildlink file is not included, kicad's build system fails when it tries to build the things that need wayland.
>How-To-Repeat:
Disable the wayland option for cad/kicad.
Try to build kicad.
>Fix:
Add the wayland option to cad/kicad.

Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/cad/kicad/options.mk,v
retrieving revision 1.1
diff -u -r1.1 options.mk
--- options.mk  6 Jun 2023 10:20:58 -0000       1.1
+++ options.mk  13 Jun 2024 01:02:54 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.1 2023/06/06 10:20:58 bouyer Exp $

 PKG_OPTIONS_VAR=       PKG_OPTIONS.kicad
-PKG_SUPPORTED_OPTIONS= ng-spice 
+PKG_SUPPORTED_OPTIONS= ng-spice wayland
 PKG_SUGGESTED_OPTIONS= ng-spice 

 .include "../../mk/bsd.options.mk"
@@ -12,3 +12,16 @@
 .else
 CMAKE_ARGS+=           -DKICAD_SPICE=OFF
 .endif
+
+.if !empty(PKG_OPTIONS:Mwayland)
+.  include "../../devel/wayland/buildlink3.mk"
+CMAKE_ARGS+=   -DKICAD_WAYLAND=ON
+   # This conditional matches the conditional in Makefile 
+   # so that it's effectively a test for whether
+   # KICAD_USE_EGL is enabled
+.  if empty(MESALIB_SUPPORTS_EGL:Myes)
+PKG_FAIL_REASON+= "Kicad requires the KICAD_USE_EGL CMake option when using the KICAD_WAYLAND CMake option. See the cmake_dependent_option() for KICAD_WAYLAND in CMakeLists.txt"
+.  endif
+.else
+CMAKE_ARGS+=   -DKICAD_WAYLAND=OFF
+.endif

>Audit-Trail:
From: Rob Whitlock <rwhitlock22@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/58339: cad/kicad fails without wayland being installed
Date: Wed, 12 Jun 2024 21:51:14 -0400

 > On Jun 12, 2024, at 9:15 PM, rwhitlock22@gmail.com wrote:
 >> How-To-Repeat:
 > Disable the wayland option for cad/kicad.
 > Try to build kicad.

 This should have read:

 Have wayland not be installed, perhaps by disabling the wayland option =
 globally.
 Try to build kicad.

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/58339: cad/kicad fails without wayland being installed
Date: Tue, 18 Jun 2024 22:33:19 -0500 (CDT)

 "Me too!"

 I just updated to pkgsrc-HEAD in anticipation of the freeze for the
 2024Q2 branch and ran into this.  I'm building on NetBSD-10.0_STABLE/amd64.

 I've had "-wayland" in my PKG_DEFAULT_OPTIONS ever since I saw the option
 in "www/firefox".  I'm not currently aware of other packages that support
 the option, but absent the proposed patches in this PR "kicad" does not,
 which would seem to be a "default enabled" case.

 It's odd that no NetBSD bulk builds of pkgsrc-current have encountered
 the issue.



 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Rob Whitlock <rwhitlock22@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/58339: cad/kicad fails without wayland being installed
Date: Wed, 19 Jun 2024 12:12:10 -0400

 > On Jun 18, 2024, at 11:35 PM, John D. Baker <jdbaker@consolidated.net> =
 wrote:
 >=20
 > The following reply was made to PR pkg/58339; it has been noted by =
 GNATS.
 >=20
 > From: "John D. Baker" <jdbaker@consolidated.net>
 > To: gnats-bugs@NetBSD.org
 > Cc:=20
 > Subject: Re: pkg/58339: cad/kicad fails without wayland being =
 installed
 > Date: Tue, 18 Jun 2024 22:33:19 -0500 (CDT)
 >=20
 > "Me too!"
 >=20
 > I just updated to pkgsrc-HEAD in anticipation of the freeze for the
 > 2024Q2 branch and ran into this.  I'm building on =
 NetBSD-10.0_STABLE/amd64.

 It's good to hear that somebody can reproduce the problem.

 > I've had "-wayland" in my PKG_DEFAULT_OPTIONS ever since I saw the =
 option
 > in "www/firefox".  I'm not currently aware of other packages that =
 support
 > the option, but absent the proposed patches in this PR "kicad" does =
 not,
 > which would seem to be a "default enabled" case.

 It's a bit worse than "default enabled," as the build fails in the case =
 that wayland is not installed (which could happen if the wayland option =
 had always been disabled).

 > It's odd that no NetBSD bulk builds of pkgsrc-current have encountered
 > the issue.

 I suspect this is because the bulk builds use the default options =
 settings, which results in other combinations of options not being =
 tested. I suspect it may be this way because testing all the =
 combinations of options (or even each option) would require more =
 computational power than is available.

 > --=20
 > |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 > |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            =
 FreeBSD
 > | X  No HTML/proprietary data in email.   BSD just sits there and =
 works!
 > |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645
 >=20

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/58339: cad/kicad fails without wayland being installed
Date: Fri, 21 Jun 2024 07:03:30 -0500 (CDT)

 I applied the patches in this PR to my pkgsrc tree and "cad/kicad" now
 configures and builds without issue.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Rob Whitlock <rwhitlock22@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org,
 gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/58339: cad/kicad fails without wayland being installed
Date: Sat, 22 Jun 2024 12:54:57 -0400

 --Apple-Mail=_8BDBD5FA-39D5-4B01-AF2B-8B0936049427
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii

 The whitespace in the original patch was mangled by the e-mail =
 processing somehow, which resulted in a patch with fuzz and a missed =
 hunk. I have attached the patch to this message to overcome these =
 issues.


 --Apple-Mail=_8BDBD5FA-39D5-4B01-AF2B-8B0936049427
 Content-Disposition: attachment;
 	filename=patch-cad_kicad_options.mk
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="patch-cad_kicad_options.mk"
 Content-Transfer-Encoding: 7bit

 Add the wayland option to cad/kicad.

 Index: cad/kicad/options.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/cad/kicad/options.mk,v
 retrieving revision 1.1
 diff -b -u -r1.1 options.mk
 --- cad/kicad/options.mk	6 Jun 2023 10:20:58 -0000	1.1
 +++ cad/kicad/options.mk	22 Jun 2024 16:47:06 -0000
 @@ -1,7 +1,7 @@
  # $NetBSD: options.mk,v 1.1 2023/06/06 10:20:58 bouyer Exp $

  PKG_OPTIONS_VAR=	PKG_OPTIONS.kicad
 -PKG_SUPPORTED_OPTIONS=	ng-spice 
 +PKG_SUPPORTED_OPTIONS=	ng-spice wayland
  PKG_SUGGESTED_OPTIONS=	ng-spice 

  .include "../../mk/bsd.options.mk"
 @@ -12,3 +12,17 @@
  .else
  CMAKE_ARGS+=		-DKICAD_SPICE=OFF
  .endif
 +
 +.if !empty(PKG_OPTIONS:Mwayland)
 +.  include "../../devel/wayland/buildlink3.mk"
 +CMAKE_ARGS+=		-DKICAD_WAYLAND=ON
 +   # This conditional matches the conditional in Makefile
 +   # so that it's effectively a test for whether
 +   # KICAD_USE_EGL is enabled.
 +.  if empty(MESALIB_SUPPORTS_EGL:Myes)
 +PKG_FAIL_REASON+= "Kicad requires the KICAD_USE_EGL CMake option when using the KICAD_WAYLAND CMake option. See the cmake_dependent_option() for KICAD_WAYLAND in CMakeLists.txt."
 +.  endif
 +.else
 +CMAKE_ARGS+=		-DKICAD_WAYLAND=OFF
 +.endif
 +

 --Apple-Mail=_8BDBD5FA-39D5-4B01-AF2B-8B0936049427--

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/58339: cad/kicad fails without wayland being installed
Date: Sat, 21 Sep 2024 04:36:34 -0500 (CDT)

 Since the recent rototill of cmake-using packages, the previously-posted
 patch applies w/fuzz but cad/kicad fails configuration as originally
 reported in this PR.

 The updated patch below takes the changes to cmake-using packages into
 account and "cad/kicad" builds again (extra "+" at beginning of line to
 prevent leading whitespace from being eaten):

 +Index: cad/kicad/options.mk
 +===================================================================
 +RCS file: /cvsroot/pkgsrc/cad/kicad/options.mk,v
 +retrieving revision 1.2
 +diff -u -p -r1.2 options.mk
 +--- cad/kicad/options.mk	25 Aug 2024 06:18:26 -0000	1.2
 ++++ cad/kicad/options.mk	21 Sep 2024 09:06:38 -0000
 +@@ -1,7 +1,7 @@
 + # $NetBSD: options.mk,v 1.2 2024/08/25 06:18:26 wiz Exp $
 + 
 + PKG_OPTIONS_VAR=	PKG_OPTIONS.kicad
 +-PKG_SUPPORTED_OPTIONS=	ng-spice 
 ++PKG_SUPPORTED_OPTIONS=	ng-spice wayland
 + PKG_SUGGESTED_OPTIONS=	ng-spice 
 + 
 + .include "../../mk/bsd.options.mk"
 +@@ -12,3 +12,16 @@ CMAKE_CONFIGURE_ARGS+=		-DKICAD_SPICE=ON
 + .else
 + CMAKE_CONFIGURE_ARGS+=		-DKICAD_SPICE=OFF
 + .endif
 ++
 ++.if !empty(PKG_OPTIONS:Mwayland)
 ++.  include "../../devel/wayland/buildlink3.mk"
 ++CMAKE_CONFIGURE_ARGS+=   -DKICAD_WAYLAND=ON
 ++   # This conditional matches the conditional in Makefile 
 ++   # so that it's effectively a test for whether
 ++   # KICAD_USE_EGL is enabled
 ++.  if empty(MESALIB_SUPPORTS_EGL:Myes)
 ++PKG_FAIL_REASON+= "Kicad requires the KICAD_USE_EGL CMake option when using the KICAD_WAYLAND CMake option. See the cmake_dependent_option() for KICAD_WAYLAND in CMakeLists.txt"
 ++.  endif
 ++.else
 ++CMAKE_CONFIGURE_ARGS+=   -DKICAD_WAYLAND=OFF
 ++.endif

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.