You are not logged in.

#1 2013-03-01 15:11:22

wowka
Member
Registered: 2011-07-28
Posts: 2

Compiling 32-bit Dosbox in 64-bit Arch

I'm trying to compile Dosbox in my 64-bit arch installation. I want to compile it as 32-bit, because I need the dynamic fpu core, wich the 64-bit version of dosbox simply skips compiling...


so I downloaded the dosbox source code and applyed the small fixes for gcc > 4.6 and the minor fix for the configure script as it's done in the official arch-PKGBUILDs
I tested it with running configure && make and let it compile as 64-bit. it works. so make clean and try to compile as 32-bit...

I run the configure as following:

./configure LDFLAGS="-L/usr/lib32" --build=i686-pc-linux-gnu

it compiles fine before it gets to the dynamic fpu code and I get the following (+ many similar) error messages:

In file included from core_dyn_x86.cpp:168:0:
core_dyn_x86/cache.h: In function ‘void cache_init(bool)’:
core_dyn_x86/cache.h:514:30: error: cast from ‘Bit8u* {aka unsigned char*}’ to ‘int’ loses precision [-fpermissive]
core_dyn_x86/cache.h:514:90: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
In file included from core_dyn_x86.cpp:185:0:
core_dyn_x86/risc_x86.h: In member function ‘void GenReg::Load(DynReg*, bool)’:
core_dyn_x86/risc_x86.h:61:31: error: cast from ‘void*’ to ‘Bit32u {aka unsigned int}’ loses precision [-fpermissive]


has anyone compiled it successfully as 32-bit? any hints?


thanks in advance!

Offline

#2 2013-03-01 15:14:00

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 3,721

Re: Compiling 32-bit Dosbox in 64-bit Arch

gcc flag -m32
(and you really should use makepkg, just make a bin32-dosbox PKGBUILD)


Evil #archlinux@freenode channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB