NetBSD Problem Report #48469

From www@NetBSD.org  Sun Dec 22 20:05:53 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id BB096A63C4
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 22 Dec 2013 20:05:53 +0000 (UTC)
Message-Id: <20131222200551.A0852A6464@mollari.NetBSD.org>
Date: Sun, 22 Dec 2013 20:05:51 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: sysutils/memtestplus build failure on NetBSD/i386-5.2_STABLE
X-Send-Pr-Version: www-1.0

>Number:         48469
>Category:       pkg
>Synopsis:       sysutils/memtestplus build failure on NetBSD/i386-5.2_STABLE
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 22 20:10:01 +0000 2013
>Closed-Date:    Sun Dec 22 21:34:56 +0000 2013
>Last-Modified:  Sun Dec 22 21:35:00 +0000 2013
>Originator:     John D. Baker
>Release:        netbsd-5 i386, pkgsrc-HEAD (pre-pkgsrc-2013Q4)
>Organization:
>Environment:
NetBSD verthandi.technoskunk.fur 5.2_STABLE NetBSD 5.2_STABLE (VERTHANDI) #13: Wed Dec 18 05:44:53 CST 2013  sysop@verthandi.technoskunk.fur:/d0/build/netbsd-5/obj/i386/sys/arch/i386/compile/VERTHANDI i386

>Description:
Building sysutils/memtestplus fails on netbsd-5 as follows:

[...]
gcc -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC  -fno-stack-protector    -c -o init.o init.c
In file included from init.c:13:
stdin.h:52:27: warning: no newline at end of file
init.c:640:39: error: invalid suffix "b10" on integer constant
init.c:644:42: error: invalid suffix "b10" on integer constant
gmake: *** [init.o] Error 1
*** Error code 2

Stop.
make: stopped in /x/pkgsrc/sysutils/memtestplus
*** Error code 1

Stop.
make: stopped in /x/pkgsrc/sysutils/memtestplus


Looking at the lines reported by the compiler:

   640          if(result != -1) { v->fail_safe |= 0b10; }

   644    if(CONSERVATIVE_SMP) { v->fail_safe |= 0b10; }

I would guess C syntax has evolved "0b" as a prefix to indicate a
base-2 constant?  If so, I would further guess the GCC in netbsd-5 is
too old to know about this.
>How-To-Repeat:
Attempt to build sysutils/memtestplus (5.01) on netbsd-5/i386 (and
probably netbsd-5/amd64).

>Fix:
Patching the code is likely unworkable.  Probably better to require a
later C compiler.  GCC 4.6 is already needed to build "www/firefox" on
netbsd-5.  Perhaps, if it supports the required syntax, it should be a
dependency of sysutils/memtestplus as well.

>Release-Note:

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48469: sysutils/memtestplus build failure on NetBSD/i386-5.2_STABLE
Date: Sun, 22 Dec 2013 14:16:50 -0600 (CST)

 The following patch allows memtestplus to build on netbsd-5/i386
 (swiped from "www/firefox/mozilla-common.mk"):

 +Index: sysutils/memtestplus/Makefile
 +===================================================================
 +RCS file: /cvsroot/pkgsrc/sysutils/memtestplus/Makefile,v
 +retrieving revision 1.17
 +diff -u -b -r1.17 Makefile
 +--- sysutils/memtestplus/Makefile       8 Dec 2013 00:35:28 -0000       1.17
 ++++ sysutils/memtestplus/Makefile       22 Dec 2013 20:11:07 -0000
 +@@ -17,6 +17,14 @@
 + 
 + ONLY_FOR_PLATFORM=     NetBSD-*-i386 Linux-*-i386 NetBSD-*-x86_64 Linux-*-x86_64
 + 
 ++.include "../../mk/bsd.prefs.mk"
 ++.if !empty(MACHINE_PLATFORM:MNetBSD-5.*)
 ++GCC_REQD+=              4.6
 ++.else
 ++GCC_REQD+=              4.5
 ++.endif
 ++
 ++
 + USE_TOOLS+=            gmake
 + SUBST_CLASSES+=                delcr
 + SUBST_STAGE.delcr=     pre-patch

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    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: Sun, 22 Dec 2013 21:34:56 +0000
State-Changed-Why:
Committed, thanks.


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48469 CVS commit: pkgsrc/sysutils/memtestplus
Date: Sun, 22 Dec 2013 21:32:36 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Sun Dec 22 21:32:36 UTC 2013

 Modified Files:
 	pkgsrc/sysutils/memtestplus: Makefile

 Log Message:
 Fix build on NetBSD-5* using a patch from John D. Baker in PR 48469.


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 pkgsrc/sysutils/memtestplus/Makefile

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.