(SOLVED) DosBox-X: How to compile

Post Reply
rinxo
Posts: 4
Joined: Sat Jul 06, 2019 2:47 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

(SOLVED) DosBox-X: How to compile

Post by rinxo »

I would like to build/compile DosBox-X, its performance and compatibility for Win3x applications are better. I know it is possible for Raspberry. I tried to do it for the N2 but it has been unsuccessful. Any suggestion?
Last edited by rinxo on Fri Mar 12, 2021 11:47 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: DosBox-X: How to compile

Post by odroid »

Does it need a GPU acceleration via SDL2?

User avatar
meveric
Posts: 11512
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox-X: How to compile

Post by meveric »

odroid wrote:
Thu Mar 11, 2021 10:16 am
Does it need a GPU acceleration via SDL2?
If I remember correctly it does use SDL2 and tries to use hardware acceleration. So depending on how your SDL2 is configured, it may not work on the N2 at all due to lack of X11 support which is normally the default for SDL2 as well as OpenGL over OpenGL ES.
rinxo wrote:
Wed Mar 10, 2021 8:32 pm
I would like to build/compile DosBox-X, its performance and compatibility for Win3x applications are better. I know it is possible for Raspberry. I tried to do it for the N2 but it has been unsuccessful. Any suggestion?
Win3x runs on any DOSBox version it has barely any requirements, performance wise DOSBox-X is much slower than most other DOSBox emulators.
The main consent is that DOSBox-X is focusing more on feature completeness than performance:
https://www.reddit.com/r/emulation/comm ... e_testing/

in my tests on the ODROID GO2, DOSBox-X was also much slower than other DOSBox emulator variants.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

rinxo
Posts: 4
Joined: Sat Jul 06, 2019 2:47 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: DosBox-X: How to compile

Post by rinxo »

I did the following, I installed panfrost driver in the last Ubuntu 20.10, and then I have executed:

./autogen.sh
./configure --build="aarch64" --host="aarch64" --enable-core-inline --enable-dynrec --enable-unaligned_memory --disable-sdl --enable-sdl2 --enable-force-cxx11
make

The final result is:

