NetBSD Problem Report #57282

From www@netbsd.org  Tue Mar 21 21:47:53 2023
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 F21241A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Mar 2023 21:47:52 +0000 (UTC)
Message-Id: <20230321214751.AEFF01A923C@mollari.NetBSD.org>
Date: Tue, 21 Mar 2023 21:47:51 +0000 (UTC)
From: jspath55@gmail.com
Reply-To: jspath55@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Package audio/mp3blaster compile fails if ncurses package installed
X-Send-Pr-Version: www-1.0

>Number:         57282
>Category:       pkg
>Synopsis:       Package audio/mp3blaster compile fails if ncurses package installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 21 21:50:00 +0000 2023
>Closed-Date:    Fri May 12 08:57:16 +0000 2023
>Last-Modified:  Fri May 12 09:25:01 +0000 2023
>Originator:     Jim Spath
>Release:        NetBSD 10.0_BETA (GENERIC) #0: Sun Feb 12 12:39:37 UTC 2023
>Organization:
>Environment:
NetBSD i.me.mine 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Sun Feb 12 12:39:37 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 x86_64 AMD 686-class NetBSD

>Description:
A pkgsrc build of audio/mp3blaster failed on linking due to an ncurses header or library mismatch.

Pkgsrc is pkgsrc-2022Q4.

"undefined reference to _acs_char"

ld: main.o: in function `newgroup()':
main.cc:(.text+0x1ee3): undefined reference to `_acs_char'
ld: main.o: in function `get_mainwin_borderchars(wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*)':
main.cc:(.text+0x3ec2): undefined reference to `_acs_char'
ld: main.o: in function `draw_static(int)':
main.cc:(.text+0x4c60): undefined reference to `_acs_char'
ld: main.o: in function `fw_begin()':
main.cc:(.text+0x526d): undefined reference to `_acs_char'
ld: scrollwin.o: in function `scrollWin::drawBorder()':
scrollwin.cc:(.text+0xc39): undefined reference to `_acs_char'
gmake[2]: *** [Makefile:404: mp3blaster] Error 1

I will continue to look at the configure script etc., as mp3blaster should work with ncurses.
>How-To-Repeat:
$ cd devel/ncurses
$ make install
$ cd ../../audio/mp3blaster/
$ make install

>Fix:
Remove ncurses package and re-install mp3blaster.

$ pkgin remove ncurses
1 packages to delete:
  ncurses-6.3nb1

$  mp3blaster -v
mp3blaster version 3.2.6 - http://mp3blaster.sourceforge.net/
Supported audio formats: mp3 wav ogg
Supported audio output drivers: oss
Build features: pthreads

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/57282: Package audio/mp3blaster compile fails if ncurses
 package installed
Date: Wed, 10 May 2023 23:44:36 +0000

 On Tue, Mar 21, 2023 at 09:50:00PM +0000, jspath55@gmail.com wrote:
  > main.cc:(.text+0x1ee3): undefined reference to `_acs_char'

 This is caused by compiling against headers from base curses and
 linking against ncurses, which obviously can't be expected to work.

 I cannot reproduce the problem though. If it's still happening:

   - please check what config.status reports for the various
 curses/ncurses tests;

   - after "make configure" please check in work/.work.log whether the
 transformed commands (the ones marked with <.> rather than [*])
 contain references into your installed package tree (they should not,
 instead they should refer to work/.buildlink);

   - make sure your installed package tree (/usr/pkg or whatever) isn't
 symlinked; that breaks the buildlink logic and that can cause failures
 of this type;

   - if none of the above applies check that work/.buildlink links to
 the right curses (base curses headers and libraries, and not ncurses,
 and definitely not a mixture).

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 10 May 2023 23:45:58 +0000
State-Changed-Why:
Cannot reproduce so asked some questions


From: Jim Spath <jspath55@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/57282: Package audio/mp3blaster compile fails if ncurses
 package installed
Date: Thu, 11 May 2023 07:50:09 -0400

 On Wed, May 10, 2023 at 7:45=E2=80=AFPM David Holland <dholland-pbugs@netbs=
 d.org> wrote:
 ...
 >  I cannot reproduce the problem though. If it's still happening:
 >
 >    - please check what config.status reports for the various
 >  curses/ncurses tests;
 >
 >    - after "make configure" please check in work/.work.log whether the
 >  transformed commands (the ones marked with <.> rather than [*])
 >  contain references into your installed package tree (they should not,
 >  instead they should refer to work/.buildlink);
 >
 >    - make sure your installed package tree (/usr/pkg or whatever) isn't
 >  symlinked; that breaks the buildlink logic and that can cause failures
 >  of this type;

 Before checking the first 2, I definitely use symbolic links for pkg/pkgsrc=
 :

 lrwxr-xr-x   1 root  wheel      9 Feb 15 19:44 pkg -> /home/pkg
 lrwxr-xr-x   1 root  wheel     12 Feb 15 19:43 pkgsrc -> /home/pkgsrc

 I will check the other suggestions. This must be an obscure issue, as
 I have used symlinks for pkgsrc on many previous versions without
 seeing those symptoms.

 Jim

From: Jim Spath <jspath55@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/57282: Package audio/mp3blaster compile fails if ncurses
 package installed
Date: Thu, 11 May 2023 21:12:25 -0400

 On Thu, May 11, 2023 I wrote:
 >  On Wed, May 10, 2023  David Holland wrote:
 >  >  I cannot reproduce the problem though. If it's still happening:

 >  I will check the other suggestions. This must be an obscure issue, as
 >  I have used symlinks for pkgsrc on many previous versions without
 >  seeing those symptoms.

 Now I cannot replicate the error on the original system or a second one.
 So OK to close as unable to reproduce.

 Jim

State-Changed-From-To: feedback->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Fri, 12 May 2023 08:57:16 +0000
State-Changed-Why:
Submitter says this is a local issue, can be closed.


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: jspath55@gmail.com
Subject: Re: pkg/57282: Package audio/mp3blaster compile fails if ncurses
 package installed
Date: Fri, 12 May 2023 09:24:52 +0000

 On Thu, May 11, 2023 at 11:55:01AM +0000, Jim Spath wrote:
  >  Before checking the first 2, I definitely use symbolic links for pkg/pkgsrc:
  >  
  >  lrwxr-xr-x   1 root  wheel      9 Feb 15 19:44 pkg -> /home/pkg
  >  lrwxr-xr-x   1 root  wheel     12 Feb 15 19:43 pkgsrc -> /home/pkgsrc
  >  
  >  I will check the other suggestions. This must be an obscure issue, as
  >  I have used symlinks for pkgsrc on many previous versions without
  >  seeing those symptoms.

 Yeah, it is fairly obscure. The problem is that the buildlink/wrapper
 scheme rewrites references to the installed package tree (to refer to
 work/.buildlink instead) and this doesn't work reliably if there are
 multiple names for it.

 Which means that now and then something like this happens, but it
 depends heavily on circumstances and usually only comes up if the
 package is trying to be too smart for its own good. In this case it
 appears that mp3blaster's configure script explicitly tries to look in
 /usr/pkg, and for whatever reason it was able to see the ncurses
 library but not the headers.

 Ideally this would be handled better but it's not entirely trivial to
 discover all the names, especially in more complicated cases.
 (Consider for example /usr/pkg -> /usr/local/pkg and /usr/local ->
 /home/local, which is an entirely reasonable setup.) So the solution
 so far has been to say "don't do that".

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

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-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.