VOGONS


First post, by Duffman

User metadata
Rank Member
Rank
Member

I'm trying to compile a 32-bit dosbox on 64-bit linux, but I'm having some trouble compiling

I did these steps

sudo dpkg --add-architecture i386

sudo ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu

export CFLAGS=-m32
export CXXFLAGS=-m32
export LDFLAGS=-m32

sudo make

it runs into an error here

core_dyn_x86/decoder.h: In function ‘CacheBlock* CreateCacheBlock(CodePageHandler*, PhysPt, Bitu)’:
core_dyn_x86/decoder.h:2009:59: error: cast from ‘CacheBlock*’ to ‘Bit32u {aka unsigned int}’ loses precision [-fpermissive]
gen_save_host_direct(&cache.block.running,(Bit32u)decode.block);
^

any help with this?

MB: ASRock B550 Steel Legend
CPU: Ryzen 9 5950X
RAM: Corsair 64GB Kit (4x16GB) DDR4 Veng LPX C18 4000MHz
SSDs: 2x Crucial MX500 1TB SATA + 1x Samsung 980 (non-pro) 1TB NVMe SSD
OSs: Win 11 Pro (NVMe) + WinXP Pro SP3 (SATA)
GPU: RTX2070 (11) GT730 (XP)

Reply 1 of 6, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

remove the sudo from configure and make

The error doesn't make sense, it are casts between 32 bit variables. It guess something still is still 64 bit on your system/compiler.

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 6, by Duffman

User metadata
Rank Member
Rank
Member

OK, i removed sudo - still got the same error,

so maybe I should i try and use a 32-bit version of make then?

MB: ASRock B550 Steel Legend
CPU: Ryzen 9 5950X
RAM: Corsair 64GB Kit (4x16GB) DDR4 Veng LPX C18 4000MHz
SSDs: 2x Crucial MX500 1TB SATA + 1x Samsung 980 (non-pro) 1TB NVMe SSD
OSs: Win 11 Pro (NVMe) + WinXP Pro SP3 (SATA)
GPU: RTX2070 (11) GT730 (XP)

Reply 4 of 6, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Dpkg is now configured to allow multi arch, but you still have to install all your 32 bit dependencies. Try something like

sudo apt-get -a i386 build-dep dosbox

Dosbox from git may benefit from additional dependencies over and above 0.74.

All hail the Great Capacitor Brand Finder

Reply 5 of 6, by Duffman

User metadata
Rank Member
Rank
Member

I conceded defeat and ended up compiling it in a 32-bit linux environment to have it compile without error,

but at the moment, if i want to run it under 64-bit linux I have to bring all of it's dependencies in a folder and point to it,

can i get some help to compile dosbox 32-bit statically, so i don't have to carry all it's dependencies in a folder with it?

MB: ASRock B550 Steel Legend
CPU: Ryzen 9 5950X
RAM: Corsair 64GB Kit (4x16GB) DDR4 Veng LPX C18 4000MHz
SSDs: 2x Crucial MX500 1TB SATA + 1x Samsung 980 (non-pro) 1TB NVMe SSD
OSs: Win 11 Pro (NVMe) + WinXP Pro SP3 (SATA)
GPU: RTX2070 (11) GT730 (XP)