dosbox megabuild setup.cpp error

General information and assistance with DOSBox.

dosbox megabuild setup.cpp error

Postby eurobob12 » 2010-6-06 @ 15:50

Trying to compile the megabuild on ubuntu 10.04. I get this when I try to compile:
setup.cpp: In member function ‘bool Value::set_hex(const std::string&)’:
setup.cpp:148: error: ‘INT_MIN’ was not declared in this scope
setup.cpp: In member function ‘bool Value::set_int(const std::string&)’:
setup.cpp:157: error: ‘INT_MIN’ was not declared in this scope
make[3]: *** [setup.o] Error 1
make[3]: Leaving directory `/usr/local/bobsoft/current/dosbox/src/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bobsoft/current/dosbox/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bobsoft/current/dosbox'
make: *** [all] Error 2

This is what the setup.cpp file looks like. Not sure what is wrong:

bool Value::set_hex(std::string const& in) {
istringstream input(in);
input.flags(ios::hex);
Bits result = INT_MIN;
input >> result;
if(result == INT_MIN) return false;
_hex = result;
return true;
}

bool Value::set_int(string const &in) {
istringstream input(in);
Bits result = INT_MIN;
input >> result;
if(result == INT_MIN) return false;
_int = result;
return true;
}
bool Value::set_double(string const &in) {
istringstream input(in);
double result = std::numeric_limits<double>::infinity();
input >> result;
if(result == std::numeric_limits<double>::infinity()) return false;
_double = result;
return true;
}

bool Value::set_bool(string const &in) {
istringstream input(in);
string result;
input >> result;
lowcase(result);
_bool = true; // TODO
if(!result.size()) return false;

if(result=="0" || result=="disabled" || result=="false" || result=="off") {
_bool = false;
} else if(result=="1" || result=="enabled" || result=="true" || result=="on") {
_bool = true;
} else return false;

return true;
eurobob12
Newbie
 
Posts: 8
Joined: 2010-1-24 @ 02:04

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2010-6-06 @ 16:39

#include <limits.h>
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby eurobob12 » 2010-6-06 @ 16:45

thank you sir! got farther than I have. I'm kind of new to linux and compiling from source
eurobob12
Newbie
 
Posts: 8
Joined: 2010-1-24 @ 02:04

Re: dosbox megabuild setup.cpp error

Postby eurobob12 » 2010-6-08 @ 12:55

Compiled and works like a dream.
eurobob12
Newbie
 
Posts: 8
Joined: 2010-1-24 @ 02:04

Re: dosbox megabuild setup.cpp error

Postby Irishtiger » 2011-3-08 @ 23:34

Hey, Hal, do you happen to have step by step for this? Thanks!
Irishtiger
Newbie
 
Posts: 3
Joined: 2010-11-15 @ 15:32

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-3-08 @ 23:39

Use MB6
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-29 @ 14:56

to h-a-l-9000:
Hi Hal, I tried to compile Megabuild 6: Source code (Linux line endings) downloaded from http://home.arcor.de/h-a-l-9000/ in ubuntu 11.10 but I have problem with SDL part of compiling...
do you have a precompiled deb package? or could you suggest me a way to proceed in compiling?
thanks a lot! :happy:
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-12-29 @ 15:57

What is the problem with SDL? Did you install the development packages of SDL etc.?

No, I don't have a package. Wouldn't even know how to create one.
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-29 @ 17:43

ok, sorry ... now I used synaptic to install libsdl-net1.2-dev and libsdl-sound1.2dev ...
then I did:
extract /home/user/Downloads/dosbox-mb6,
cd to /home/user/Downloads/dosbox-mb6
run ./autogen.sh (ok)
run ./configure (ok)
run make ... make results with errors --->
In file included from ../../include/programs.h:28:0,
from cpu.cpp:29:.....
cpu.cpp:305:37: error: expected primary-expression before ‘,’ token
cpu.cpp:305:38: error: ‘esp0’ was not declared in this scope
and many errors...
Am I forgetting something?
Thank you again
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-12-29 @ 18:08

Well MB6 is outdated compared to your build environment.

Add this line:

#include <stddef.h>

near the other includes of cpu.cpp at the top. It will probably also complain about dos.cpp and ems.cpp, so add the line there too.
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-29 @ 18:55

i did it also to the following cpp files:
dos_devices, dos_execute, dos-files, dos_ioctl, dos_memory, dos_misc, dos_classes, dos_programs, dos_tables, drives, drive_virtual, drive_local, drive_cache, drive_fat, dos_mscdex, dos_keyboard_layout, render, nullmodem, direct_lpt, file_lpt, sblaster, gus, mouse, xms, bios, bios_disk, bios_keyboard, messages, programs, setup, shell, shell_batc, shell_cmds, shell_misc and dosbox

but then I get this error...

g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/local/include/SDL -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT dosbox.o -MD -MP -MF .deps/dosbox.Tpo -c -o dosbox.o dosbox.cpp
mv -f .deps/dosbox.Tpo .deps/dosbox.Po
g++ -g -O2 -L/usr/local/lib -o dosbox dosbox.o cpu/libcpu.a debug/libdebug.a dos/libdos.a fpu/libfpu.a hardware/libhardware.a gui/libgui.a ints/libints.a misc/libmisc.a shell/libshell.a hardware/serialport/libserial.a hardware/parport/libparallel.a libs/gui_tk/libgui_tk.a libs/porttalk/libporttalk.a -lSDL_sound -lasound -lm -ldl -lpthread -L/usr/lib -lSDL -lpng -lz -lSDL_net -lX11 -lGL
cpu/libcpu.a(core_dynrec.o): In function `MakeCodePage':
/home/user/Downloads/dosbox-mb6/src/cpu/core_dynrec/decoder_basic.h:144: undefined reference to `PAGING_ForcePageInit(unsigned long)'
collect2: ld returned 1 exit status
make[3]: *** [dosbox] Error 1
make[3]: Leaving directory `/home/user/Downloads/dosbox-mb6/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/Downloads/dosbox-mb6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/Downloads/dosbox-mb6'
make: *** [all] Error 2

