NetBSD Problem Report #51402

From www@NetBSD.org  Tue Aug  9 10:45:54 2016
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D24B17A110
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  9 Aug 2016 10:45:54 +0000 (UTC)
Message-Id: <20160809104553.6921D7A293@mollari.NetBSD.org>
Date: Tue,  9 Aug 2016 10:45:53 +0000 (UTC)
From: raphael@gracetech.at
Reply-To: raphael@gracetech.at
To: gnats-bugs@NetBSD.org
Subject: pkgsrc-2016Q2/lang/g95 does not build on NetBSD7.0.1/arm7hf (raspberrypi2)
X-Send-Pr-Version: www-1.0

>Number:         51402
>Category:       pkg
>Synopsis:       pkgsrc-2016Q2/lang/g95 does not build on NetBSD7.0.1/arm7hf (raspberrypi2)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    wennmach
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 09 10:50:00 +0000 2016
>Last-Modified:  Fri Sep 23 01:20:00 +0000 2016
>Originator:     Raphael Langerhorst
>Release:        NetBSD7.0.1/arm7hf, pkgsrc-2016Q2 (2016-08-09)
>Organization:
GRACETECH
>Environment:
NetBSD namuna 7.0.1 NetBSD 7.0.1 (RPI2.201605221355Z) evbarm
>Description:
this is on raspberrypi2, using NetBSD7.0.1 (arm7hf image) with pkgsrc-2016Q2. This is the same environment as with pkg/51401 (firefox does not build as well)

I tried to install misc/libreoffice, however the lang/g95 dependency fails to build with the following output, I once tried make clean and build again, but same error occurs.

If you need my assistance to check things on the machine, please contact me. I did not take a look into the problem as I am not familiar with this package.

Please see the following output:

MULTILIB_OSDIRNAMES='' \
ASM_HIDDEN_OP='' \
GCC_FOR_TARGET='/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/xgcc -B/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/ -B/usr/pkg/armv7--netbsdelf-eabihf/bin/ -B/usr/pkg/armv7--netbsdelf-eabihf/lib/ -isystem /usr/pkg/armv7--netbsdelf-eabihf/include -isystem /usr/pkg/armv7--netbsdelf-eabihf/sys-include' \
mkinstalldirs='/bin/sh ../../gcc/../mkinstalldirs' \
  /bin/sh mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="USED_FOR_TARGET " \
/bin/sh ../../gcc/mkconfig.sh tconfig.h
tconfig.h is unchanged
/usr/pkg/bin/gmake \
  CFLAGS="-O2  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute  " \
  CONFIG_H="tconfig.h auto-host.h ../../gcc/../include/ansidecl.h" TM_H="tm.h      options.h ../../gcc/config/dbxelf.h ../../gcc/config/elfos.h ../../gcc/config/netbsd.h ../../gcc/config/netbsd-elf.h ../../gcc/config/arm/elf.h ../../gcc/config/arm/aout.h ../../gcc/config/arm/arm.h ../../gcc/config/arm/netbsd-elf.h ../../gcc/defaults.h insn-constants.h insn-flags.h options.h" \
  INCLUDES="-I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include " \
  MAKEOVERRIDES= \
  -f libgcc.mk all
gmake[3]: Entering directory '/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/gcc'
/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/xgcc -B/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/ -B/usr/pkg/armv7--netbsdelf-eabihf/bin/ -B/usr/pkg/armv7--netbsdelf-eabihf/lib/ -isystem /usr/pkg/armv7--netbsdelf-eabihf/include -isystem /usr/pkg/armv7--netbsdelf-eabihf/sys-include -O2  -O2 -O2   -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fomit-frame-pointer -fpic -g0  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include  -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from /usr/include/machine/ansi.h:37,
                 from /usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/include/stddef.h:58,
                 from ../../gcc/tsystem.h:47,
                 from ../../gcc/libgcc2.c:33:
/usr/include/sys/cdefs.h: In function '__zeroll':
/usr/include/sys/cdefs.h:589: error: expected expression before '0'
/usr/include/sys/cdefs.h: In function '__zeroull':
/usr/include/sys/cdefs.h:590: error: expected expression before '0'
In file included from /usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/include/stdio.h:56,
                 from ../../gcc/tsystem.h:90,
                 from ../../gcc/libgcc2.c:33:
/usr/include/sys/ansi.h: At top level:
/usr/include/sys/ansi.h:62: error: expected expression before '[' token
/usr/include/sys/ansi.h:63: error: expected ';' before '__mbstate_t'
gmake[3]: *** [libgcc.mk:46: libgcc/./_muldi3.o] Error 1
gmake[3]: Leaving directory '/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/gcc'
gmake[2]: *** [Makefile:1403: libgcc.a] Error 2
gmake[2]: Leaving directory '/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/gcc'
gmake[1]: *** [Makefile:3903: all-gcc] Error 2
gmake[1]: Leaving directory '/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95'
gmake: *** [Makefile:614: all] Error 2
*** Error code 2

Stop.
make[4]: stopped in /usr/pkgsrc/lang/g95
WARNING: Please add USE_TOOLS+=perl to the package Makefile.
*** Error code 1

Stop.
make[3]: stopped in /usr/pkgsrc/lang/g95
*** Error code 1

Stop.
make[2]: stopped in /usr/pkgsrc/devel/libtool-fortran
*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/math/coinmp
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/misc/libreoffice
namuna#
>How-To-Repeat:
cd /usr/pkgsrc/lang/g95 && make package install clean
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->wennmach
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Tue, 09 Aug 2016 19:37:22 +0000
Responsible-Changed-Why:
Over to maintainer.


From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/51402
Date: Fri, 26 Aug 2016 09:08:54 +0000

 Hi,
 Do note that PKGSRC_FORTRAN=gfortran is a workaround.

From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/51402
Date: Thu, 22 Sep 2016 19:10:03 +0000

 At the very least I can add:

 rpi# cat test.c
 static __inline long long __zeroll(void) { return 0; }
 int main() { return 0; }
 rpi# /usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/xgcc -B/usr/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/ test.c
 test.c: In function '__zeroll':
 test.c:1: error: expected expression before '0'
 test.c: In function 'main':
 test.c:2: error: expected expression before '0'

 compiling the exact same on amd64 works fine. using base gcc works fine
 too (for both).

From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/51402: pkgsrc-2016Q2/lang/g95 does not build on
 NetBSD7.0.1/arm7hf (raspberrypi2)
Date: Fri, 23 Sep 2016 01:17:11 +0000

 I've forced it to build with -O0 using CFLAGS=-O0 in Makefile

 Comparing the compiler output:
 /usr/pkgsrc/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/xgcc -B/usr/pkgsrc/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/ test.c -S
 to the base gcc, I get a diff:

 --- test.s	2016-05-23 21:57:04.000000000 +0000
 +++ test.s.412	2016-05-23 21:53:19.000000000 +0000
 @@ -1,36 +1,16 @@
 -	.cpu arm1176jzf-s
 -	.fpu softvfp
 -	.eabi_attribute 20, 1
 -	.eabi_attribute 21, 1
 -	.eabi_attribute 23, 3
 -	.eabi_attribute 24, 1
 -	.eabi_attribute 25, 1
 -	.eabi_attribute 26, 2
 -	.eabi_attribute 30, 6
 -	.eabi_attribute 34, 1
 -	.eabi_attribute 18, 4
  	.file	"test.c"
  	.text
  	.align	2
  	.global	main
  	.type	main, %function
  main:
 -.LFB0:
 -	.cfi_startproc
  	@ args = 0, pretend = 0, frame = 0
  	@ frame_needed = 1, uses_anonymous_args = 0
  	mov	ip, sp
 -	.cfi_def_cfa_register 12
  	stmfd	sp!, {fp, ip, lr, pc}
 -	.cfi_offset 11, -16
 -	.cfi_offset 13, -12
 -	.cfi_offset 14, -8
  	sub	fp, ip, #4
 -	.cfi_def_cfa 11, 4
  	mov	r3, #0
  	mov	r0, r3
  	ldmfd	sp, {fp, sp, pc}
 -	.cfi_endproc
 -.LFE0:
  	.size	main, .-main
 -	.ident	"GCC: (nb2 20150115) 4.8.4"
 +	.ident	"GCC: (GNU) 4.1.2"

 Seems to be the wrong ABI

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.