BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
661 stars 89 forks source link

GCC13.1 build fails #1100

Closed dhwz closed 1 year ago

dhwz commented 1 year ago

floppybridge fails when building with GCC13.1, can you maybe help fixing it?

In file included from src/floppybridge/ArduinoFloppyBridge.h:31,
                 from src/floppybridge/floppybridge_config.h:21,
                 from src/floppybridge/SuperCardProBridge.cpp:19:
src/floppybridge/CommonBridgeTemplate.h:292:21: error: field 'm_lastError' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
  292 |         std::string m_lastError;
      |                     ^~~~~~~~~~~
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/iosfwd:41,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/std_thread.h:38,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/thread:45,
                 from src/floppybridge/CommonBridgeTemplate.h:32:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}
   72 |     class basic_string;
      |           ^~~~~~~~~~~~
make: *** [<builtin>: src/floppybridge/SuperCardProBridge.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/floppybridge/ArduinoFloppyBridge.h:31,
                 from src/floppybridge/floppybridge_config.h:21,
                 from src/floppybridge/ArduinoFloppyBridge.cpp:25:
src/floppybridge/CommonBridgeTemplate.h:292:21: error: field 'm_lastError' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
  292 |         std::string m_lastError;
      |                     ^~~~~~~~~~~
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/iosfwd:41,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/std_thread.h:38,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/thread:45,
                 from src/floppybridge/CommonBridgeTemplate.h:32:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}
   72 |     class basic_string;
      |           ^~~~~~~~~~~~
make: *** [<builtin>: src/floppybridge/ArduinoFloppyBridge.o] Error 1
In file included from src/floppybridge/SerialIO.cpp:68:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/unistd.h:1076:20: error: 'intptr_t' was not declared in this scope; did you mean 'FTDI::intptr_t'?
 1076 | extern void *sbrk (intptr_t __delta) __THROW;
      |                    ^~~~~~~~
      |                    FTDI::intptr_t
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/lib/gcc/aarch64-libreelec-linux-gnueabi/13.1.0/include/stdint.h:9,
                 from src/floppybridge/ftdi.h:38,
                 from src/floppybridge/SerialIO.h:40,
                 from src/floppybridge/SerialIO.cpp:29:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/stdint.h:87:33: note: 'FTDI::intptr_t' declared here
   87 | typedef long int                intptr_t;
      |                                 ^~~~~~~~
src/floppybridge/SerialIO.cpp: In member function 'bool SerialIO::getCTSStatus()':
src/floppybridge/ftdi.h:46:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   46 | #define ULONG uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:178:17: note: in expansion of macro 'ULONG'
  178 |                 ULONG status;
      |                 ^~~~~
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/stdint.h:37:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:179:47: error: 'status' was not declared in this scope; did you mean 'statx'?
  179 |                 if (m_ftdi.FT_GetModemStatus(&status) != FTDI::FT_STATUS::FT_OK) return false;
      |                                               ^~~~~~
      |                                               statx
src/floppybridge/SerialIO.cpp:180:25: error: 'status' was not declared in this scope; did you mean 'statx'?
  180 |                 return (status & FT_MODEM_STATUS_CTS) != 0;
      |                         ^~~~~~
      |                         statx
src/floppybridge/SerialIO.cpp: In static member function 'static void SerialIO::enumSerialPorts(std::vector<SerialPortInformation>&)':
src/floppybridge/ftdi.h:40:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   40 | #define DWORD uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:203:9: note: in expansion of macro 'DWORD'
  203 |         DWORD numDevs;
      |         ^~~~~
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:205:64: error: 'numDevs' was not declared in this scope
  205 |         FTDI::FT_STATUS status = ftdi.FT_CreateDeviceInfoList(&numDevs);
      |                                                                ^~~~~~~
src/floppybridge/SerialIO.cpp: In member function 'bool SerialIO::checkForOverrun()':
src/floppybridge/ftdi.h:46:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   46 | #define ULONG uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:709:17: note: in expansion of macro 'ULONG'
  709 |                 ULONG status;
      |                 ^~~~~
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:710:47: error: 'status' was not declared in this scope; did you mean 'statx'?
  710 |                 if (m_ftdi.FT_GetModemStatus(&status) != FTDI::FT_STATUS::FT_OK) return false;
      |                                               ^~~~~~
      |                                               statx
src/floppybridge/SerialIO.cpp:711:25: error: 'status' was not declared in this scope; did you mean 'statx'?
  711 |                 return (status & (FT_MODEM_STATUS_OE | FT_MODEM_STATUS_FE)) != 0;
      |                         ^~~~~~
      |                         statx
src/floppybridge/SerialIO.cpp: In member function 'unsigned int SerialIO::getBytesWaiting()':
src/floppybridge/ftdi.h:40:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   40 | #define DWORD uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:732:17: note: in expansion of macro 'DWORD'
  732 |                 DWORD queueSize = 0;
      |                 ^~~~~
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:733:47: error: 'queueSize' was not declared in this scope
  733 |                 if (m_ftdi.FT_GetQueueStatus(&queueSize) != FTDI::FT_STATUS::FT_OK) return 0;
      |                                               ^~~~~~~~~
src/floppybridge/SerialIO.cpp:734:24: error: 'queueSize' was not declared in this scope
  734 |                 return queueSize;
      |                        ^~~~~~~~~
src/floppybridge/SerialIO.cpp: In member function 'unsigned int SerialIO::write(const void*, unsigned int)':
src/floppybridge/ftdi.h:40:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   40 | #define DWORD uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:761:17: note: in expansion of macro 'DWORD'
  761 |                 DWORD written = 0;
      |                 ^~~~~
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:762:64: error: 'written' was not declared in this scope; did you mean 'write'?
  762 |                 if (m_ftdi.FT_Write((LPVOID)data, dataLength, &written) != FTDI::FT_STATUS::FT_OK) written = 0;
      |                                                                ^~~~~~~
      |                                                                write
src/floppybridge/SerialIO.cpp:763:24: error: 'written' was not declared in this scope; did you mean 'write'?
  763 |                 return written;
      |                        ^~~~~~~
      |                        write
src/floppybridge/SerialIO.cpp: In member function 'unsigned int SerialIO::justRead(void*, unsigned int)':
src/floppybridge/ftdi.h:40:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   40 | #define DWORD uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:821:17: note: in expansion of macro 'DWORD'
  821 |                 DWORD dataRead = 0;
      |                 ^~~~~
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:822:63: error: 'dataRead' was not declared in this scope
  822 |                 if (m_ftdi.FT_Read((LPVOID)data, dataLength, &dataRead) != FTDI::FT_STATUS::FT_OK) dataRead = 0;
      |                                                               ^~~~~~~~
src/floppybridge/SerialIO.cpp:823:24: error: 'dataRead' was not declared in this scope
  823 |                 return dataRead;
      |                        ^~~~~~~~
src/floppybridge/SerialIO.cpp: In member function 'unsigned int SerialIO::read(void*, unsigned int)':
src/floppybridge/ftdi.h:40:15: error: 'uint32_t' was not declared in this scope; did you mean 'FTDI::uint32_t'?
   40 | #define DWORD uint32_t
      |               ^~~~~~~~
src/floppybridge/SerialIO.cpp:855:17: note: in expansion of macro 'DWORD'
  855 |                 DWORD dataRead = 0;
      |                 ^~~~~
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/sysroot/usr/include/bits/stdint-uintn.h:26:20: note: 'FTDI::uint32_t' declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
src/floppybridge/SerialIO.cpp:856:63: error: 'dataRead' was not declared in this scope
  856 |                 if (m_ftdi.FT_Read((LPVOID)data, dataLength, &dataRead) != FTDI::FT_STATUS::FT_OK) dataRead = 0;
      |                                                               ^~~~~~~~
src/floppybridge/SerialIO.cpp:857:24: error: 'dataRead' was not declared in this scope
  857 |                 return dataRead;
      |                        ^~~~~~~~
make: *** [<builtin>: src/floppybridge/SerialIO.o] Error 1
In file included from src/floppybridge/CommonBridgeTemplate.cpp:34:
src/floppybridge/CommonBridgeTemplate.h:292:21: error: field 'm_lastError' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
  292 |         std::string m_lastError;
      |                     ^~~~~~~~~~~
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/iosfwd:41,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/std_thread.h:38,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/thread:45,
                 from src/floppybridge/CommonBridgeTemplate.cpp:27:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}
   72 |     class basic_string;
      |           ^~~~~~~~~~~~
make: *** [<builtin>: src/floppybridge/CommonBridgeTemplate.o] Error 1
In file included from src/floppybridge/ArduinoFloppyBridge.h:31,
                 from src/floppybridge/floppybridge_config.h:21,
                 from src/floppybridge/GreaseWeazleBridge.cpp:19:
src/floppybridge/CommonBridgeTemplate.h:292:21: error: field 'm_lastError' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
  292 |         std::string m_lastError;
      |                     ^~~~~~~~~~~
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/iosfwd:41,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/std_thread.h:38,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/thread:45,
                 from src/floppybridge/CommonBridgeTemplate.h:32:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}
   72 |     class basic_string;
      |           ^~~~~~~~~~~~
make: *** [<builtin>: src/floppybridge/GreaseWeazleBridge.o] Error 1
In file included from src/floppybridge/FloppyBridge.h:49,
                 from src/floppybridge/FloppyBridge.cpp:26:
src/floppybridge/CommonBridgeTemplate.h:292:21: error: field 'm_lastError' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
  292 |         std::string m_lastError;
      |                     ^~~~~~~~~~~
In file included from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/iosfwd:41,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/std_thread.h:38,
                 from /home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/thread:45,
                 from src/floppybridge/CommonBridgeTemplate.h:32:
/home/dragon/351ELEC/build.AmberELEC-RG552.aarch64/toolchain/aarch64-libreelec-linux-gnueabi/include/c++/13.1.0/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}
   72 |     class basic_string;
      |           ^~~~~~~~~~~~
make: *** [<builtin>: src/floppybridge/FloppyBridge.o] Error 1
midwan commented 1 year ago

Perhaps it would be best to report this directly to Rob, here: https://github.com/RobSmithDev/FloppyDriveBridge

dhwz commented 1 year ago

Yes of course, I didn't know where the code came from.

dhwz commented 1 year ago

@midwan I think I found a solution, you may add it or just wait till floppybridge gets fixed. https://github.com/RobSmithDev/FloppyDriveBridge/issues/9#issuecomment-1570654276 I've applied it as a patch in the meanwhile.

midwan commented 1 year ago

Thanks!