NetBSD Problem Report #48681

From www@NetBSD.org  Tue Mar 25 23:01:22 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AD8CDA40D8
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Mar 2014 23:01:22 +0000 (UTC)
Message-Id: <20140325230120.CD12AA580E@mollari.NetBSD.org>
Date: Tue, 25 Mar 2014 23:01:20 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: dosbox build fails with gcc48 on i386-6.99.38
X-Send-Pr-Version: www-1.0

>Number:         48681
>Category:       pkg
>Synopsis:       dosbox build fails with gcc48 on i386-6.99.38
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 25 23:05:00 +0000 2014
>Closed-Date:    Thu Apr 17 13:23:55 +0000 2014
>Last-Modified:  Thu Apr 17 13:23:55 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/i386-6.99.38(gcc48), pkgsrc-HEAD (pre-pkgsrc-2014Q1)
>Organization:
>Environment:
NetBSD gx260a 6.99.38 NetBSD 6.99.38 (GENERIC) #11: Mon Mar 24 22:17:52 CDT 2014  sysop@verthandi.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/GENERIC i386

>Description:
On i386-current built with HAVE_GCC=48 and thus using gcc 4.8.3, building
emulators/dosbox fails as follows:

[...]
Making all in core_dynrec
c++ -DHAVE_CONFIG_H -I. -I../..   -I../../include -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 callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cpp
mv -f .deps/callback.Tpo .deps/callback.Po
c++ -DHAVE_CONFIG_H -I. -I../..   -I../../include -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 cpu.o -MD -MP -MF .deps/cpu.Tpo -c -o cpu.o cpu.cpp
In file included from ../../include/programs.h:28:0,
                 from cpu.cpp:29:
../../include/dos_inc.h: In member function 'void DOS_MCB::SetFileName(const char*)':
../../include/dos_inc.h:543:78: error: expected primary-expression before ',' token
  void SetFileName(char const * const _name) { MEM_BlockWrite(pt+offsetof(sMCB,filename),_name,8); }
                                                                              ^
../../include/dos_inc.h:543:79: error: 'filename' was not declared in this scope
  void SetFileName(char const * const _name) { MEM_BlockWrite(pt+offsetof(sMCB,filename),_name,8); }
                                                                               ^
../../include/dos_inc.h:543:87: error: 'offsetof' was not declared in this scope
  void SetFileName(char const * const _name) { MEM_BlockWrite(pt+offsetof(sMCB,filename),_name,8); }
                                                                                       ^
../../include/dos_inc.h: In member function 'void DOS_MCB::GetFileName(char*)':
../../include/dos_inc.h:544:71: error: expected primary-expression before ',' token
  void GetFileName(char * const _name) { MEM_BlockRead(pt+offsetof(sMCB,filename),_name,8);_name[8]=0;}
                                                                       ^
../../include/dos_inc.h:544:72: error: 'filename' was not declared in this scope
  void GetFileName(char * const _name) { MEM_BlockRead(pt+offsetof(sMCB,filename),_name,8);_name[8]=0;}
                                                                        ^
../../include/dos_inc.h:544:80: error: 'offsetof' was not declared in this scope
  void GetFileName(char * const _name) { MEM_BlockRead(pt+offsetof(sMCB,filename),_name,8);_name[8]=0;}
                                                                                ^
cpu.cpp: In member function 'void TaskStateSegment::Get_SSx_ESPx(Bitu, Bitu&, Bitu&)':
cpu.cpp:294:37: error: expected primary-expression before ',' token
    PhysPt where=base+offsetof(TSS_32,esp0)+level*8;
                                     ^
cpu.cpp:294:38: error: 'esp0' was not declared in this scope
    PhysPt where=base+offsetof(TSS_32,esp0)+level*8;
                                      ^
cpu.cpp:294:42: error: 'offsetof' was not declared in this scope
    PhysPt where=base+offsetof(TSS_32,esp0)+level*8;
                                          ^
