I have several issues being able to build IdaDOS and DOSBox on a fresh MSys2 installation when strictly following BUILD.md as I'm new to MSys2. There are some things which can be tricky for a beginner like me, which I bolded. I still can't compile DOSBox correctly eventually.
Sorry that I can't even teach Github to continue my list numbers when using code blocks.
Preparations
- Install MSys2 from http://msys2.github.io/ (msys2-i686-20160205.exe) and running it.
- Running
pacman -S mingw-w64-i686-toolchain (installing all members)
- Running
pacman -S mingw-w64-i686-SDL as I need to build DOSBox too later on.
- Copying my idasdk68 to
/d/idasdk68.
Compiling IdaDOS
- Download idados into
/d/idados.
- Since I use IDA 6.8, change two lines back to what was changed here: 8b0ef6a
- Editing
build_mingw.sh to use ../idasdk68 rather than ../idasdk69
- Starting MSys2 with the "MinGW-w64 Win32 Shell" shortcut in the MSys2 folder in the start menu.
- Switching to
/d/idados and executing ./build_mingw.sh.
- Getting the following error:
In file included from ../idasdk68/plugins/debugger/tcpip.h:4:0,
from dosbox_rstub.cpp:15:
../idasdk68/include/pro.h:735:84: error: conflicting declaration of C function 'int memicmp(const void*, const void*, size_t)'
idaman THREAD_SAFE int ida_export memicmp(const void *x, const void *y, size_t size);
- Thinking this is the issue actually described under the "DOSBox" compilation section in BUILD.md.
Thus, changing #ifdef __GNUC__ in pro.h to #if 0 so it looks like this:
#if 0
idaman THREAD_SAFE int ida_export memicmp(const void *x, const void *y, size_t size);
#endif
- Executing
./build_mingw.sh again. Getting the error:
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lida
collect2.exe: error: ld returned 1 exit status
- Also copying over
ida.wll into /d/idasdk68/bin/ida.dll as actually described under the "DOSBox" section in BUILD.md.
- Now, compiling the IdaDOS plugin works flawlessy.
- Copying
dosbox_rstub.plw to my IDA plugin directory.
- Copying
C:\msys32\mingw32\bin\libwinpthread-1.dll to my IDA installation directory.
The notes about __GNUC__ and ida.dll should probably go under the IdaDOS section already.
Compiling DOSBox
- Download DOSBox repository from https://github.com/wjp/dosbox into
/d/dosbox.
- Switching into that directory with MSys2.
- Running
.autogen-sh. Getting the following output:
Generating build information using aclocal, autoheader, automake and autoconf
This may take a while ...
./autogen.sh: line 8: aclocal: command not found
./autogen.sh: line 9: autoheader: command not found
./autogen.sh: line 10: automake: command not found
./autogen.sh: line 11: autoconf: command not found
Now you are ready to run ./configure.
You can also run ./configure --help for extra features to enable/disable.
- Trying to install the missing commands with
pacman -Su automake and pacman -Su autoconf.
- Re-running
./autogen-sh. Getting quite a few warnings about source files being in subdirectories (if required, I can upload the warnings). But no errors.
- Running
./configure --enable-debug=ida32 --with-ida-sdk=/d/idasdk68 --with-ida-plugin=/d/idados, no errors.
- Running
make. Noticing it's not installed. Installing it with pacman -Su make.
- Getting the following error:
In file included from debug.cpp:47:0:
debug_inc.h:22:20: fatal error: curses.h: No such file or directory
compilation terminated.
- Looking up how to get
curses.h, following the instructions found in http://www.dosbox.com/wiki/BuildingDOSBox under the "Enabling the debugger (You probably don't want this)" section (requiring to install tar too).
- Switching back to the DOSBox directory and re-running
make, now running without errors (build log on request).
- Copying
src/DOSBox.exe into my DOSBox 0.74 directory.
- Trying to start it, missing some DLLs, requiring me to copy over
libgcc_s_dw2-1.dll and libwinpthread-1.dll from C:\msys32\mingw32\bin as it is not in my PATH. Also having to copy over IDA.WLL from my IDA directory.
- Starting DOSBox again. Getting following error:
The procedure entry point _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13find_first_ofEPKcjj could not be located in the dynamic link library D:\Archive\Games\Emulators\DOSBox Debug\DOSBox.exe.
I'm out of ideas, I had a similar error yesterday about a missing symbol. What do I have to do to correctly compile DOSBox?
I have several issues being able to build IdaDOS and DOSBox on a fresh MSys2 installation when strictly following BUILD.md as I'm new to MSys2. There are some things which can be tricky for a beginner like me, which I bolded. I still can't compile DOSBox correctly eventually.
Sorry that I can't even teach Github to continue my list numbers when using code blocks.
Preparations
pacman -S mingw-w64-i686-toolchain(installing all members)pacman -S mingw-w64-i686-SDLas I need to build DOSBox too later on./d/idasdk68.Compiling IdaDOS
/d/idados.build_mingw.shto use../idasdk68rather than../idasdk69/d/idadosand executing./build_mingw.sh.Thus, changing
#ifdef __GNUC__inpro.hto#if 0so it looks like this:./build_mingw.shagain. Getting the error:ida.wllinto/d/idasdk68/bin/ida.dllas actually described under the "DOSBox" section in BUILD.md.dosbox_rstub.plwto my IDA plugin directory.C:\msys32\mingw32\bin\libwinpthread-1.dllto my IDA installation directory.The notes about
__GNUC__andida.dllshould probably go under the IdaDOS section already.Compiling DOSBox
/d/dosbox..autogen-sh. Getting the following output:pacman -Su automakeandpacman -Su autoconf../autogen-sh. Getting quite a few warnings about source files being in subdirectories (if required, I can upload the warnings). But no errors../configure --enable-debug=ida32 --with-ida-sdk=/d/idasdk68 --with-ida-plugin=/d/idados, no errors.make. Noticing it's not installed. Installing it withpacman -Su make.curses.h, following the instructions found in http://www.dosbox.com/wiki/BuildingDOSBox under the "Enabling the debugger (You probably don't want this)" section (requiring to installtartoo).make, now running without errors (build log on request).src/DOSBox.exeinto my DOSBox 0.74 directory.libgcc_s_dw2-1.dllandlibwinpthread-1.dllfromC:\msys32\mingw32\binas it is not in my PATH. Also having to copy overIDA.WLLfrom my IDA directory.I'm out of ideas, I had a similar error yesterday about a missing symbol. What do I have to do to correctly compile DOSBox?