NetBSD Problem Report #48538

From www@NetBSD.org  Mon Jan 20 23:54:55 2014
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 74ADCA6475
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Jan 2014 23:54:55 +0000 (UTC)
Message-Id: <20140120235348.9C516A6488@mollari.NetBSD.org>
Date: Mon, 20 Jan 2014 23:53:48 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: emulators/dosbox build fails on NetBSD/i386-{current,5.2_STABLE}
X-Send-Pr-Version: www-1.0

>Number:         48538
>Category:       pkg
>Synopsis:       emulators/dosbox build fails on NetBSD/i386-{current,5.2_STABLE}
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 20 23:55:00 +0000 2014
>Closed-Date:    Thu Feb 06 01:19:10 +0000 2014
>Last-Modified:  Thu Feb 06 16:55:00 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/i386-{current,5.2_STABLE}, pkgsrc-2013Q4
>Organization:
>Environment:
NetBSD gx260a 6.99.28 NetBSD 6.99.28 (GENERIC) #2: Mon Jan 13 23:51:19 CST 2014  sysop@verthandi.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/GENERIC i386

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:
While updating packages with pkg_rolling-replace on
NetBSD/i386-5.2_STABLE (w/modular Xorg), the build of
"emulators/dosbox" failed as follows:

[...]
c++ -DHAVE_CONFIG_H -I. -I../..   -I../../include -fPIC -I/usr/pkg/include -I/usr/pkg/include/libdrm -I/usr/include -I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE  -O2 -I/usr/pkg/include -I/usr/pkg/include/libdrm -I/usr/include -MT core_prefetch.o -MD -MP -MF .deps/core_prefetch.Tpo -c -o core_prefetch.o core_prefetch.cpp
mv -f .deps/core_prefetch.Tpo .deps/core_prefetch.Po
c++ -DHAVE_CONFIG_H -I. -I../..   -I../../include -fPIC -I/usr/pkg/include -I/usr/pkg/include/libdrm -I/usr/include -I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE  -O2 -I/usr/pkg/include -I/usr/pkg/include/libdrm -I/usr/include -MT core_dyn_x86.o -MD -MP -MF .deps/core_dyn_x86.Tpo -c -o core_dyn_x86.o core_dyn_x86.cpp
core_dyn_x86/risc_x86.h: In function 'Bits CPU_Core_Dyn_X86_Run()':
core_dyn_x86/risc_x86.h:143: error: PIC register '%ebx' clobbered in 'asm'
*** Error code 1

Stop.
make: stopped in /d0/build/pkgsrc/emulators/dosbox/work/dosbox-0.74/src/cpu
*** Error code 1

Stop.
make: stopped in /d0/build/pkgsrc/emulators/dosbox/work/dosbox-0.74/src/cpu
[...]


To double-check, I also tried to build it on NetBSD/i386-current
(6.99.28 as noted in the 'uname -a' output above) and the failure is
the same, although with slightly different compiler arguments:

[...]
c++ -DHAVE_CONFIG_H -I. -I../..   -I../../include -fPIC -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/libdrm -I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE  -O2 -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/libdrm -MT core_prefetch.o -MD -MP -MF .deps/core_prefetch.Tpo -c -o core_prefetch.o core_prefetch.cpp
mv -f .deps/core_prefetch.Tpo .deps/core_prefetch.Po
c++ -DHAVE_CONFIG_H -I. -I../..   -I../../include -fPIC -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/libdrm -I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE  -O2 -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/libdrm -MT core_dyn_x86.o -MD -MP -MF .deps/core_dyn_x86.Tpo -c -o core_dyn_x86.o core_dyn_x86.cpp
In file included from core_dyn_x86.cpp:185:0:
core_dyn_x86/risc_x86.h: In function 'Bits CPU_Core_Dyn_X86_Run()':
core_dyn_x86/risc_x86.h:143:3: error: PIC register '%ebx' clobbered in 'asm'
*** Error code 1

Stop.
make[4]: stopped in /var/tmp/pkgsrc/emulators/dosbox/work/dosbox-0.74/src/cpu
[...]

As I suspect the bulk builds on NetBSD/i386-5.1 are strictly using
native Xorg, "emulators/dosbox" is probably never attempted due to
failed dependencies (i.e. MesaLib).