g++ -g -std=gnu++11 -O2 -Wall -Wextra -Wunused -pedantic -Wlogical-op -Wsign-promo -Wconversion-null -Wno-deprecated-declarations -Wno-implicit-fallthrough -Wno-strict-aliasing -Wno-missing-field-initializers -Wno-format-zero-length -Wno-address-of-packed-member -Wno-int-to-void-pointer-cast -I/home/rinxo/dosbox-x -I/home/rinxo/dosbox-x/vs2015/sdlnet/linux-host/include -I/home/rinxo/dosbox-x/vs2015/sdlnet/linux-host/include/SDL -L/home/rinxo/dosbox-x/vs2015/sdlnet/linux-host/lib -o dosbox-x dosbox.o debug/libdebug.a dos/libdos.a shell/libshell.a builtin/libbuiltin.a ints/libints.a misc/libmisc.a hardware/serialport/libserial.a hardware/parport/libparallel.a libs/porttalk/libporttalk.a gui/libgui.a libs/gui_tk/libgui_tk.a hardware/libhardware.a cpu/libcpu.a hardware/reSID/libresid.a fpu/libfpu.a gui/libgui.a output/liboutput.a hardware/mame/libmame.a libs/zmbv/libzmbv.a libs/decoders/internal/libopusint.a aviwriter/libaviwriter.a libs/xBRZ/libxbrz.a libs/fluidsynth/libfluidsynth.a -lasound -lm -ldl -lpthread -lSDL2 -ltinfo -lfreetype -lSDL2_net -lz -lpng -lz -lpcap -lX11 -lXrandr -lxkbfile -lfluidsynth -lavcodec -lavformat -lavutil -lswscale -lavcodec -lGL
/usr/bin/ld: hardware/libhardware.a(opl2board.o): in function `OPL2AudioBoard::connect(char const*)':
/home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:12: undefined reference to `SERIAL_open(char const*, _COMPORT**)'
/usr/bin/ld: /home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:13: undefined reference to `SERIAL_setCommParameters(_COMPORT*, int, char, int, int)'
/usr/bin/ld: hardware/libhardware.a(opl2board.o): in function `OPL2AudioBoard::disconnect()':
/home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:26: undefined reference to `SERIAL_close(_COMPORT*)'
/usr/bin/ld: hardware/libhardware.a(opl2board.o): in function `OPL2AudioBoard::write(unsigned char, unsigned char)':
/home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:51: undefined reference to `SERIAL_sendchar(_COMPORT*, char)'
/usr/bin/ld: /home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:52: undefined reference to `SERIAL_sendchar(_COMPORT*, char)'
/usr/bin/ld: /home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:51: undefined reference to `SERIAL_sendchar(_COMPORT*, char)'
/usr/bin/ld: /home/rinxo/dosbox-x/src/hardware/opl2board/opl2board.cpp:52: undefined reference to `SERIAL_sendchar(_COMPORT*, char)'
/usr/bin/ld: hardware/libhardware.a(opl3duoboard.o): in function `Opl3DuoBoard::writeBuffer()':
/home/rinxo/dosbox-x/src/hardware/opl3duoboard/opl3duoboard.cpp:106: undefined reference to `SERIAL_sendchar(_COMPORT*, char)'
/usr/bin/ld: hardware/libhardware.a(opl3duoboard.o): in function `Opl3DuoBoard::connect(char const*)':
/home/rinxo/dosbox-x/src/hardware/opl3duoboard/opl3duoboard.cpp:13: undefined reference to `SERIAL_open(char const*, _COMPORT**)'
/usr/bin/ld: /home/rinxo/dosbox-x/src/hardware/opl3duoboard/opl3duoboard.cpp:14: undefined reference to `SERIAL_setCommParameters(_COMPORT*, int, char, int, int)'
/usr/bin/ld: hardware/libhardware.a(opl3duoboard.o): in function `Opl3DuoBoard::disconnect()':
/home/rinxo/dosbox-x/src/hardware/opl3duoboard/opl3duoboard.cpp:45: undefined reference to `SERIAL_close(_COMPORT*)'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:469: dosbox-x] Error 1
make[3]: Leaving directory '/home/rinxo/dosbox-x/src'
make[2]: *** [Makefile:529: all-recursive] Error 1
make[2]: Leaving directory '/home/rinxo/dosbox-x/src'
make[1]: *** [Makefile:400: all-recursive] Error 1
make[1]: Leaving directory '/home/rinxo/dosbox-x'
make: *** [Makefile:333: all] Error 2

Any suggestion? Thanks in advance...

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: DosBox-X: How to compile

Post by odroid »

Could you run 'glmark2' or 'glmark2-es2' GPU test program on Ubuntu 20.10 Gnome desktop?
As far as I've seen from @tobetter's 20.10 tests, many x11 desktop application worked fine with the Panfrost OpenGL3 GPU driver.

Anyway, your compiling error seems to be caused by a missing Serial communication library dependency.

rinxo
Posts: 4
Joined: Sat Jul 06, 2019 2:47 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: DosBox-X: How to compile

Post by rinxo »

Both 'glmak2' and 'glmark2-es2' are working in my system. No error at all in gnome desktop or KDE.

User avatar
meveric
Posts: 11512
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox-X: How to compile

Post by meveric »

it's complaining about missing references.. this normally means that it forgot to link against a library.
The build system seems pretty messed up.
Check the config.h and you'll see it will say that LINUX is undefined.
But it needs to be defined for the functions you're missing above.
If you check src/hardware/serialport/libserial.cpp you'll find it has to paths, one for WIN32 and one for LINUX, etc. both defines the functions you're missing.
Since LINUX is not defined, it doesn't seem to take any of it.
Still even with LINUX 1 enabled it doesn't seem to do anything.
I'm currently fixing config.guess to add aarch64 as this is missing there, see if that helps with the LINUX issue.
These users thanked the author meveric for the post:
odroid (Fri Mar 12, 2021 5:23 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
meveric
Posts: 11512
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 67 times
Been thanked: 471 times
Contact:

Re: DosBox-X: How to compile

Post by meveric »

yep that's all that was needed:

Code: Select all

diff --git a/config.guess b/config.guess
index cfda93ae8..3045a4b2b 100755
--- a/config.guess
+++ b/config.guess
@@ -175,6 +175,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case "${UNAME_MACHINE_ARCH}" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
+            aarch64) machine=aarch64-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
@@ -949,6 +950,9 @@ EOF
            fi
        fi
        exit ;;
+    aarch64:LINUX:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+        exit ;;
     avr32*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
after that you can configure it with:

Code: Select all

./configure --enable-core-inline --enable-dynrec --enable-unaligned_memory --disable-sdl --enable-sdl2 --enable-force-cxx11
and it compiles just fine.
These users thanked the author meveric for the post:
odroid (Mon Mar 15, 2021 10:37 am)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

rinxo
Posts: 4
Joined: Sat Jul 06, 2019 2:47 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Post by rinxo »

It worked.
Thanks a lot.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest