NetBSD Problem Report #53751

From www@NetBSD.org  Wed Nov 28 14:49:29 2018
Return-Path: <www@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 ECD887A181
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 28 Nov 2018 14:49:28 +0000 (UTC)
Message-Id: <20181128144927.EAE757A26F@mollari.NetBSD.org>
Date: Wed, 28 Nov 2018 14:49:27 +0000 (UTC)
From: rnestor@tx.rr.com
Reply-To: rnestor@tx.rr.com
To: gnats-bugs@NetBSD.org
Subject: codeblocks fails to build
X-Send-Pr-Version: www-1.0

>Number:         53751
>Category:       pkg
>Synopsis:       codeblocks fails to build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bsiegert
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 28 14:50:00 +0000 2018
>Closed-Date:    
>Last-Modified:  Fri Jan 21 16:11:17 +0000 2022
>Originator:     Robert Nestor
>Release:        pkgsrc-2018Q3 pkgsrc
>Organization:
Company name
>Environment:
NetBSD bandit 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
The codeblocks IDE build failure appears to be a fallout of the renaming of the GTK package to GTK2 to allow for the introduction of GTK3.  During build it reports that it can't find GTK2 and it seems to be looking for "gtk+" rather than "gtk2+" (or "gtk3+").  It may build and work with either GTK2 or GTK3, not sure.
>How-To-Repeat:
Attempt building editors/codeblocks in pkgsrc-2018Q3 or pkgsrc-current.
>Fix:
Unknown, the GTK magic in pkgsrc builds is beyond my meager skill set.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Wed, 19 Dec 2018 15:19:32 +0000
State-Changed-Why:
Workaround proposed.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/53751: code blocks fails to build
Date: Thu, 27 Dec 2018 18:59:58 +0000

 Whole thread didn't get sent to gnats (please send things for gnats to
 gnats-bugs@; this may not happen by default when replying to your own
 postings)

    ------

 From: Robert Nestor <rnestor@mac.com>
 To: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 Subject: re: pkg/53751: code blocks fails to build
 Date: Thu, 29 Nov 2018 10:25:16 -0600

 Not sure if this is the correct fix, but it does allow editors/codeblocks to build in the 2018Q3 archive:

 % diff -bu Makefile.orig Makefile
 --- Makefile.orig       2018-11-29 07:56:11.217470830 -0600
 +++ Makefile    2018-11-29 07:56:23.049511539 -0600
 @@ -30,5 +30,6 @@
  .include "../../databases/shared-mime-info/mimedb.mk"
  .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
  .include "../../sysutils/desktop-file-utils/desktopdb.mk"
 +.include "../../x11/gtk2/buildlink3.mk"
  .include "../../x11/wxGTK30/buildlink3.mk"
  .include "../../mk/bsd.pkg.mk"

    ------

 From: Benny Siegert <bsiegert@gmail.com>
 To: Robert Nestor <rnestor@mac.com>
 Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 Subject: Re: pkg/53751: code blocks fails to build
 Date: Wed, 19 Dec 2018 16:18:55 +0100

 On Thu, Nov 29, 2018 at 6:44 PM Robert Nestor <rnestor@mac.com> wrote:
 > +.include "../../x11/gtk2/buildlink3.mk"
 >  .include "../../x11/wxGTK30/buildlink3.mk"

 wxGTK30/bl3.mk provides a buildlink for whatever toolkit wxWidgets is
 built with. The default is gtk3 but AFAICT codeblocks only works with
 gtk2.

 Does it work if you add the following line to your mk.conf

 PKG_OPTIONS.wxGTK30=gtk2

 Then do the following:

 cd x11/wxGTK30
 make replace
 cd ../../editors/codeblocks
 make package-install


 -- 
 Benny

    ------

 From: Robert Nestor <rnestor@mac.com>
 To: Benny Siegert <bsiegert@gmail.com>
 Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 Subject: Re: pkg/53751: code blocks fails to build
 Date: Wed, 19 Dec 2018 13:53:11 -0600

 Thank you!  My suggestion made the build work but the executable wasn?t usable, it complained about having both gtk2 and gtk3 symbols in the same image.

 However, your suggestion worked for the build and created a usable executable in the -current pkgsrc (I haven?t tried it in older archives).  I thought a recent change to wxGTK30 allowed it to use either gtk2 or gtk3.  Does it only build with one or the other or does it build for both?  And if it builds for both can the OPTION be moved to codeblocks itself?

 -bob

 On Dec 19, 2018, at 9:18 AM, Benny Siegert <bsiegert@gmail.com> wrote:

 > On Thu, Nov 29, 2018 at 6:44 PM Robert Nestor <rnestor@mac.com> wrote:
 >> +.include "../../x11/gtk2/buildlink3.mk"
 >> .include "../../x11/wxGTK30/buildlink3.mk"
 > 
 > wxGTK30/bl3.mk provides a buildlink for whatever toolkit wxWidgets is
 > built with. The default is gtk3 but AFAICT codeblocks only works with
 > gtk2.
 > 
 > Does it work if you add the following line to your mk.conf
 > 
 > PKG_OPTIONS.wxGTK30=gtk2
 > 
 > Then do the following:
 > 
 > cd x11/wxGTK30
 > make replace
 > cd ../../editors/codeblocks
 > make package-install
 > 
 > 
 > -- 
 > Benny

    ------

 From: Benny Siegert <bsiegert@gmail.com>
 To: Robert Nestor <rnestor@mac.com>
 Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 Subject: Re: pkg/53751: code blocks fails to build
 Date: Wed, 26 Dec 2018 13:01:41 +0100

 On Wed, Dec 19, 2018 at 8:56 PM Robert Nestor <rnestor@mac.com> wrote:
 > I thought a recent change to wxGTK30 allowed it to use either gtk2 or gtk3.  Does it only build with one or the other or does it build for both?

 wxGTK30 can use either gtk2 or gtk3, depending on the option you set,
 with gtk3 as the default. Unfortunately, codeblocks _also_ depends on
 some Gtk2 code directly, so it only works if you built wxGTK30 with
 the gtk2 option.

 > And if it builds for both can the OPTION be moved to codeblocks itself?

 Unfortunately not, as explained above. Now, the thing I don't know is
 whether pkgsrc can somehow express the dependency (wxGTK30 built with
 a certain option) directly.

 -- 
 Benny

    ------

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: feedback->analyzed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 27 Dec 2018 19:01:02 +0000
State-Changed-Why:
workaround works.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/53751: code blocks fails to build
Date: Thu, 27 Dec 2018 19:33:40 +0000

 On Thu, Dec 27, 2018 at 07:00:02PM +0000, David Holland wrote:
  >  > And if it builds for both can the OPTION be moved to codeblocks itself?
  >  
  >  Unfortunately not, as explained above. Now, the thing I don't know is
  >  whether pkgsrc can somehow express the dependency (wxGTK30 built with
  >  a certain option) directly.

 You can make it set PKG_FAIL_REASON if not (by checking
 PKG_BUILD_OPTIONS) but I don't think there's any way to express the
 dependence directly or get the system to build wxgtk with the option
 automatically.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org, dbj@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	rnestor@tx.rr.com