There was no problem building "emulators/dosbox" on 5.2_STABLE
(again, w/modular Xorg), 6.1_STABLE, or -HEAD throughout the
pkgsrc-2013Q3 branch.

The bulk builds on NetBSD/i386-6.0 show that "emulators/dosbox"
fails to build there as well, but apparently succeeds on
NetBSD/amd64-6.0

Since "dosbox" is host-cpu-independent, I will try building it on
NetBSD/macppc-current soon just to see if there's anything odd.
>How-To-Repeat:
On NetBSD/i386-5.2_STABLE w/modular Xorg or NetBSD/i386-current (native
Xorg), and NetBSD/i386-6.x (according to build build reports), attempt to
build "emulators/dosbox".
>Fix:

>Release-Note:

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48538: emulators/dosbox build fails on NetBSD/i386-{current,5.2_STABLE}
Date: Tue, 21 Jan 2014 09:20:49 -0600 (CST)

 Build succeeds on NetBSD/macppc-6.99.29.

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

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48538 CVS commit: pkgsrc/emulators/dosbox
Date: Wed, 5 Feb 2014 08:40:11 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Wed Feb  5 08:40:11 UTC 2014

 Modified Files:
 	pkgsrc/emulators/dosbox: Makefile

 Log Message:
 Restrict CPPFLAGS=-fPIC to clang only, as changed reason.

 At least, It break build on NetBSD-i386 with buitin gcc, PR pkg/48538.
 No build failure on NetBSD-amd64 with builtin gcc.


 To generate a diff of this commit:
 cvs rdiff -u -r1.37 -r1.38 pkgsrc/emulators/dosbox/Makefile

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

State-Changed-From-To: open->pending-pullups
State-Changed-By: obache@NetBSD.org
State-Changed-When: Wed, 05 Feb 2014 08:58:28 +0000
State-Changed-Why:
fixed in HEAD, pullup request to pkgsrc-2013Q4 is #4315.


From: "Matthias Scheler" <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48538 CVS commit: [pkgsrc-2013Q4] pkgsrc/emulators/dosbox
Date: Wed, 5 Feb 2014 19:45:10 +0000

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Wed Feb  5 19:45:10 UTC 2014

 Modified Files:
 	pkgsrc/emulators/dosbox [pkgsrc-2013Q4]: Makefile

 Log Message:
 Pullup ticket #4315 - requested by obache
 emulators/dosbox: build fix

 Revisions pulled up:
 - emulators/dosbox/Makefile                                     1.38

 ---
    Module Name:	pkgsrc
    Committed By:	obache
    Date:		Wed Feb  5 08:40:11 UTC 2014

    Modified Files:
    	pkgsrc/emulators/dosbox: Makefile

    Log Message:
    Restrict CPPFLAGS=-fPIC to clang only, as changed reason.

    At least, It break build on NetBSD-i386 with buitin gcc, PR pkg/48538.
    No build failure on NetBSD-amd64 with builtin gcc.


 To generate a diff of this commit:
 cvs rdiff -u -r1.37 -r1.37.2.1 pkgsrc/emulators/dosbox/Makefile

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

State-Changed-From-To: pending-pullups->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Thu, 06 Feb 2014 01:19:10 +0000
State-Changed-Why:
pulled up to pkgsrc-2013Q4.


From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/48538 CVS commit: pkgsrc/emulators/dosbox
Date: Thu, 6 Feb 2014 10:53:20 -0600 (CST)

 On Wed, 5 Feb 2014, OBATA Akio wrote:

 > Log Message:
 > Restrict CPPFLAGS=-fPIC to clang only, as changed reason.
 >
 > At least, It break build on NetBSD-i386 with buitin gcc, PR pkg/48538.
 > No build failure on NetBSD-amd64 with builtin gcc.

 Builds and runs on NetBSD/i386-5.2_STABLE (pkgsrc/modular Xorg) and
 NetBSD/i386-HEAD (6.99.30).  I don't have any suitable netbsd-6/i386
 machines in service at the moment (those that are don't have any X Window
 System installed).  Bulk build logs appear to indicate success on
 NetBSD/i386-6.0.

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

>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.