cpu.cpp:298:37: error: expected primary-expression before ',' token
    PhysPt where=base+offsetof(TSS_16,sp0)+level*4;
                                     ^
cpu.cpp:298:38: error: 'sp0' was not declared in this scope
    PhysPt where=base+offsetof(TSS_16,sp0)+level*4;
                                      ^
cpu.cpp:298:41: error: 'offsetof' was not declared in this scope
    PhysPt where=base+offsetof(TSS_16,sp0)+level*4;
                                         ^
cpu.cpp: In function 'bool CPU_SwitchTask(Bitu, TSwitchType, Bitu)':
cpu.cpp:362:49: error: expected primary-expression before ',' token
   new_cr3=mem_readd(new_tss.base+offsetof(TSS_32,cr3));
                                                 ^
cpu.cpp:362:50: error: 'cr3' was not declared in this scope
   new_cr3=mem_readd(new_tss.base+offsetof(TSS_32,cr3));
                                                  ^
cpu.cpp:362:53: error: 'offsetof' was not declared in this scope
   new_cr3=mem_readd(new_tss.base+offsetof(TSS_32,cr3));
                                                     ^
cpu.cpp:363:49: error: expected primary-expression before ',' token
   new_eip=mem_readd(new_tss.base+offsetof(TSS_32,eip));
                                                 ^
cpu.cpp:363:50: error: 'eip' was not declared in this scope
   new_eip=mem_readd(new_tss.base+offsetof(TSS_32,eip));
                                                  ^
cpu.cpp:364:52: error: expected primary-expression before ',' token
   new_eflags=mem_readd(new_tss.base+offsetof(TSS_32,eflags));
                                                    ^
cpu.cpp:364:53: error: 'eflags' was not declared in this scope
   new_eflags=mem_readd(new_tss.base+offsetof(TSS_32,eflags));
                                                     ^
cpu.cpp:365:49: error: expected primary-expression before ',' token
   new_eax=mem_readd(new_tss.base+offsetof(TSS_32,eax));
                                                 ^
cpu.cpp:365:50: error: 'eax' was not declared in this scope
   new_eax=mem_readd(new_tss.base+offsetof(TSS_32,eax));
                                                  ^
cpu.cpp:366:49: error: expected primary-expression before ',' token
   new_ecx=mem_readd(new_tss.base+offsetof(TSS_32,ecx));
                                                 ^
cpu.cpp:366:50: error: 'ecx' was not declared in this scope
   new_ecx=mem_readd(new_tss.base+offsetof(TSS_32,ecx));
                                                  ^
cpu.cpp:367:49: error: expected primary-expression before ',' token
   new_edx=mem_readd(new_tss.base+offsetof(TSS_32,edx));
                                                 ^
cpu.cpp:367:50: error: 'edx' was not declared in this scope
   new_edx=mem_readd(new_tss.base+offsetof(TSS_32,edx));
                                                  ^
cpu.cpp:368:49: error: expected primary-expression before ',' token
   new_ebx=mem_readd(new_tss.base+offsetof(TSS_32,ebx));
                                                 ^
cpu.cpp:368:50: error: 'ebx' was not declared in this scope
   new_ebx=mem_readd(new_tss.base+offsetof(TSS_32,ebx));
                                                  ^
cpu.cpp:369:49: error: expected primary-expression before ',' token
   new_esp=mem_readd(new_tss.base+offsetof(TSS_32,esp));
                                                 ^
cpu.cpp:369:50: error: 'esp' was not declared in this scope
   new_esp=mem_readd(new_tss.base+offsetof(TSS_32,esp));
                                                  ^
cpu.cpp:370:49: error: expected primary-expression before ',' token
   new_ebp=mem_readd(new_tss.base+offsetof(TSS_32,ebp));
                                                 ^
cpu.cpp:370:50: error: 'ebp' was not declared in this scope
   new_ebp=mem_readd(new_tss.base+offsetof(TSS_32,ebp));
                                                  ^
cpu.cpp:371:49: error: expected primary-expression before ',' token
   new_edi=mem_readd(new_tss.base+offsetof(TSS_32,edi));
                                                 ^
cpu.cpp:371:50: error: 'edi' was not declared in this scope
   new_edi=mem_readd(new_tss.base+offsetof(TSS_32,edi));
                                                  ^
cpu.cpp:372:49: error: expected primary-expression before ',' token
   new_esi=mem_readd(new_tss.base+offsetof(TSS_32,esi));
                                                 ^
cpu.cpp:372:50: error: 'esi' was not declared in this scope
   new_esi=mem_readd(new_tss.base+offsetof(TSS_32,esi));
                                                  ^
cpu.cpp:374:48: error: expected primary-expression before ',' token
   new_es=mem_readw(new_tss.base+offsetof(TSS_32,es));
                                                ^
cpu.cpp:375:48: error: expected primary-expression before ',' token
   new_cs=mem_readw(new_tss.base+offsetof(TSS_32,cs));
                                                ^
cpu.cpp:376:48: error: expected primary-expression before ',' token
   new_ss=mem_readw(new_tss.base+offsetof(TSS_32,ss));
                                                ^
cpu.cpp:377:48: error: expected primary-expression before ',' token
   new_ds=mem_readw(new_tss.base+offsetof(TSS_32,ds));
                                                ^
cpu.cpp:378:48: error: expected primary-expression before ',' token
   new_fs=mem_readw(new_tss.base+offsetof(TSS_32,fs));
                                                ^
cpu.cpp:379:48: error: expected primary-expression before ',' token
   new_gs=mem_readw(new_tss.base+offsetof(TSS_32,gs));
                                                ^
cpu.cpp:380:49: error: expected primary-expression before ',' token
   new_ldt=mem_readw(new_tss.base+offsetof(TSS_32,ldt));
                                                 ^
cpu.cpp:380:50: error: 'ldt' was not declared in this scope
   new_ldt=mem_readw(new_tss.base+offsetof(TSS_32,ldt));
                                                  ^
cpu.cpp:403:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,eflags),old_flags);
                                          ^
cpu.cpp:403:43: error: 'eflags' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,eflags),old_flags);
                                           ^
cpu.cpp:403:49: error: 'offsetof' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,eflags),old_flags);
                                                 ^
cpu.cpp:404:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,eip),old_eip);
                                          ^
cpu.cpp:404:43: error: 'eip' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,eip),old_eip);
                                           ^
cpu.cpp:406:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,eax),reg_eax);
                                          ^
cpu.cpp:406:43: error: 'eax' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,eax),reg_eax);
                                           ^
cpu.cpp:407:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,ecx),reg_ecx);
                                          ^
cpu.cpp:407:43: error: 'ecx' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,ecx),reg_ecx);
                                           ^
cpu.cpp:408:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,edx),reg_edx);
                                          ^
cpu.cpp:408:43: error: 'edx' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,edx),reg_edx);
                                           ^
cpu.cpp:409:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,ebx),reg_ebx);
                                          ^
cpu.cpp:409:43: error: 'ebx' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,ebx),reg_ebx);
                                           ^
cpu.cpp:410:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,esp),reg_esp);
                                          ^
cpu.cpp:410:43: error: 'esp' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,esp),reg_esp);
                                           ^
cpu.cpp:411:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,ebp),reg_ebp);
                                          ^
cpu.cpp:411:43: error: 'ebp' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,ebp),reg_ebp);
                                           ^
cpu.cpp:412:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,esi),reg_esi);
                                          ^
cpu.cpp:412:43: error: 'esi' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,esi),reg_esi);
                                           ^
cpu.cpp:413:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,edi),reg_edi);
                                          ^
cpu.cpp:413:43: error: 'edi' was not declared in this scope
   mem_writed(cpu_tss.base+offsetof(TSS_32,edi),reg_edi);
                                           ^
cpu.cpp:415:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,es),SegValue(es));
                                          ^