thank you again
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-12-29 @ 19:20

Hmm, you are compiling for 64-bit it seems.
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-29 @ 19:52

the cpu is 64bit core, but I can retry to compile after install ubuntu 32bit ... Do you think that could solve?
Thank you
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-12-29 @ 20:12

It's an oversight, I have never tried to compile MB6 for 64-bit.
Commenting out a part in decoder_basic.h should work:

Code: Select all
   if (handler->flags & PFLAG_NOCODE) {
   /*   if (PAGING_ForcePageInit(lin_addr)) {
         handler=get_tlb_readhandler(lin_addr);
         if (handler->flags & PFLAG_HASCODE) {
            cph=(CodePageHandlerDynRec *)handler;
            return false;
         }
      }*/
      if (handler->flags & PFLAG_NOCODE) {
         LOG_MSG("DYNREC:Can't run code in this page");
         cph=0;
         return false;
      }
   }
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-29 @ 21:57

it works!!! I can compile megabuild6 on linux 64bit!!! :happy:
thanks a lot!!! tomorrow I'm going to try the lpt support...
Thank you again :happy:
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-30 @ 15:41

my pci port is a netmos 9815cv and it is not interfaced on ubuntu 64bit at the moment...
so I recompiled megabuild6 on ubuntu 32bit ....
everything was fine and I did obtain the dosbox executable

I put in dosbox config file (dosbox-SVN.conf):

parallel1=reallpt realport:/dev/parport0
parallel2=reallpt realport:/dev/parport1

the result of the command lspci -v is:
04:00.0 Communication controller: NetMos Technology PCI 9815 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic 2P0S (2 port parallel adaptor)
Flags: medium devsel, IRQ 17
I/O ports at dc00 [size=8]
I/O ports at d880 [size=8]
I/O ports at d800 [size=8]
I/O ports at d480 [size=8]
I/O ports at d400 [size=8]
I/O ports at d080 [size=16]
Kernel driver in use: parport_pc
Kernel modules: parport_pc
and I did installed the drivers following instruction as in netmos site using:
/sbin/modprobe parport_pc io=0x3f8,a400 irq=4,18

but unfortunately still I do not have direct communication with parallel port...
Am I missing something in config the dosbox?
thank you again...
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-12-30 @ 16:21

Is this config file actually being used?
What does the console output say when starting?
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-30 @ 16:38

Parallel1: BASE 378h
parallel1: Could not open port /dev/parport0.
You are not allowed to access this port.
Parallel2: BASE 278h
parallel2: Could not open port /dev/parport1.
You are not allowed to access this port.

then I tried with sudo dosbox and it WORKS!!!
thank you a looottt!!! :)
I can reach the dongle connected to parallel port in a pass-through mode through a pciexpress moschip card!!!
yeahhh :)
:happy:
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby easyw3 » 2011-12-30 @ 19:24

sorry to bug you again...
the parallel port works just once at the first time when the dosbox is opened... next call inside the box fails to contact the dongle...
what could it be?
thank you again...
easyw3
Newbie
 
Posts: 32
Joined: 2011-12-24 @ 22:49

Re: dosbox megabuild setup.cpp error

Postby h-a-l-9000 » 2011-12-30 @ 20:13

Does it help if you reconnect the dongle?
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Next

Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 0 guests