barotto / IBMulator

The IBM PS/1 emulator.
https://barotto.github.io/IBMulator
GNU General Public License v3.0
111 stars 4 forks source link

Error building IBMulator on Windows 11 #80

Closed Memento-Morri404 closed 9 months ago

Memento-Morri404 commented 9 months ago

Encountered the following error building IBMulator from Windows. I was following the documentation exactly:

cd /c/workspace git clone https://github.com/barotto/IBMulator.git cd IBMulator autoreconf --install ./configure --prefix=/c/workspace/IBMulator/release --enable-static make -j$(nproc) <-- This is where I encounter the error:

In file included from format.cpp:20:
../../src/utils.h:29:11: error: 'uint64_t' does not name a type
   29 | constexpr uint64_t operator"" _KB ( unsigned long long int _kb ) { return _kb * 1000L; }
      |           ^~~~~~~~
../../src/utils.h:28:1: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   27 | #include <regex>
  +++ |+#include <cstdint>
   28 |
../../src/utils.h:30:11: error: 'uint64_t' does not name a type
   30 | constexpr uint64_t operator"" _MB ( unsigned long long int _mb ) { return _mb * 1000000L; }
      |           ^~~~~~~~
../../src/utils.h:30:11: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:31:11: error: 'uint64_t' does not name a type
   31 | constexpr uint64_t operator"" _KiB ( unsigned long long int _kib ) { return _kib * 1024L; }
      |           ^~~~~~~~
../../src/utils.h:31:11: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:32:11: error: 'uint64_t' does not name a type
   32 | constexpr uint64_t operator"" _MiB ( unsigned long long int _mib ) { return _mib * 1048576L; }
      |           ^~~~~~~~
../../src/utils.h:32:11: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:41:8: error: 'uint32_t' does not name a type
   41 | inline uint32_t to_bigendian_32(uint32_t _hostval)
      |        ^~~~~~~~
../../src/utils.h:41:8: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:50:8: error: 'uint16_t' does not name a type
   50 | inline uint16_t to_bigendian_16(uint16_t _hostval)
      |        ^~~~~~~~
../../src/utils.h:50:8: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:134:32: error: 'uint8_t' was not declared in this scope
  134 | std::string bitfield_to_string(uint8_t _bitfield,
      |                                ^~~~~~~
../../src/utils.h:134:32: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:135:17: error: expected primary-expression before 'const'
  135 |                 const std::array<std::string, 8> &_set_names);
      |                 ^~~~~
../../src/utils.h:135:51: error: '_set_names' was not declared in this scope; did you mean '_tzname'?
  135 |                 const std::array<std::string, 8> &_set_names);
      |                                                   ^~~~~~~~~~
      |                                                   _tzname