cpu.cpp:416:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,cs),SegValue(cs));
                                          ^
cpu.cpp:417:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,ss),SegValue(ss));
                                          ^
cpu.cpp:418:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,ds),SegValue(ds));
                                          ^
cpu.cpp:419:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,fs),SegValue(fs));
                                          ^
cpu.cpp:420:42: error: expected primary-expression before ',' token
   mem_writed(cpu_tss.base+offsetof(TSS_32,gs),SegValue(gs));
                                          ^
cpu.cpp:428:43: error: expected primary-expression before ',' token
    mem_writed(new_tss.base+offsetof(TSS_32,back),cpu_tss.selector);
                                           ^
cpu.cpp:428:44: error: 'back' was not declared in this scope
    mem_writed(new_tss.base+offsetof(TSS_32,back),cpu_tss.selector);
                                            ^
cpu.cpp:428:48: error: 'offsetof' was not declared in this scope
    mem_writed(new_tss.base+offsetof(TSS_32,back),cpu_tss.selector);
                                                ^
cpu.cpp:430:43: error: expected primary-expression before ',' token
    mem_writew(new_tss.base+offsetof(TSS_16,back),cpu_tss.selector);
                                           ^
cpu.cpp:430:44: error: 'back' was not declared in this scope
    mem_writew(new_tss.base+offsetof(TSS_16,back),cpu_tss.selector);
                                            ^
cpu.cpp:430:48: error: 'offsetof' was not declared in this scope
    mem_writew(new_tss.base+offsetof(TSS_16,back),cpu_tss.selector);
                                                ^
*** Error code 1

Stop.
make[4]: stopped in /var/tmp/pkgsrc/emulators/dosbox/work/dosbox-0.74/src/cpu
[...]
>How-To-Repeat:
On a NetBSD/i386-current system built with/using gcc48 (amd64?  other arches?),
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/48681 (dosbox build fails with gcc48 on i386-6.99.38)
Date: Wed, 9 Apr 2014 20:38:29 -0500 (CDT)

 The same failure is seen on NetBSD/amd64-6.99.40.

 -- 
 |/"\ 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: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48681 CVS commit: pkgsrc/emulators/dosbox
Date: Thu, 17 Apr 2014 00:49:51 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Thu Apr 17 00:49:51 UTC 2014

 Modified Files:
 	pkgsrc/emulators/dosbox: Makefile distinfo
 Added Files:
 	pkgsrc/emulators/dosbox/patches: patch-include_dos__inc.h
 	    patch-src_gui_sdl__mapper.cpp

 Log Message:
 Add two patches from Fedora that fix the build with gcc-4.8.
 Bump PKGREVISION.
 Addresses PR 48681 by John D. Baker.


 To generate a diff of this commit:
 cvs rdiff -u -r1.38 -r1.39 pkgsrc/emulators/dosbox/Makefile
 cvs rdiff -u -r1.19 -r1.20 pkgsrc/emulators/dosbox/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/emulators/dosbox/patches/patch-include_dos__inc.h \
     pkgsrc/emulators/dosbox/patches/patch-src_gui_sdl__mapper.cpp

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

State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 17 Apr 2014 00:50:22 +0000
State-Changed-Why:
Fixed the problem on 6.99.40/amd64 with gcc-4.8.
Is it also fixed for you, and on i386?


From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48681 (dosbox build fails with gcc48 on i386-6.99.38)
Date: Thu, 17 Apr 2014 08:13:48 -0500 (CDT)

 On Thu, 17 Apr 2014, wiz@NetBSD.org wrote:

 > State-Changed-Why:
 > Fixed the problem on 6.99.40/amd64 with gcc-4.8.
 > Is it also fixed for you, and on i386?

 Yes.  It builds now on i386-6.99.40.  Thanks.

 -- 
 |/"\ 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: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 17 Apr 2014 13:23:55 +0000
State-Changed-Why:
Confirmed fixed, thanks.


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