NetBSD Problem Report #55806

From www@netbsd.org  Sun Nov 15 20:17:04 2020
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 273371A9A19
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 15 Nov 2020 20:17:04 +0000 (UTC)
Message-Id: <20201115201702.938AD1A9A1A@mollari.NetBSD.org>
Date: Sun, 15 Nov 2020 20:17:02 +0000 (UTC)
From: jdbaker@consolidated.net
Reply-To: jdbaker@consolidated.net
To: gnats-bugs@NetBSD.org
Subject: lang/clisp build fails on NetBSD/i386-9.99.75
X-Send-Pr-Version: www-1.0

>Number:         55806
>Category:       pkg
>Synopsis:       lang/clisp build fails on NetBSD/i386-9.99.75
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 15 20:20:01 +0000 2020
>Closed-Date:    Thu Sep 29 00:33:50 +0000 2022
>Last-Modified:  Thu Sep 29 00:33:50 +0000 2022
>Originator:     John D. Baker
>Release:        NetBSD/i386-9.99.75, pkgsrc-2020Q3
>Organization:
>Environment:
NetBSD thinkcentre.technoskunk.fur 9.99.75 NetBSD 9.99.75 (GX260A) #277: Fri Nov 13 11:02:47 CST 2020  sysop@plex760.technoskunk.fur:/r0/build/current/obj/i386/sys/arch/i386/compile/GX260A i386
>Description:
Building "lang/clisp" from pkgsrc-2020Q3 on NetBSD/i386-9.99.75
fails with:

[...]
cd data && ln -s ../../doc/Symbol-Table.text .
gcc -O2 -fno-builtin-calloc -fno-builtin-malloc -fno-builtin-memalign -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -falign-functions=4 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,--export-dynamic spvw.o  spvwtabf.o  spvwtabs.o  spvwtabo.o  eval.o  control.o  encoding.o  pathname.o  stream.o  socket.o  io.o  funarg.o  array.o  hashtabl.o  list.o  package.o  record.o  weak.o  sequence.o  charstrg.o  debug.o  error.o  misc.o  time.o  predtype.o  symbol.o  lisparit.o  i18n.o  foreign.o  unixaux.o  built.o  ari80386.o  gmalloc.o modules.o /usr/pkg/lib/libintl.so -Wl,-rpath -Wl,/usr/pkg/lib /usr/pkg/lib/libreadline.so /usr/lib/libtermcap.so -Wl,-rpath -Wl,/usr/pkg/lib -lter
 mcap /usr/pkg/lib/libavcall.so -Wl,-rpath -Wl,/usr/pkg/lib /usr/pkg/lib/libcallback.so  -L/usr/pkg/lib -lsigsegv -L/usr/lib -lc -Wl,-R/usr/pkg/lib libgnu_cl.a -o lisp.run
./lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m 2MW -lp  -x '(and (load "init.lisp") (sys::%saveinitmem) (ext::exit)) (ext::exit t)'
WARNING: locale: no encoding 646, using ISO-8859-1
C_CODE_ALIGNMENT is wrong. &CRASH = 0x80f5a32.
Add -falign-functions=4 to CFLAGS in the Makefile.
*** Signal 6

Stop.
make: stopped in /d0/build/pkgsrc/lang/clisp/work/clisp-2.49/src
*** Error code 1

Stop.
make[1]: stopped in /x/pkgsrc/lang/clisp
*** Error code 1

Stop.
make: stopped in /x/pkgsrc/lang/clisp

The suggested fix is already in the gcc command line.
>How-To-Repeat:
S/A
>Fix:

>Release-Note:

