Compiling IBMulator for Windows...

edited January 2017 in Software
While IBMulator 0.8 is restricted to the 80286-based IBM PS/1 Model 2011, the latest source code on the other hand recently added support for the 80386-based IBM PS/1 Model 2121. For this reason entirely, I'm trying to compile IBMulator for Windows, however, I have found a serious problem here.

The problem here is that the program specifically requires a special version of libRocket (downloaded from the IBMulator repository), following all of the instructions in the files that the author provided. However, the compile process for libRocket fails completely with the following errors:
C:\MinGW\libRocket\Build>mingw32-make
Scanning dependencies of target RocketCore
[  1%] Building CXX object CMakeFiles/RocketCore.dir/C_/MinGW/libRocket/Source/Core/BaseXMLParser.cpp.obj
In file included from c:\mingw\librocket\include\rocket\core\core.h:31:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\Types.h:84:9: error: 'uintptr_t' does not name a type
 typedef uintptr_t FileHandle;
         ^
c:\mingw\librocket\include\rocket\core\Types.h:85:9: error: 'uintptr_t' does not name a type
 typedef uintptr_t TextureHandle;
         ^
c:\mingw\librocket\include\rocket\core\Types.h:86:9: error: 'uintptr_t' does not name a type
 typedef uintptr_t CompiledGeometryHandle;
         ^
c:\mingw\librocket\include\rocket\core\Types.h:87:9: error: 'uintptr_t' does not name a type
 typedef uintptr_t DecoratorDataHandle;
         ^
In file included from c:\mingw\librocket\include\rocket\core\Decorator.h:34:0,
                 from c:\mingw\librocket\include\rocket\core\core.h:37,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\Texture.h:67:2: error: 'TextureHandle' does not name a type
  TextureHandle GetHandle(RenderInterface* render_interface) const;
  ^
In file included from c:\mingw\librocket\include\rocket\core\core.h:37:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\Decorator.h:62:10: error: 'DecoratorDataHandle' does not name a type
  virtual DecoratorDataHandle GenerateElementData(Element* element) = 0;
          ^
c:\mingw\librocket\include\rocket\core\Decorator.h:65:34: error: 'DecoratorDataHandle' has not been declared
  virtual void ReleaseElementData(DecoratorDataHandle element_data) = 0;
                                  ^
c:\mingw\librocket\include\rocket\core\Decorator.h:86:47: error: 'DecoratorDataHandle' has not been declared
  virtual void RenderElement(Element* element, DecoratorDataHandle element_data) = 0;
                                               ^
c:\mingw\librocket\include\rocket\core\Decorator.h:89:15: error: 'DecoratorDataHandle' does not name a type
  static const DecoratorDataHandle INVALID_DECORATORDATAHANDLE = 0;
               ^
In file included from c:\mingw\librocket\include\rocket\core\PropertySpecification.h:32:0,
                 from c:\mingw\librocket\include\rocket\core\DecoratorInstancer.h:34,
                 from c:\mingw\librocket\include\rocket\core\core.h:38,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\Element.h:342:107: error: 'DecoratorDataHandle' has not been declared
  bool IterateDecorators(int& index, PseudoClassList& pseudo_classes, String& name, Decorator*& decorator, DecoratorDataHandle& decorator_data);
                                                                                                           ^
In file included from c:\mingw\librocket\include\rocket\core\core.h:52:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\FileInterface.h:57:10: error: 'FileHandle' does not name a type
  virtual FileHandle Open(const String& path) = 0;
          ^
c:\mingw\librocket\include\rocket\core\FileInterface.h:60:21: error: 'FileHandle' has not been declared
  virtual void Close(FileHandle file) = 0;
                     ^
c:\mingw\librocket\include\rocket\core\FileInterface.h:67:49: error: 'FileHandle' has not been declared
  virtual size_t Read(void* buffer, size_t size, FileHandle file) = 0;
                                                 ^
