NetBSD Problem Report #53743

From tsutsui@ceres.dti.ne.jp  Sun Nov 25 17:50:03 2018
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 0A5617A16B
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 25 Nov 2018 17:50:03 +0000 (UTC)
Message-Id: <201811251749.wAPHnvwb002540@ceres.dti.ne.jp>
Date: Mon, 26 Nov 2018 02:49:57 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf 8.0
X-Send-Pr-Version: 3.95

>Number:         53743
>Category:       toolchain
>Synopsis:       pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf 8.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 25 17:55:00 +0000 2018
>Closed-Date:    
>Last-Modified:  Tue Dec 25 15:28:55 +0000 2018
>Originator:     Izumi Tsutsui
>Release:        NetBSD 8.0
>Organization:
>Environment:
System: NetBSD rpi3 8.0 NetBSD 8.0 (RPI2) #0: Tue Jul 17 14:59:51 UTC 2018  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/RPI2 evbarm
Architecture: earmv6hf
Machine: evbarm on Raspberry Pi 3B
>Description:
pkgsrc/lang/vala binary valac-0.42 dumps core on building other packages
that require vala.

At least valac-0.42 dumps core during building pkgsrc/net/sayaka:

---
 :

  CC    ssl_tls.c
  AR    libmbedcrypto.a
  RL    libmbedcrypto.a
  AR    libmbedx509.a
  RL    libmbedx509.a
  AR    libmbedtls.a
  RL    libmbedtls.a
gmake[2]: Leaving directory '/usr/obj.earmv6hf/pkgsrc/net/sayaka/work.earmv6hf/sayaka-3.3.2/mbedtls/library'
gmake[1]: Leaving directory '/usr/obj.earmv6hf/pkgsrc/net/sayaka/work.earmv6hf/sayaka-3.3.2/mbedtls'
/usr/pkg/bin/gmake -C vala vala-make2
gmake[1]: Entering directory '/usr/obj.earmv6hf/pkgsrc/net/sayaka/work.earmv6hf/sayaka-3.3.2/vala'
valac -X -w --pkg posix vala-make2.vala
gmake[1]: *** [Makefile:111: vala-make2] Segmentation fault (core dumped)
gmake[1]: Leaving directory '/usr/obj.earmv6hf/pkgsrc/net/sayaka/work.earmv6hf/sayaka-3.3.2/vala'
gmake: *** [Makefile:3: all] Error 2
*** Error code 2

