First post, by xjas
- Rank
- l33t
I'm trying to compile DOSBox 0.74 with this patch applied (the final update posted on page 3.) I'm using the version of the source straight off dosbox.com/downloads. I get a ton of errors, mostly in cpu.cpp, but also dos_inc.h. Neither of those files are altered by the patch BTW.
makemake all-recursivemake[1]: Entering directory '/home/jay/Downloads/dosbox-0.74'Making all in srcmake[2]: Entering directory '/home/jay/Downloads/dosbox-0.74/src'Making all in cpumake[3]: Entering directory '/home/jay/Downloads/dosbox-0.74/src/cpu'Making all in core_fullmake[4]: Entering directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_full'make[4]: Nothing to be done for 'all'.make[4]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_full'Making all in core_normalmake[4]: Entering directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_normal'make[4]: Nothing to be done for 'all'.make[4]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_normal'Making all in core_dyn_x86make[4]: Entering directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_dyn_x86'make[4]: Nothing to be done for 'all'.make[4]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_dyn_x86'Making all in core_dynrecmake[4]: Entering directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_dynrec'make[4]: Nothing to be done for 'all'.make[4]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src/cpu/core_dynrec'make[4]: Entering directory '/home/jay/Downloads/dosbox-0.74/src/cpu'g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo -c -o callback.o callback.cppcallback.cpp: In function ‘Bitu CALLBACK_SetupExtra(Bitu, Bitu, PhysPt, bool)’:callback.cpp:435:47: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("CALLBACK:Setup:Illegal type %d",type);^mv -f .deps/callback.Tpo .deps/callback.Pog++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT cpu.o -MD -MP -MF .deps/cpu.Tpo -c -o cpu.o cpu.cppIn 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 ‘,’ tokenvoid 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 scopevoid 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 scopevoid 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 ‘,’ tokenvoid 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 scopevoid 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 scopevoid 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 ‘,’ tokenPhysPt where=base+offsetof(TSS_32,esp0)+level*8;^cpu.cpp:294:38: error: ‘esp0’ was not declared in this scopePhysPt where=base+offsetof(TSS_32,esp0)+level*8;^
cpu.cpp:294:42: error: ‘offsetof’ was not declared in this scopePhysPt where=base+offsetof(TSS_32,esp0)+level*8;^cpu.cpp:298:37: error: expected primary-expression before ‘,’ tokenPhysPt where=base+offsetof(TSS_16,sp0)+level*4;^cpu.cpp:298:38: error: ‘sp0’ was not declared in this scopePhysPt where=base+offsetof(TSS_16,sp0)+level*4;^cpu.cpp:298:41: error: ‘offsetof’ was not declared in this scopePhysPt where=base+offsetof(TSS_16,sp0)+level*4;^cpu.cpp: In function ‘bool CPU_SwitchTask(Bitu, TSwitchType, Bitu)’:cpu.cpp:348:86: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("Illegal TSS for switch, selector=%x, switchtype=%x",new_tss_selector,tstype);^cpu.cpp:362:49: error: expected primary-expression before ‘,’ tokennew_cr3=mem_readd(new_tss.base+offsetof(TSS_32,cr3));^cpu.cpp:362:50: error: ‘cr3’ was not declared in this scopenew_cr3=mem_readd(new_tss.base+offsetof(TSS_32,cr3));^cpu.cpp:362:53: error: ‘offsetof’ was not declared in this scopenew_cr3=mem_readd(new_tss.base+offsetof(TSS_32,cr3));^cpu.cpp:363:49: error: expected primary-expression before ‘,’ tokennew_eip=mem_readd(new_tss.base+offsetof(TSS_32,eip));^cpu.cpp:363:50: error: ‘eip’ was not declared in this scopenew_eip=mem_readd(new_tss.base+offsetof(TSS_32,eip));^cpu.cpp:364:52: error: expected primary-expression before ‘,’ tokennew_eflags=mem_readd(new_tss.base+offsetof(TSS_32,eflags));^cpu.cpp:364:53: error: ‘eflags’ was not declared in this scopenew_eflags=mem_readd(new_tss.base+offsetof(TSS_32,eflags));^cpu.cpp:365:49: error: expected primary-expression before ‘,’ tokennew_eax=mem_readd(new_tss.base+offsetof(TSS_32,eax));^cpu.cpp:365:50: error: ‘eax’ was not declared in this scopenew_eax=mem_readd(new_tss.base+offsetof(TSS_32,eax));^cpu.cpp:366:49: error: expected primary-expression before ‘,’ tokennew_ecx=mem_readd(new_tss.base+offsetof(TSS_32,ecx));^cpu.cpp:366:50: error: ‘ecx’ was not declared in this scopenew_ecx=mem_readd(new_tss.base+offsetof(TSS_32,ecx));^cpu.cpp:367:49: error: expected primary-expression before ‘,’ tokennew_edx=mem_readd(new_tss.base+offsetof(TSS_32,edx));^cpu.cpp:367:50: error: ‘edx’ was not declared in this scopenew_edx=mem_readd(new_tss.base+offsetof(TSS_32,edx));^cpu.cpp:368:49: error: expected primary-expression before ‘,’ tokennew_ebx=mem_readd(new_tss.base+offsetof(TSS_32,ebx));^cpu.cpp:368:50: error: ‘ebx’ was not declared in this scopenew_ebx=mem_readd(new_tss.base+offsetof(TSS_32,ebx));^cpu.cpp:369:49: error: expected primary-expression before ‘,’ tokennew_esp=mem_readd(new_tss.base+offsetof(TSS_32,esp));^cpu.cpp:369:50: error: ‘esp’ was not declared in this scopenew_esp=mem_readd(new_tss.base+offsetof(TSS_32,esp));^cpu.cpp:370:49: error: expected primary-expression before ‘,’ tokennew_ebp=mem_readd(new_tss.base+offsetof(TSS_32,ebp));^cpu.cpp:370:50: error: ‘ebp’ was not declared in this scopenew_ebp=mem_readd(new_tss.base+offsetof(TSS_32,ebp));^cpu.cpp:371:49: error: expected primary-expression before ‘,’ tokennew_edi=mem_readd(new_tss.base+offsetof(TSS_32,edi));^cpu.cpp:371:50: error: ‘edi’ was not declared in this scopenew_edi=mem_readd(new_tss.base+offsetof(TSS_32,edi));^cpu.cpp:372:49: error: expected primary-expression before ‘,’ tokennew_esi=mem_readd(new_tss.base+offsetof(TSS_32,esi));^cpu.cpp:372:50: error: ‘esi’ was not declared in this scopenew_esi=mem_readd(new_tss.base+offsetof(TSS_32,esi));^cpu.cpp:374:48: error: expected primary-expression before ‘,’ tokennew_es=mem_readw(new_tss.base+offsetof(TSS_32,es));^cpu.cpp:375:48: error: expected primary-expression before ‘,’ tokennew_cs=mem_readw(new_tss.base+offsetof(TSS_32,cs));^cpu.cpp:376:48: error: expected primary-expression before ‘,’ tokennew_ss=mem_readw(new_tss.base+offsetof(TSS_32,ss));^cpu.cpp:377:48: error: expected primary-expression before ‘,’ tokennew_ds=mem_readw(new_tss.base+offsetof(TSS_32,ds));^cpu.cpp:378:48: error: expected primary-expression before ‘,’ tokennew_fs=mem_readw(new_tss.base+offsetof(TSS_32,fs));^cpu.cpp:379:48: error: expected primary-expression before ‘,’ tokennew_gs=mem_readw(new_tss.base+offsetof(TSS_32,gs));^cpu.cpp:380:49: error: expected primary-expression before ‘,’ tokennew_ldt=mem_readw(new_tss.base+offsetof(TSS_32,ldt));^cpu.cpp:380:50: error: ‘ldt’ was not declared in this scopenew_ldt=mem_readw(new_tss.base+offsetof(TSS_32,ldt));^cpu.cpp:403:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,eflags),old_flags);^cpu.cpp:403:43: error: ‘eflags’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,eflags),old_flags);^cpu.cpp:403:49: error: ‘offsetof’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,eflags),old_flags);^cpu.cpp:404:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,eip),old_eip);^cpu.cpp:404:43: error: ‘eip’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,eip),old_eip);^cpu.cpp:406:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,eax),reg_eax);^cpu.cpp:406:43: error: ‘eax’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,eax),reg_eax);^cpu.cpp:407:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,ecx),reg_ecx);^cpu.cpp:407:43: error: ‘ecx’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,ecx),reg_ecx);^cpu.cpp:408:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,edx),reg_edx);^cpu.cpp:408:43: error: ‘edx’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,edx),reg_edx);^cpu.cpp:409:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,ebx),reg_ebx);^cpu.cpp:409:43: error: ‘ebx’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,ebx),reg_ebx);^cpu.cpp:410:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,esp),reg_esp);^cpu.cpp:410:43: error: ‘esp’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,esp),reg_esp);^cpu.cpp:411:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,ebp),reg_ebp);^cpu.cpp:411:43: error: ‘ebp’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,ebp),reg_ebp);^cpu.cpp:412:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,esi),reg_esi);^cpu.cpp:412:43: error: ‘esi’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,esi),reg_esi);^cpu.cpp:413:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,edi),reg_edi);^cpu.cpp:413:43: error: ‘edi’ was not declared in this scopemem_writed(cpu_tss.base+offsetof(TSS_32,edi),reg_edi);^cpu.cpp:415:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,es),SegValue(es));^cpu.cpp:416:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,cs),SegValue(cs));^cpu.cpp:417:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,ss),SegValue(ss));^cpu.cpp:418:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,ds),SegValue(ds));^cpu.cpp:419:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,fs),SegValue(fs));^cpu.cpp:420:42: error: expected primary-expression before ‘,’ tokenmem_writed(cpu_tss.base+offsetof(TSS_32,gs),SegValue(gs));^cpu.cpp:428:43: error: expected primary-expression before ‘,’ tokenmem_writed(new_tss.base+offsetof(TSS_32,back),cpu_tss.selector);^cpu.cpp:428:44: error: ‘back’ was not declared in this scopemem_writed(new_tss.base+offsetof(TSS_32,back),cpu_tss.selector);^cpu.cpp:428:48: error: ‘offsetof’ was not declared in this scopemem_writed(new_tss.base+offsetof(TSS_32,back),cpu_tss.selector);^cpu.cpp:430:43: error: expected primary-expression before ‘,’ tokenmem_writew(new_tss.base+offsetof(TSS_16,back),cpu_tss.selector);^cpu.cpp:430:44: error: ‘back’ was not declared in this scopemem_writew(new_tss.base+offsetof(TSS_16,back),cpu_tss.selector);^cpu.cpp:430:48: error: ‘offsetof’ was not declared in this scopemem_writew(new_tss.base+offsetof(TSS_16,back),cpu_tss.selector);^cpu.cpp:502:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("Task switch CS Type %d",cs_desc.Type());^cpu.cpp: In function ‘void CPU_Interrupt(Bitu, Bitu, Bitu)’:cpu.cpp:724:89: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("INT:Gate Selector points to illegal descriptor with type %x",cs_desc.Type());^cpu.cpp:754:66: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("Illegal descriptor type %X for int %X",gate.Type(),num);^cpu.cpp:754:66: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]cpu.cpp: In function ‘void CPU_IRET(bool, Bitu)’:cpu.cpp:901:61: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("IRET:Illegal descriptor type %X",n_cs_desc.Type());^cpu.cpp: In function ‘void CPU_JMP(bool, Bitu, Bitu, Bitu)’:cpu.cpp:1058:55: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("JMP Illegal descriptor type %X",desc.Type());^cpu.cpp: In function ‘void CPU_CALL(bool, Bitu, Bitu, Bitu)’:cpu.cpp:1294:60: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("CALL:Descriptor type %x unsupported",call.Type());^cpu.cpp: In function ‘void CPU_RET(bool, Bitu, Bitu)’:cpu.cpp:1352:61: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("RET from illegal descriptor type %X",desc.Type());^cpu.cpp:1397:61: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]E_Exit("RET from illegal descriptor type %X",desc.Type()); // or #GP(selector)^cpu.cpp: In function ‘bool CPU_LTR(Bitu)’:cpu.cpp:1508:80: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]if (!cpu_tss.SetSelector(selector)) E_Exit("LTR failed, selector=%X",selector);^Makefile:288: recipe for target 'cpu.o' failedmake[4]: *** [cpu.o] Error 1make[4]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src/cpu'Makefile:308: recipe for target 'all-recursive' failedmake[3]: *** [all-recursive] Error 1make[3]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src/cpu'Makefile:328: recipe for target 'all-recursive' failedmake[2]: *** [all-recursive] Error 1make[2]: Leaving directory '/home/jay/Downloads/dosbox-0.74/src'Makefile:277: recipe for target 'all-recursive' failedmake[1]: *** [all-recursive] Error 1make[1]: Leaving directory '/home/jay/Downloads/dosbox-0.74'Makefile:215: recipe for target 'all' failedmake: *** [all] Error 2
I tried this on two different machines, one running Fedora 21 and the other running Mint 18.2 & got the same errors. I have successfully compiled SVN versions multiple times on the same two machines; nothing has been changed in my environment.
What do I need to do to get 0.74 to compile?
(Alternately, can I apply the pinball patch to the latest SVN without alterations?)
twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!