Subject: Re: pkg/53751: code blocks fails to build
Date: Sat, 29 Dec 2018 11:30:22 +0100

 On Thu, Dec 27, 2018 at 8:35 PM David Holland <dholland-pbugs@netbsd.org> wrote:
 >  You can make it set PKG_FAIL_REASON if not (by checking
 >  PKG_BUILD_OPTIONS) but I don't think there's any way to express the
 >  dependence directly or get the system to build wxgtk with the option
 >  automatically.

 Would it make sense to flip the wxGTK30 default to gtk2, so that at
 least codeblocks can be built in the bulk builds?

 -- 
 Benny

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53751: code blocks fails to build
Date: Tue, 1 Jan 2019 18:44:27 +0000

 On Sat, Dec 29, 2018 at 10:35:01AM +0000, Benny Siegert wrote:
  >  >  You can make it set PKG_FAIL_REASON if not (by checking
  >  >  PKG_BUILD_OPTIONS) but I don't think there's any way to express the
  >  >  dependence directly or get the system to build wxgtk with the option
  >  >  automatically.
  >  
  >  Would it make sense to flip the wxGTK30 default to gtk2, so that at
  >  least codeblocks can be built in the bulk builds?

 I don't know. I imagine there was some reason it was moved to gtk3... :-/

 -- 
 David A. Holland
 dholland@netbsd.org