Stop.
make[1]: stopped in /usr/pkgsrc/net/sayaka
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/net/sayaka
rpi3# gdb /usr/pkg/bin/valac-0.42 /usr/obj.earmv6hf/pkgsrc/net/sayaka/work.earmv6hf/sayaka-3.3.2/vala/valac-0.42.core 
GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm--netbsdelf-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/pkg/bin/valac-0.42...(no debugging symbols found)...done.
[New process 1]
Core was generated by `valac-0.42'.
Program terminated with signal SIGSEGV, Segmentation fault.
Register 25 is not available
#-1 0x7ff761e4 in ?? ()
(gdb) bt
#-1 0x7ff761e4 in ?? ()
(gdb) 
---

Note there is no problem on NetBSD/i386 8.0 and NetBSD/amd64 8.0.

>How-To-Repeat:
- checkout pkgsrc-2018Q3
- cd pkgsrc/net/sayaka && make package

>Fix:
No idea.

>Release-Note:

>Audit-Trail:
From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org, Thomas Klausner <wiz@netbsd.org>
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf 8.0
Date: Wed, 5 Dec 2018 11:12:59 +0100

 > pkgsrc/lang/vala binary valac-0.42 dumps core on building other packages
 > that require vala.
 >
 > At least valac-0.42 dumps core during building pkgsrc/net/sayaka:

 > Note there is no problem on NetBSD/i386 8.0 and NetBSD/amd64 8.0.
 >
 > >How-To-Repeat:
 > - checkout pkgsrc-2018Q3
 > - cd pkgsrc/net/sayaka && make package

 wiz, any ideas? We could always mark vala as NOT_FOR_PLATFORM for arm.

 Izumi, did you raise this upstream? They might have an idea.

 -- 
 Benny

From: Thomas Klausner <wiz@netbsd.org>
To: Benny Siegert <bsiegert@gmail.com>
Cc: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf
 8.0
Date: Wed, 5 Dec 2018 11:28:10 +0100

 On Wed, Dec 05, 2018 at 11:12:59AM +0100, Benny Siegert wrote:
 > wiz, any ideas? We could always mark vala as NOT_FOR_PLATFORM for arm.

 No, sorry.
  Thomas

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf
	 8.0
Date: Sat, 8 Dec 2018 11:49:33 +0900

 Disabling -O2 optimization by CFLAGS seems to work around
 (though BUILDLINK_TRANSFORM in hacks.mk doesn't work):

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/vala/Makefile,v
 retrieving revision 1.46
 diff -u -p -r1.46 Makefile
 --- Makefile	3 Sep 2018 10:46:45 -0000	1.46
 +++ Makefile	8 Dec 2018 02:34:56 -0000
 @@ -17,6 +17,12 @@ USE_TOOLS+=		bison flex gmake pkg-config
  PKGCONFIG_OVERRIDE+=	libvala.pc.in
  PKGCONFIG_OVERRIDE+=	vapigen/vapigen.pc.in

 +.include "../../mk/compiler.mk"
 +
 +.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && !empty(CC_VERSION:Mgcc-5.*)
 +CFLAGS+= -O
 +.endif
 +
  BUILDLINK_API_DEPENDS.glib2+=	glib2>=2.40.0

  .include "../../devel/glib2/buildlink3.mk"


 ---
 Izumi Tsutsui

From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf 8.0
Date: Sun, 9 Dec 2018 14:14:34 +0100

 I think this should go into hacks.mk. As far as I remember, the
 Makefile needs an explicit

 .include "hacks.mk"
 On Sat, Dec 8, 2018 at 3:50 AM Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:
 >
 > The following reply was made to PR pkg/53743; it has been noted by GNATS.
 >
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc: tsutsui@ceres.dti.ne.jp
 > Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf
 >          8.0
 > Date: Sat, 8 Dec 2018 11:49:33 +0900
 >
 >  Disabling -O2 optimization by CFLAGS seems to work around
 >  (though BUILDLINK_TRANSFORM in hacks.mk doesn't work):
 >
 >  Index: Makefile
 >  ===================================================================
 >  RCS file: /cvsroot/pkgsrc/lang/vala/Makefile,v
 >  retrieving revision 1.46
 >  diff -u -p -r1.46 Makefile
 >  --- Makefile   3 Sep 2018 10:46:45 -0000       1.46
 >  +++ Makefile   8 Dec 2018 02:34:56 -0000
 >  @@ -17,6 +17,12 @@ USE_TOOLS+=         bison flex gmake pkg-config
 >   PKGCONFIG_OVERRIDE+=  libvala.pc.in
 >   PKGCONFIG_OVERRIDE+=  vapigen/vapigen.pc.in
 >
 >  +.include "../../mk/compiler.mk"
 >  +
 >  +.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && !empty(CC_VERSION:Mgcc-5.*)
 >  +CFLAGS+= -O
 >  +.endif
 >  +
 >   BUILDLINK_API_DEPENDS.glib2+= glib2>=2.40.0
 >
 >   .include "../../devel/glib2/buildlink3.mk"
 >
 >
 >  ---
 >  Izumi Tsutsui
 >


 -- 
 Benny

From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf 8.0
Date: Sun, 09 Dec 2018 14:21:14 +0100

 Hello Benny,

 Benny Siegert writes:
 > I think this should go into hacks.mk. As far as I remember, the
 > Makefile needs an explicit
 >
 > .include "hacks.mk"

 hacks.mk is automatically included (it is not needed to add that
 it esplicitly in Makefile).

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/53743: pkgsrc-2018Q3 lang/vala dumps core on NetBSD/earmv6hf
	 8.0
Date: Sun, 23 Dec 2018 05:40:58 +0900

 > Disabling -O2 optimization by CFLAGS seems to work around

 Further boring bisect shows -fno-optimize-sibling-calls is enough
 to build working binaries on RPI3.

 I'll put it in hacks.mk as suggested.

 ---
 # $NetBSD$

 .if !defined(VALA_HACKS_MK)
 VALA_HACKS_MK=	defined

 .include "../../mk/compiler.mk"

 ### On NetBSD/earmv6ef 8.0 with gcc 5.5.0, vala binaries compiled with the
 ### default optiomization options produce segmentation faulting.
 ### Compiling with `-fno-optimize-sibling-calls' works around.
 ###
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && !empty(CC_VERSION:Mgcc-5.*)
 PKG_HACKS+=	optimisation
 CFLAGS+=	-fno-optimize-sibling-calls
 .endif

 .endif	# VALA_HACKS_MK

 ---
 Izumi Tsutsui

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53743 CVS commit: pkgsrc/lang/vala
Date: Mon, 24 Dec 2018 00:10:09 +0000

 Module Name:	pkgsrc
 Committed By:	tsutsui
 Date:		Mon Dec 24 00:10:09 UTC 2018

 Modified Files:
 	pkgsrc/lang/vala: Makefile
 Added Files:
 	pkgsrc/lang/vala: hacks.mk

 Log Message:
 vala: add hacks.mk to avoid SEGV of vala binaries on NetBSD/earmv6hf 8.0.

 Bump PKGREVISION to denote visible binary changes on arm.
 Fixes PR pkg/53743.  Ok'ed by wiz@


 To generate a diff of this commit:
 cvs rdiff -u -r1.47 -r1.48 pkgsrc/lang/vala/Makefile
 cvs rdiff -u -r0 -r1.1 pkgsrc/lang/vala/hacks.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Mon, 24 Dec 2018 13:36:07 +0000
State-Changed-Why:
Fixed and committed.


From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53743 CVS commit: pkgsrc/lang/vala
Date: Mon, 24 Dec 2018 14:45:50 +0000

 Module Name:	pkgsrc
 Committed By:	tsutsui
 Date:		Mon Dec 24 14:45:50 UTC 2018

 Modified Files:
 	pkgsrc/lang/vala: Makefile hacks.mk

 Log Message:
 vala: apply the same hack as PR pkg/53743 for gcc 6.5.0 for NetBSD/evbarm.

 Reported by bouyer@:
  http://mail-index.netbsd.org/pkgsrc-changes/2018/12/24/msg185017.html
 Bump PKGREVISION again.


 To generate a diff of this commit:
 cvs rdiff -u -r1.48 -r1.49 pkgsrc/lang/vala/Makefile
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/vala/hacks.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->toolchain-manager
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Tue, 25 Dec 2018 15:28:55 +0000
Responsible-Changed-Why:
re-opening as toolchain bug ,especially since it affects GCC 6.5.


State-Changed-From-To: closed->open
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 25 Dec 2018 15:28:55 +0000
State-Changed-Why:


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.