VOGONS

Common searches


dosbox megabuild setup.cpp error

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by eurobob12

User metadata
Rank Newbie
Rank
Newbie

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;

Reply 6 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

to h-a-l-9000:
Hi Hal, I tried to compile Megabuild 6: Source code (Linux line endings) downloaded from 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! 😀

Reply 8 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

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

Reply 10 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

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

Reply 13 of 60, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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

	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

Reply 15 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

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
I/O ports at d880
I/O ports at d800
I/O ports at d480
I/O ports at d400
I/O ports at d080
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...

Reply 17 of 60, by easyw3

User metadata
Rank Newbie
Rank
Newbie

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