From: <rnestor@tx.rr.com>
To: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-bugs@NetBSD.org, 
	gnats-admin@netbsd.org
Cc: David Holland <dholland-pbugs@netbsd.org>
Subject: Re: pkg/53751: code blocks fails to build
Date: Tue, 1 Jan 2019 16:04:14 -0500

 Seems that one of the many benefits of the pkgsrc system is that a library or sub-component which is used in multiple packages only needs to be built once for use by all, but this can also be an Achilles Heel.  If the library or sub-component is upgraded and the API or similar isn't kept backwards compatible then some packages which rely on it that haven't upgraded may become unbuildable and unusable.  Is there an option in the pkgsrc system that permits a package to import and build it's own local copy of an older library or sub-component that it depends upon?  If so that might solve the problem with Codeblocks without having to move wxGTK back to GTK2, at least until Codeblocks is upgraded to use the wxGTK/GTK3 interface.

 However, in this case the real source of the problem may be in wxGTK rather than in Codeblocks as Codeblocks can be build and linked with wxGTK that was built with GTK3, but at run time it complains that GTK2 and GTK3 symbols can't both be in the same image.  It would seem that if wxGTK can build with both than shouldn't it be intelligent enough to know which GTK calls it should be using?

 -bob

 ---- David Holland <dholland-pbugs@netbsd.org> wrote: 
 > The following reply was made to PR pkg/53751; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/53751: code blocks fails to build
 > Date: Tue, 1 Jan 2019 18:44:27 +0000
 > 
 >  On Sat, Dec 29, 2018 at 10:35:01AM +0000, Benny Siegert wrote:
 >   >  >  You can make it set PKG_FAIL_REASON if not (by checking
 >   >  >  PKG_BUILD_OPTIONS) but I don't think there's any way to express the
 >   >  >  dependence directly or get the system to build wxgtk with the option
 >   >  >  automatically.
 >   >  
 >   >  Would it make sense to flip the wxGTK30 default to gtk2, so that at
 >   >  least codeblocks can be built in the bulk builds?
 >  
 >  I don't know. I imagine there was some reason it was moved to gtk3... :-/
 >  
 >  -- 
 >  David A. Holland
 >  dholland@netbsd.org
 >  

Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Wed, 02 Jan 2019 18:27:20 +0000
Responsible-Changed-Why:
Take (for now)


From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	rnestor@tx.rr.com
Subject: Re: pkg/53751: code blocks fails to build
Date: Wed, 2 Jan 2019 20:20:05 +0100

 >  I don't know. I imagine there was some reason it was moved to gtk3... :-/

 Well, gtk3 is the more modern toolkit.

 I am going to try building the other reverse-dependencies with gtk2
 and if that works, flip the default back to gtk2.

 -- 
 Benny

State-Changed-From-To: analyzed->feedback
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 20 Feb 2021 14:19:37 +0000
State-Changed-Why:
codeblocks has been updated to 20.03 in the meantime.
Is this still an issue?


State-Changed-From-To: feedback->analyzed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Fri, 21 Jan 2022 16:11:17 +0000
State-Changed-Why:
feedback timeout


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