In file included from c:\mingw\librocket\include\rocket\core\core.h:52:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\FileInterface.h:73:20: error: 'FileHandle' has not been declared
  virtual bool Seek(FileHandle file, long offset, int origin) = 0;
                    ^
c:\mingw\librocket\include\rocket\core\FileInterface.h:77:22: error: 'FileHandle' has not been declared
  virtual size_t Tell(FileHandle file) = 0;
                      ^
c:\mingw\librocket\include\rocket\core\FileInterface.h:83:24: error: 'FileHandle' has not been declared
  virtual size_t Length(FileHandle file);
                        ^
In file included from c:\mingw\librocket\include\rocket\core\core.h:57:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\Geometry.h:91:2: error: 'CompiledGeometryHandle' does not name a type
  CompiledGeometryHandle compiled_geometry;
  ^
In file included from c:\mingw\librocket\include\rocket\core\core.h:67:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\RenderInterface.h:62:97: error: 'TextureHandle' has not been declared
  virtual void RenderGeometry(Vertex* vertices, int num_vertices, int* indices, int num_indices, TextureHandle texture, const Vector2f& translation) = 0;
                                                                                                 ^
In file included from c:\mingw\librocket\include\rocket\core\core.h:67:0,
                 from C:\MinGW\libRocket\Source\Core\precompiled.h:31,
                 from C:\MinGW\libRocket\Source\Core\BaseXMLParser.cpp:28:
c:\mingw\librocket\include\rocket\core\RenderInterface.h:73:10: error: 'CompiledGeometryHandle' does not name a type
  virtual CompiledGeometryHandle CompileGeometry(Vertex* vertices, int num_vertices, int* indices, int num_indices, TextureHandle texture);
          ^
c:\mingw\librocket\include\rocket\core\RenderInterface.h:77:38: error: 'CompiledGeometryHandle' has not been declared
  virtual void RenderCompiledGeometry(CompiledGeometryHandle geometry, const Vector2f& translation);
                                      ^
c:\mingw\librocket\include\rocket\core\RenderInterface.h:80:39: error: 'CompiledGeometryHandle' has not been declared
  virtual void ReleaseCompiledGeometry(CompiledGeometryHandle geometry);
                                       ^
c:\mingw\librocket\include\rocket\core\RenderInterface.h:97:27: error: 'TextureHandle' has not been declared
  virtual bool LoadTexture(TextureHandle& texture_handle, Vector2i& texture_dimensions, const String& source);
                           ^
c:\mingw\librocket\include\rocket\core\RenderInterface.h:103:31: error: 'TextureHandle' has not been declared
  virtual bool GenerateTexture(TextureHandle& texture_handle, const byte* source, const Vector2i& source_dimensions);
                               ^
c:\mingw\librocket\include\rocket\core\RenderInterface.h:106:30: error: 'TextureHandle' has not been declared
  virtual void ReleaseTexture(TextureHandle texture);
                              ^
CMakeFiles\RocketCore.dir\build.make:57: recipe for target 'CMakeFiles/RocketCore.dir/C_/MinGW/libRocket/Source/Core/BaseXMLParser.cpp.obj' failed
mingw32-make[2]: *** [CMakeFiles/RocketCore.dir/C_/MinGW/libRocket/Source/Core/BaseXMLParser.cpp.obj] Error 1
CMakeFiles\Makefile2:97: recipe for target 'CMakeFiles/RocketCore.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/RocketCore.dir/all] Error 2
Makefile:115: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

C:\MinGW\libRocket\Build>
The reason for why I'm trying to compile this on Windows is that not only am I looking for a way to easily build the source on Windows itself (since that's what I'm compiling it for), but also because of the fact that running Linux inside of a virtual machine is far more resource-intensive than just running the MinGW environment, meaning that the latter would only be used as a last resort. I followed the instructions on the project's page, but they appear to be incorrect since libRocket did NOT compile correctly as seen above.

I already have experience with building emulators since I already develop and compile my own emulator (based off of PCE) daily, though its support for the IBM PS/2 series and the Intel 80386 CPU are both still in their early stages, and even 86box's IBM PS/1 Model 2121 emulation still has lot's of problems, which is why I'm trying to compile the latest IBMulator source code so that I can use that until my own emulator's 80386 CPU support is more complete.

Comments

  • Make sure that you have a valid stdint.h lying around in a usable include/ directory and that you are correctly linking to a modern enough libc. This seems to be a C++ project and the uintptr_t type was only ever made official for C++ usage with C++11, so you may need a newer MinGW stack.
  • I tried including the entire "include" directory in the path and even copying it into the directory but it had no effect. I think that the instructions were simply incorrect, or that the user who uploaded said to himself "I put it together therefore it works" without actually testing it to see if it actually worked on Windows using MinGW or not. A lot of people simply don't bother checking for success before sending things out (like that multimedia publisher mentioned in Raymond Chen's "The Old New Thing" who simply forgot to include a video in their travel title on the CD-ROM itself which later was incorrectly reported as a bug in Windows 95). The author of IBMulator (and no offence to him at all) is mainly a Linux user, so he might not have tested it correctly under Windows to see if it actually works.

    Alternatively, I could try building it under Cygwin to see if it works, though even then, I'm not sure whether the libRocket files could even be copied back from Cygwin into MinGW itself since the two might not be entirely compatible with each other, in which case I might be forced to simply build the entire program under Cygwin. And as I said before, building any of this under Linux is really only being considered as an absolute last resort.

    However, if you in particular are able to build the entire program sources yourself (and for Windows at that), and then send them to me, then that would be a great help to me.
  • I really don't have any real build environment available for Windows.
  • stitch wrote:
    I really don't have any real build environment available for Windows.
    Would it be possible for you to compile it for Windows though? The author himself even has instructions for cross-compiling for Windows using Linux, so you could try that.

    Normally I would try the same thing myself, but running Linux inside of a virtual machine is already extremely resource-intensive in itself, and I'm also not quite as much of an expert with Linux as you are, meaning that it would be especially quite difficult if I had to install a completely separate operating system just to be able to compile one program, not to mention the amount of disk space that today's distributions would most likely require.
  • I can't really commit to this right now. Being realistic, I don't really have time to commit to this right now and this request involves software that I have never dealt with before. If I manage to find some free time where I can be focused enough for this, I'll take a look and let you know. Just be forewarned that kind of time is a rare commodity lately.
  • Honestly if you want to try a stab at the Linux cross compile approach I can probably set you up a VM with the tool chain and you can SSH in and try it yourself. That is at least something I can be relatively brain dead and probably accomplish.
  • stitch wrote:
    Honestly if you want to try a stab at the Linux cross compile approach I can probably set you up a VM with the tool chain and you can SSH in and try it yourself. That is at least something I can be relatively brain dead and probably accomplish.
    That would be fine, since it would at least save me the time of setting it up myself. As I said before, I'm completely willing to use a Linux virtual machine if it is quite obvious that there is absolutely no other way to build the program sources for Windows.
  • It just seems like this is a *nix oriented piece of software and that windows was an after thought.

    Bug me about this on Monday OK?
  • stitch wrote:
    It just seems like this is a *nix oriented piece of software and that windows was an after thought.

    Bug me about this on Monday OK?
    Yes, that was exactly what I thought. The main author himself even stated quite clearly in his previous posts that he is mainly (almost exclusively infact) a Linux user and that he even needed to make changes to the program early in its development in order for it to even run on Windows at all. Obviously, though, it had to support Windows eventually, since there are far fewer people using Linux itself.

    And I'm perfectly patient enough to wait as long as necessary, so I hope that it didn't sound like I was pestering you or anything because that was not my intention at all. I understand that people have jobs and everything, so I'm have no problem at all with waiting.
  • stitch wrote:
    It just seems like this is a *nix oriented piece of software and that windows was an after thought.

    Bug me about this on Monday OK?
    Since it's been a few days, were you able to compile this emulator?
Sign In or Register to comment.