Hi @yksoft1 - I posted some info here on this joncampbell123/dosbox-x#882 - but wanted to post on your fork as I'm testing both with no success. My goal is to have an emscripten dosbox build with mt32 support.
FWIW - I'm able to build em-dosbox just fine. However - it does not have the MT-32 support that I'm looking for ;) I'd love to be able to use my Boxer installs 1:1 with either MT-32, GUS, or Adlib setup. Right now em-dosbox only provides GUS and Adlib (also some sounds are kinda strange .... shall we say "off-sounding". Not huge deal, but it would be cool if dosbox-x didn't experience that issue.
➜ dosbox-x-vanilla-sdl git:(emscripten) ✗ cat build-emscripten-sdl2
#!/bin/bash
# make sure you use ". ./emsdk_set_env.sh"
# I'm sick and tired of all the churn the three versions of autoconf
# are causing in this repo. Stop committing the configure scripts
# and just autoregen.
./autogen.sh || exit 1
echo Compiling DOSBox-X
chmod +x configure
# for sdl2-config and sdl-config
export PATH=/root/emsdk/emscripten/1.38.27/system/bin:$PATH
# build command borrowed from Yksoft1 vanilla DOSBox-X port with modifications
CC="emcc" CXX="em++" LD="emcc" LD_CXX="em++" CFLAGS="-DEMTERPRETER_SYNC" CXXFLAGS="-DEMSCRIPTEN=1 -DEMTERPRETER_SYNC" ./configure --host=x86_64-linux --disable-dynamic-x86 --enable-sdl2 --with-sdl-prefix=/root/emsdk/emscripten/1.38.27/system --disable-opengl --enable-force-menu-sdldraw "$@"
make -j3 || exit 1
#emcc -O1 -s USE_SDL=2 -s TOTAL_MEMORY=104857600 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s [email protected] dosbox-x.bc --memory-init-file 0 -o th5e.html --preload-file d:/tmpp/th5x@/
^^ I've tried with --disable-mt32 and without (ideally this is mandatory for me else I'm wasting my time..)
I have tried with the default sdl2-config file, and I've also had success (I think it was the scummvm-emscripten github that suggested copying your system sdl2-config and modifying the path):
➜ dosbox-x-vanilla-sdl git:(emscripten) ✗ cat /root/emsdk/emscripten/1.38.27/system/bin/sdl2-config
#!/bin/sh
prefix=/root/emsdk/emscripten/1.38.27/system
exec_prefix=${prefix}
exec_prefix_set=no
libdir=${prefix}/lib/x86_64-linux-gnu
#usage="\
#Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
usage="\
Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo 2.0.4
;;
--cflags)
echo -I${prefix}/include/SDL2 -D_REENTRANT
;;
--libs)
echo -L${prefix}/lib/x86_64-linux-gnu -lSDL2
;;
--static-libs)
# --libs|--static-libs)
echo -L${prefix}/lib/x86_64-linux-gnu -lSDL2 -Wl,--no-undefined -lm -ldl -lasound -lm -ldl -lpthread -lpulse-simple -lpulse -lsndio -lX11 -lXext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lwayland-egl -lwayland-client -lwayland-cursor -lxkbcommon -lpthread -lrt
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
Paths that I can find that have SDL stuff...
/root/.emscripten_ports/sdl2/SDL2-version_17/include/SDL.h
/root/SDL-emscripten/include/SDL.h
/root/emscripten/system/include/SDL/SDL.h
/root/emsdk/emscripten/1.38.27/system/include/SDL/SDL.h
/usr/share/emscripten/system/include/SDL/SDL.h
emsdk environment variables:
➜ emsdk git:(master) ✗ cat emsdk_set_env.sh
export PATH="/root/emsdk:/root/emsdk/clang/e1.38.27_64bit:/root/emsdk/node/8.9.1_64bit/bin:/root/emsdk/emscripten/1.38.27:/usr/include/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/src/linux-headers-4.15.0-45/"
export EMSDK="/root/emsdk"
export LLVM_ROOT="/root/emsdk/clang/e1.38.27_64bit"
export EMSCRIPTEN_NATIVE_OPTIMIZER="/root/emsdk/clang/e1.38.27_64bit/optimizer"
export BINARYEN_ROOT="/root/emsdk/clang/e1.38.27_64bit/binaryen"
export EMSDK_NODE="/root/emsdk/node/8.9.1_64bit/bin/node"
export EMSCRIPTEN="/root/emsdk/emscripten/1.38.27"
OS:
Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I've installed using emsdk following the instructions on the emscripten website.
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
I've been trying for weeks at this point...any help is super-duper appreciated 😅