NetBSD Problem Report #56684

From jdbaker@consolidated.net  Thu Feb  3 15:02:09 2022
Return-Path: <jdbaker@consolidated.net>
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 E3AEE1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 Feb 2022 15:02:09 +0000 (UTC)
Message-Id: <20220203144350.AF2FD13E118@spike.technoskunk.fur>
Date: Thu,  3 Feb 2022 08:43:50 -0600 (CST)
From: jdbaker@consolidated.net
Reply-To: jdbaker@consolidated.net
To: gnats-bugs@NetBSD.org
Subject: mail/elm build fails on NetBSD/sparc-9.99.93
X-Send-Pr-Version: 3.95

>Number:         56684
>Category:       pkg
>Synopsis:       mail/elm build fails on NetBSD/sparc-9.99.93
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 03 15:05:00 +0000 2022
>Last-Modified:  Sun May 15 17:25:01 +0000 2022
>Originator:     John D. Baker
>Release:        NetBSD 9.99.93, pkgsrc-2021Q4
>Organization:
>Environment:
System: NetBSD lance.technoskunk.fur 9.99.93 NetBSD 9.99.93 (JEAN) #387: Wed Jan
 26 12:14:48 CST 2022 sysop@plex760.technoskunk.fur:/r0/build/current/obj/sparc/
sys/arch/sparc/compile/JEAN sparc
Architecture: sparc
Machine: sparc
>Description:
Building "mail/elm" on NetBSD/sparc-9.99.93 fails as follows:

=> Bootstrap dependency digest>=20211023: found digest-20211023
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabil
ities'.
===> Building for elm-2.5.8nb5
cd lib && /usr/bin/make    all
cd src && /usr/bin/make    all
cc -MD -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o ../bin/elm addr_util.o alias.o aliaslib.o args.o a_edit.o a_screen.o  a_sendmsg.o a_sort.o a_quit.o bouncebk.o builtin.o calendar.o  chstatus.o curses.o date.o delete.o edit.o editmsg.o elm.o  encode.o fbrowser.o file_ops.o file_util.o fileio.o  find_alias.o forms.o hdrconfg.o help.o in_utils.o init.o  leavembox.o lock.o limit.o mime.o newmbox.o options.o out_utils.o  pattern.o quit.o read_rc.o reply.o returnadd.o save.o save_opts.o  savecopy.o screen.o showmsg.o showmsg_c.o signals.o sndattach.o  sndhdrs.o sndmsg.o sndpart_io.o sndpart_lib.o softkeys.o sort.o  string2.o strings.o syscall.o utils.o wordwrap.o ../lib/libutil.a -lintl /usr/lib/libcrypt.a -lcurses
ld: /usr/lib/libcrypt.a(core.o): in function `initialize':
core.c:(.text+0xc84): multiple definition of `initialize'; init.o:init.c:(.text+0x2d8): first defined here
ld: disabling relaxation; it will not work with multiple definitions
ld: reply.o: in function `remail':
reply.c:(.text+0x1204): warning: warning: tempnam() possibly used unsafely, use mkstemp() or mkdtemp()
ld: sndpart_io.o: in function `do_emit_mssgtext_header':
sndpart_io.c:(.text+0x52c): warning: warning: reference to compatibility time(); include <time.h> for correct reference
*** Error code 1

Stop.
make[1]: stopped in /var/tmp/pkgsrc/mail/elm/work/elm2.5.8/src
*** Error code 1

Stop.
make: stopped in /var/tmp/pkgsrc/mail/elm/work/elm2.5.8
*** Error code 1

Stop.
make[1]: stopped in /x/pkgsrc/mail/elm
*** Error code 1

Stop.
make: stopped in /x/pkgsrc/mail/elm
>How-To-Repeat:
See above.
>Fix:

>Audit-Trail:
From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56684: mail/elm build fails on NetBSD/sparc-9.99.93
Date: Thu, 3 Feb 2022 09:43:18 -0600 (CST)

 I see the same failure in a bulk-build report on amd64-9.99.92:

   https://us-east.manta.joyent.com/pkgsrc/public/reports/NetBSD/trunk/x86_64/20220128.2233/elm-2.5.8nb5/build.log

 -- 
 |/"\ 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: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56684: mail/elm build fails on NetBSD/sparc-9.99.93
Date: Sun, 15 May 2022 05:09:28 +0000

 On Thu, Feb 03, 2022 at 03:05:00PM +0000, jdbaker@consolidated.net wrote:
  > core.c:(.text+0xc84): multiple definition of `initialize'; init.o:init.c:(.text+0x2d8): first defined here

 This is a base bug. libcrypt.a shouldn't pollute the linker namespace
 with something called "initialize".

 Seems to come from the argon2 code...

 -- 
 David A. Holland
 dholland@netbsd.org

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: "John D. Baker" <jdbaker@consolidated.net>
Subject: Re: pkg/56684: mail/elm build fails on NetBSD/sparc-9.99.93
Date: Sun, 15 May 2022 05:33:44 +0000

 On Sun, May 15, 2022 at 05:10:01AM +0000, David Holland wrote:
  >  This is a base bug. libcrypt.a shouldn't pollute the linker namespace
  >  with something called "initialize".
  >  
  >  Seems to come from the argon2 code...

 I filed lib/56838 on this.

 It turns out it only affects the static libcrypt (it plays ELF
 visibility games, which only affect the shared library image) so the
 following should serve as a workaround.

 I'm going to leave this PR open until it becomes clear whether this
 is going to be broken in -10 or not, in which case we'll need the
 workaround in pkgsrc.

 Although maybe it's a good change to have anyway, since the only
 reason elm is using the static libcrypt is that its configury is from
 about 1994. :-|


 (do you really still use elm? I held out for a long time but gave up
 and switched to mutt some time ago... if you do, I might go tidy all
 the build warnings)


 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mail/elm/Makefile,v
 retrieving revision 1.52
 diff -u -r1.52 Makefile
 --- Makefile	19 Aug 2017 00:20:25 -0000	1.52
 +++ Makefile	15 May 2022 05:28:29 -0000
 @@ -29,6 +29,13 @@
  LIBC.Darwin=		/usr/lib/libSystem.dylib
  LIBC.*=			/usr/lib/libc.so

 +# Workaround for PR 56684: avoid explicit static linkage of libcrypt
 +SUBST_CLASSES+=		libcrypt
 +SUBST_SED.libcrypt=	-e 's,/usr/lib/libcrypt.a,-lcrypt,'
 +SUBST_STAGE.libcrypt=	post-configure
 +SUBST_FILES.libcrypt=	Make.defs lib/Makefile src/Makefile utils/Makefile
 +SUBST_MESSAGE.libcrypt=	Avoiding static linkage of libcrypt
 +
  SPECIAL_PERMS+=		bin/elm ${REAL_ROOT_USER} mail 2755

  pre-configure:


 -- 
 David A. Holland
 dholland@netbsd.org

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56684: mail/elm build fails on NetBSD/sparc-9.99.93
Date: Sun, 15 May 2022 17:21:53 +0000

 On Sun, May 15, 2022 at 05:35:01AM +0000, David Holland wrote:
  >  On Sun, May 15, 2022 at 05:10:01AM +0000, David Holland wrote:
  >   >  This is a base bug. libcrypt.a shouldn't pollute the linker namespace
  >   >  with something called "initialize".
  >   >  
  >   >  Seems to come from the argon2 code...
  >  
  >  I filed lib/56838 on this.

 ...which Christos just fixed, FWIW. Updating lib/libcrypt in base
 should eliminate the problem.

 -- 
 David A. Holland
 dholland@netbsd.org

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.