>Audit-Trail:
From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Sun, 15 Nov 2020 17:30:55 -0600 (CST)

 I should note that "lang/clisp" build just fine on NetBSD/i386-9.1_STABLE.

 -- 
 |/"\ 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: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Wed, 21 Sep 2022 16:50:14 -0500 (CDT)

 Now that I'm building everything for i386/9.3_STABLE using pkgsrc GCC 10,
 I'm hitting this problem again.

 [...]
 mkdir -p gllib
 test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
 cd gllib && /usr/bin/make CFLAGS="-O2 -fno-builtin-calloc -fno-builtin-malloc -fno-builtin-memalign -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -falign-functions=4 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -fPIC" CLISP_LIBDIR=/tmp/pkgsrc/lang/clisp/work/clisp-2.49/src
 cd .. && /usr/bin/make  am--refresh
 /usr/bin/make  all-recursive
 cd .. && /usr/bin/make  am--refresh
 test -r libgnu_cl.a || ln -s gllib/libgnu.a libgnu_cl.a
 ./lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m 2MW -lp  -x '(and (load "init.lisp") (sys::%saveinitmem) (ext::exit)) (ext::exit t)'
 WARNING: locale: no encoding 646, using ISO-8859-1
 C_CODE_ALIGNMENT is wrong. &CRASH = 0x80f5671.
 Add -falign-functions=4 to CFLAGS in the Makefile.
 *** Signal 6

 Stop.
 make: stopped in /tmp/pkgsrc/lang/clisp/work/clisp-2.49/src
 *** Error code 1

 Stop.
 make[1]: stopped in /x/pkgsrc/lang/clisp
 *** Error code 1

 Stop.
 make: stopped in /x/pkgsrc/lang/clisp


 As can be seen above, the suggestion to "add -falign-functions=4" is already
 present in the compiler invocation.

 -- 
 |/"\ 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: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Wed, 21 Sep 2022 17:02:15 -0500 (CDT)

 As a workaround, I made an exception for "lang/clisp" in my global
 application of "GCC_REQD+=10" in "/etc/mk.conf" and it builds without
 problems using the base system compiler [GCC 7.5.0 (nb4 20200810)].

 Since -current has GCC 10.4 as the base compiler, the problem remains.

 -- 
 |/"\ 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/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Fri, 23 Sep 2022 20:46:23 +0000

 On Wed, Sep 21, 2022 at 11:20:01PM +0000, John D. Baker wrote:
  > From: "John D. Baker" <jdbaker@consolidated.net>
  > To: gnats-bugs@NetBSD.org
  > Cc: 
  > Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
  > Date: Wed, 21 Sep 2022 17:02:15 -0500 (CDT)
  > 
  >  As a workaround, I made an exception for "lang/clisp" in my global
  >  application of "GCC_REQD+=10" in "/etc/mk.conf" and it builds without
  >  problems using the base system compiler [GCC 7.5.0 (nb4 20200810)].
  >  
  >  Since -current has GCC 10.4 as the base compiler, the problem remains.

 I see that it says to add -falign-functions=4 to the makefile but that
 according to the pasted fragment of the build it's already doing that.

 So I guess it's going to require digging...

 The symbol it's complaining about is defined in "debug.d"; can you
 check in the full build log whether that's built using
 -falign-functions=4 (and also check .work.log to see if the wrappers
 are causing it to get lost for some reason)?

 The code is a maze of cpp abuse but I don't see anything that would
 accidentally override that within the source.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Sat, 24 Sep 2022 22:53:10 -0500 (CDT)

 On Fri, 23 Sep 2022, David Holland wrote:

 >  The symbol it's complaining about is defined in "debug.d"; can you
 >  check in the full build log whether that's built using
 >  -falign-functions=4

 That appears to be in the compiler invocation (debug.c created from debug.d):

 gcc -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/inc
 lude/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include  -I/tmp/pkgsrc/lang/clisp/work
 /clisp-2.49/src/gllib -O2 -fno-builtin-calloc -fno-builtin-malloc -fno-builtin-m
 emalign -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -falign-funct
 ions=4 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/
 glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -W -Wsw
 itch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -c debug.c


 > (and also check .work.log to see if the wrappers
 >  are causing it to get lost for some reason)?

 It appears to be here too:

 [...]
 [*] cc -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/
 include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/tmp/pkgsrc/lang/clisp/wo
 rk/clisp-2.49/src/gllib -O2 -fno-builtin-calloc -fno-builtin-malloc -fno-builtin
 -memalign -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -falign-fun
 ctions=4 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/includ
 e/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -W -W
 switch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations
  -O -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -c debug.c
 <.> /tmp/pkgsrc/lang/clisp/work/.gcc/bin/gcc -fcommon -Wl,-zrelro -I/tmp/pkgsrc/lang/clisp/work/.buildlink/include -I/tmp/pkgsrc/lang/clisp/work/.buildlink/include/glib-2.0 -I/tmp/pkgsrc/lang/clisp/work/.buildlink/include/gio-unix-2.0 -I/tmp/pkgsrc/lang/clisp/work/.buildlink/lib/glib-2.0/include -I/tmp/pkgsrc/lang/clisp/work/clisp-2.49/src/gllib -O2 -fno-builtin-calloc -fno-builtin-malloc -fno-builtin-memalign -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -falign-functions=4 -D_FORTIFY_SOURCE=2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -O -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -c debug.c -D_FORTIFY_SOURCE=2 -fstack-protector-strong
 [...]


 -- 
 |/"\ 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/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Mon, 26 Sep 2022 19:49:45 +0000

 On Sun, Sep 25, 2022 at 03:55:02AM +0000, John D. Baker wrote:
  >  > (and also check .work.log to see if the wrappers
  >  >  are causing it to get lost for some reason)?
  >  
  >  It appears to be here too:

 Boo. Problems in the wrappers or with configuring the wrappers are
 delicate but at least tractable. That suggests a compiler bug :-(

 I guess the next step is to check the section alignment in the .o file
 (and the offset of the symbol in the section) to see if it's wrong
 there or if the linker's breaking it. (readelf -S and readelf -s
 respectively)

 The "Ndx" column in readelf -s gives the section number of the symbol;
 probably .text but given all the voodoo in this package it might not
 be. In that case the problem might be that the custom section's
 alignment isn't set, which is fixable...

 (I don't have an i386 chroot these days to check myself, and
 unfortunately just building with -m32 isn't good enough because then
 the deps don't work and it doesn't pass configure.)

 -- 
 David A. Holland
 dholland@netbsd.org

From: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Wed, 28 Sep 2022 13:09:45 -0500 (CDT)

 I finally got around to building packages for i386-current (9.99.99
 shortly before the bump to ".100") and it seems that clisp builds
 fine now.  Scrolling back through a recent 'pkg_rolling-replace' run,
 it seems to have built and updated/replaced "lang/clisp" without complaint.

 I'll build explicitly when I get a chance to confirm.

 -- 
 |/"\ 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: "John D. Baker" <jdbaker@consolidated.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55806: lang/clisp build fails on NetBSD/i386-9.99.75
Date: Wed, 28 Sep 2022 17:46:30 -0500 (CDT)

 Confirmed.  "lang/clisp" now builds successfully on NetBSD/i386-current
 (9.99.99).

 As such, this PR may be closed.  The failure most recently reported was
 using pkgsrc GCC 10 ("lang/gcc10") on NetBSD/i386-9.3_STABLE.

 -- 
 |/"\ 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

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 29 Sep 2022 00:33:50 +0000
State-Changed-Why:
Confirmed fixed, thanks.


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