../../src/utils.h:136:13: error: redefinition of 'std::string bitfield_to_string'
  136 | std::string bitfield_to_string(uint8_t _bitfield,
      |             ^~~~~~~~~~~~~~~~~~
../../src/utils.h:134:13: note: 'std::string bitfield_to_string' previously declared here
  134 | std::string bitfield_to_string(uint8_t _bitfield,
      |             ^~~~~~~~~~~~~~~~~~
../../src/utils.h:136:32: error: 'uint8_t' was not declared in this scope
  136 | std::string bitfield_to_string(uint8_t _bitfield,
      |                                ^~~~~~~
../../src/utils.h:136:32: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:137:17: error: expected primary-expression before 'const'
  137 |                 const std::array<std::string, 8> &_set_names,
      |                 ^~~~~
../../src/utils.h:137:51: error: '_set_names' was not declared in this scope; did you mean '_tzname'?
  137 |                 const std::array<std::string, 8> &_set_names,
      |                                                   ^~~~~~~~~~
      |                                                   _tzname
../../src/utils.h:138:17: error: expected primary-expression before 'const'
  138 |                 const std::array<std::string, 8> &_clear_names);
      |                 ^~~~~
../../src/utils.h:138:51: error: '_clear_names' was not declared in this scope
  138 |                 const std::array<std::string, 8> &_clear_names);
      |                                                   ^~~~~~~~~~~~
../../src/utils.h:140:32: error: 'uint8_t' was not declared in this scope
  140 | const char* register_to_string(uint8_t _register,
      |                                ^~~~~~~
../../src/utils.h:140:32: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:141:9: error: expected primary-expression before 'const'
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |         ^~~~~
../../src/utils.h:141:53: error: expected primary-expression before '>' token
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                     ^
../../src/utils.h:141:55: error: expected primary-expression before '>' token
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                       ^
../../src/utils.h:141:58: error: '_fields' was not declared in this scope
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                          ^~~~~~~
../../src/utils.h:141:65: error: expression list treated as compound expression in initializer [-fpermissive]
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                                 ^
../../src/utils.h:143:39: error: 'uint8_t' does not name a type
  143 | std::string bytearray_to_string(const uint8_t *_data, unsigned _len);
      |                                       ^~~~~~~
../../src/utils.h:143:39: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
make[3]: *** [Makefile:687: format.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/morri/c/workspace/IBMulator/src/gui'
make[2]: *** [Makefile:675: all-recursive] Error 1
make[2]: Leaving directory '/home/morri/c/workspace/IBMulator/src'
make[1]: *** [Makefile:1245: all-recursive] Error 1
make[1]: Leaving directory '/home/morri/c/workspace/IBMulator'
make: *** [Makefile:703: all] Error 2
Memento-Morri404 commented 9 months ago

I also just tried running make install, and it gives an error too:

morri@MSI MINGW64 ~/c/workspace/IBMulator
$ make install
Making install in src
make[1]: Entering directory '/home/morri/c/workspace/IBMulator/src'
Making install in audio
make[2]: Entering directory '/home/morri/c/workspace/IBMulator/src/audio'
make[3]: Entering directory '/home/morri/c/workspace/IBMulator/src/audio'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/morri/c/workspace/IBMulator/src/audio'
make[2]: Leaving directory '/home/morri/c/workspace/IBMulator/src/audio'
Making install in hardware
make[2]: Entering directory '/home/morri/c/workspace/IBMulator/src/hardware'
make[3]: Entering directory '/home/morri/c/workspace/IBMulator/src/hardware'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/morri/c/workspace/IBMulator/src/hardware'
make[2]: Leaving directory '/home/morri/c/workspace/IBMulator/src/hardware'
Making install in gui
make[2]: Entering directory '/home/morri/c/workspace/IBMulator/src/gui'
depbase=`echo format.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..    -O3  -fomit-frame-pointer -finline-functions -DNDEBUG -mno-ms-bitfields -static-libgcc -static-libstdc++ -static -pthread -I../../src    -DRMLUI_STATIC_LIB -DGLEW_STATIC -IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main      -MT format.o -MD -MP -MF $depbase.Tpo -c -o format.o format.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from format.cpp:20:
../../src/utils.h:29:11: error: 'uint64_t' does not name a type
   29 | constexpr uint64_t operator"" _KB ( unsigned long long int _kb ) { return _kb * 1000L; }
      |           ^~~~~~~~
../../src/utils.h:28:1: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   27 | #include <regex>
  +++ |+#include <cstdint>
   28 |
../../src/utils.h:30:11: error: 'uint64_t' does not name a type
   30 | constexpr uint64_t operator"" _MB ( unsigned long long int _mb ) { return _mb * 1000000L; }
      |           ^~~~~~~~
../../src/utils.h:30:11: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:31:11: error: 'uint64_t' does not name a type
   31 | constexpr uint64_t operator"" _KiB ( unsigned long long int _kib ) { return _kib * 1024L; }
      |           ^~~~~~~~
../../src/utils.h:31:11: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:32:11: error: 'uint64_t' does not name a type
   32 | constexpr uint64_t operator"" _MiB ( unsigned long long int _mib ) { return _mib * 1048576L; }
      |           ^~~~~~~~
../../src/utils.h:32:11: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:41:8: error: 'uint32_t' does not name a type
   41 | inline uint32_t to_bigendian_32(uint32_t _hostval)
      |        ^~~~~~~~
../../src/utils.h:41:8: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:50:8: error: 'uint16_t' does not name a type
   50 | inline uint16_t to_bigendian_16(uint16_t _hostval)
      |        ^~~~~~~~
../../src/utils.h:50:8: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:134:32: error: 'uint8_t' was not declared in this scope
  134 | std::string bitfield_to_string(uint8_t _bitfield,
      |                                ^~~~~~~
../../src/utils.h:134:32: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:135:17: error: expected primary-expression before 'const'
  135 |                 const std::array<std::string, 8> &_set_names);
      |                 ^~~~~
../../src/utils.h:135:51: error: '_set_names' was not declared in this scope; did you mean '_tzname'?
  135 |                 const std::array<std::string, 8> &_set_names);
      |                                                   ^~~~~~~~~~
      |                                                   _tzname
../../src/utils.h:136:13: error: redefinition of 'std::string bitfield_to_string'
  136 | std::string bitfield_to_string(uint8_t _bitfield,
      |             ^~~~~~~~~~~~~~~~~~
../../src/utils.h:134:13: note: 'std::string bitfield_to_string' previously declared here
  134 | std::string bitfield_to_string(uint8_t _bitfield,
      |             ^~~~~~~~~~~~~~~~~~
../../src/utils.h:136:32: error: 'uint8_t' was not declared in this scope
  136 | std::string bitfield_to_string(uint8_t _bitfield,
      |                                ^~~~~~~
../../src/utils.h:136:32: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:137:17: error: expected primary-expression before 'const'
  137 |                 const std::array<std::string, 8> &_set_names,
      |                 ^~~~~
../../src/utils.h:137:51: error: '_set_names' was not declared in this scope; did you mean '_tzname'?
  137 |                 const std::array<std::string, 8> &_set_names,
      |                                                   ^~~~~~~~~~
      |                                                   _tzname
../../src/utils.h:138:17: error: expected primary-expression before 'const'
  138 |                 const std::array<std::string, 8> &_clear_names);
      |                 ^~~~~
../../src/utils.h:138:51: error: '_clear_names' was not declared in this scope
  138 |                 const std::array<std::string, 8> &_clear_names);
      |                                                   ^~~~~~~~~~~~
../../src/utils.h:140:32: error: 'uint8_t' was not declared in this scope
  140 | const char* register_to_string(uint8_t _register,
      |                                ^~~~~~~
../../src/utils.h:140:32: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
../../src/utils.h:141:9: error: expected primary-expression before 'const'
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |         ^~~~~
../../src/utils.h:141:53: error: expected primary-expression before '>' token
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                     ^
../../src/utils.h:141:55: error: expected primary-expression before '>' token
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                       ^
../../src/utils.h:141:58: error: '_fields' was not declared in this scope
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                          ^~~~~~~
../../src/utils.h:141:65: error: expression list treated as compound expression in initializer [-fpermissive]
  141 |         const std::vector<std::pair<int, std::string> > &_fields);
      |                                                                 ^
../../src/utils.h:143:39: error: 'uint8_t' does not name a type
  143 | std::string bytearray_to_string(const uint8_t *_data, unsigned _len);
      |                                       ^~~~~~~
../../src/utils.h:143:39: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
make[2]: *** [Makefile:687: format.o] Error 1
make[2]: Leaving directory '/home/morri/c/workspace/IBMulator/src/gui'
make[1]: *** [Makefile:675: install-recursive] Error 1
make[1]: Leaving directory '/home/morri/c/workspace/IBMulator/src'
make: *** [Makefile:1245: install-recursive] Error 1
barotto commented 9 months ago

Thanks for reporting. I rarely test on Windows and the MSYS environment changes constantly. I'll look into it, in the meantime try adding #include <cstdint> in src/utils.h