RobSmithDev / ArduinoFloppyDiskReader

DrawBridge aka Arduino Amiga Floppy Disk Reader/Writer - Hardware and software interface for accessing Amiga disks (read/write ADF and SCP) on non-Amiga hardware
https://amiga.robsmithdev.co.uk
GNU General Public License v3.0
227 stars 53 forks source link

Linux compile does not work OOTB with latest desktop ubuntu #29

Open krickert opened 11 months ago

krickert commented 11 months ago
  1. download codebase onto an ubuntu latest desktop for intel git clone https://github.com/RobSmithDev/ArduinoFloppyDiskReader.git
  2. cd ArduinoFloppyDiskReader/ArduinoFloppyReader/ArduinoFloppyReader
  3. make

Returns the following output:

/ArduinoFloppyDiskReader/ArduinoFloppyReader/ArduinoFloppyReader$ make 
g++ -Wall -std=c++14 -Wno-psabi -O3 -pthread -I../lib -o drawbridge Main.cpp ../lib/ftdi.cpp ../lib/SerialIO.cpp ../lib/RotationExtractor.cpp ../lib/pll.cpp ../lib/ArduinoInterface.cpp ../lib/ADFWriter.cpp ../lib/capsapi/CapsPlug.cpp -L../lib -ldl
Main.cpp: In function ‘void listSettings(const std::wstring&)’:
Main.cpp:137:23: warning: format not a string literal and no format arguments [-Wformat-security]
  137 |                 printf(io.getLastErrorStr().c_str());
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp: In function ‘void programmeSetting(const std::wstring&, const std::wstring&, bool)’:
Main.cpp:156:23: warning: format not a string literal and no format arguments [-Wformat-security]
  156 |                 printf(io.getLastErrorStr().c_str());
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/SerialIO.cpp:70:
/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 /usr/lib/gcc/x86_64-linux-gnu/13/include/stdint.h:9,
                 from ../lib/ftdi.h:39,
                 from ../lib/SerialIO.h:41,
                 from ../lib/SerialIO.cpp:30:
/usr/include/stdint.h:87:33: note: ‘FTDI::intptr_t’ declared here
   87 | typedef long int                intptr_t;
      |                                 ^~~~~~~~
../lib/SerialIO.cpp: In member function ‘bool SerialIO::getCTSStatus()’:
../lib/ftdi.h:47:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   47 | #define ULONG uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:180:17: note: in expansion of macro ‘ULONG’
  180 |                 ULONG status;
      |                 ^~~~~
In file included from /usr/include/stdint.h:37:
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:181:47: error: ‘status’ was not declared in this scope; did you mean ‘statx’?
  181 |                 if (m_ftdi.FT_GetModemStatus(&status) != FTDI::FT_STATUS::FT_OK) return false;
      |                                               ^~~~~~
      |                                               statx
../lib/SerialIO.cpp:182:25: error: ‘status’ was not declared in this scope; did you mean ‘statx’?
  182 |                 return (status & FT_MODEM_STATUS_CTS) != 0;
      |                         ^~~~~~
      |                         statx
../lib/SerialIO.cpp: In static member function ‘static void SerialIO::enumSerialPorts(std::vector<SerialPortInformation>&)’:
../lib/ftdi.h:41:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   41 | #define DWORD uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:205:9: note: in expansion of macro ‘DWORD’
  205 |         DWORD numDevs;
      |         ^~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:207:64: error: ‘numDevs’ was not declared in this scope
  207 |         FTDI::FT_STATUS status = ftdi.FT_CreateDeviceInfoList(&numDevs);
      |                                                                ^~~~~~~
../lib/SerialIO.cpp: In member function ‘bool SerialIO::checkForOverrun()’:
../lib/ftdi.h:47:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   47 | #define ULONG uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:699:17: note: in expansion of macro ‘ULONG’
  699 |                 ULONG status;
      |                 ^~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:700:47: error: ‘status’ was not declared in this scope; did you mean ‘statx’?
  700 |                 if (m_ftdi.FT_GetModemStatus(&status) != FTDI::FT_STATUS::FT_OK) return false;
      |                                               ^~~~~~
      |                                               statx
../lib/SerialIO.cpp:701:25: error: ‘status’ was not declared in this scope; did you mean ‘statx’?
  701 |                 return (status & (FT_MODEM_STATUS_OE | FT_MODEM_STATUS_FE)) != 0;
      |                         ^~~~~~
      |                         statx
../lib/SerialIO.cpp: In member function ‘unsigned int SerialIO::getBytesWaiting()’:
../lib/ftdi.h:41:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   41 | #define DWORD uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:722:17: note: in expansion of macro ‘DWORD’
  722 |                 DWORD queueSize = 0;
      |                 ^~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:723:47: error: ‘queueSize’ was not declared in this scope
  723 |                 if (m_ftdi.FT_GetQueueStatus(&queueSize) != FTDI::FT_STATUS::FT_OK) return 0;
      |                                               ^~~~~~~~~
../lib/SerialIO.cpp:724:24: error: ‘queueSize’ was not declared in this scope
  724 |                 return queueSize;
      |                        ^~~~~~~~~
../lib/SerialIO.cpp: In member function ‘unsigned int SerialIO::write(const void*, unsigned int)’:
../lib/ftdi.h:41:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   41 | #define DWORD uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:751:17: note: in expansion of macro ‘DWORD’
  751 |                 DWORD written = 0;
      |                 ^~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:752:64: error: ‘written’ was not declared in this scope; did you mean ‘write’?
  752 |                 if (m_ftdi.FT_Write((LPVOID)data, dataLength, &written) != FTDI::FT_STATUS::FT_OK) written = 0;
      |                                                                ^~~~~~~
      |                                                                write
../lib/SerialIO.cpp:753:24: error: ‘written’ was not declared in this scope; did you mean ‘write’?
  753 |                 return written;
      |                        ^~~~~~~
      |                        write
../lib/SerialIO.cpp: In member function ‘unsigned int SerialIO::justRead(void*, unsigned int)’:
../lib/ftdi.h:41:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   41 | #define DWORD uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:811:17: note: in expansion of macro ‘DWORD’
  811 |                 DWORD dataRead = 0;
      |                 ^~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:812:63: error: ‘dataRead’ was not declared in this scope
  812 |                 if (m_ftdi.FT_Read((LPVOID)data, dataLength, &dataRead) != FTDI::FT_STATUS::FT_OK) dataRead = 0;
      |                                                               ^~~~~~~~
../lib/SerialIO.cpp:813:24: error: ‘dataRead’ was not declared in this scope
  813 |                 return dataRead;
      |                        ^~~~~~~~
../lib/SerialIO.cpp: In member function ‘unsigned int SerialIO::read(void*, unsigned int)’:
../lib/ftdi.h:41:15: error: ‘uint32_t’ was not declared in this scope; did you mean ‘FTDI::uint32_t’?
   41 | #define DWORD uint32_t
      |               ^~~~~~~~
../lib/SerialIO.cpp:845:17: note: in expansion of macro ‘DWORD’
  845 |                 DWORD dataRead = 0;
      |                 ^~~~~
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h:26:20: note: ‘FTDI::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
../lib/SerialIO.cpp:846:63: error: ‘dataRead’ was not declared in this scope
  846 |                 if (m_ftdi.FT_Read((LPVOID)data, dataLength, &dataRead) != FTDI::FT_STATUS::FT_OK) dataRead = 0;
      |                                                               ^~~~~~~~
../lib/SerialIO.cpp:847:24: error: ‘dataRead’ was not declared in this scope
  847 |                 return dataRead;
      |                        ^~~~~~~~
make: *** [makefile:56: drawbridge] Error 1

This looks like one or more libraries are not installed right.

I just don't know what to do.