Can Indy10 be used on a Raspberry Pi? - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: Can Indy10 be used on a Raspberry Pi? (/thread-2521.html) |
Can Indy10 be used on a Raspberry Pi? - BartKindt - 10-07-2021 While compiling a ItHTTPServer and an IdTCPServer for the Raspberry Pi, with {mode objfpc}, I get hundreds of 'Hints' which indicate to me it is not going to work at all. And indeed, it crashes on the first Thread.Create somewhere. This is the list of compiling problems (sorry, lots of it): Compile Project, Target: ViaTerminal, Warnings: 10, Hints: 224 IdGlobal.pas(2413,33) Hint: Parameter "AChars" not used IdGlobal.pas(2414,86) Hint: Parameter "AByteCount" not used IdGlobal.pas(2415,33) Hint: Parameter "ABytes" not used IdGlobal.pas(2416,86) Hint: Parameter "ACharCount" not used IdGlobal.pas(2424,86) Hint: Parameter "AByteCount" not used IdGlobal.pas(2425,44) Hint: Parameter "AByteCount" not used IdGlobal.pas(2432,33) Hint: Parameter "AChars" not used IdGlobal.pas(2434,33) Hint: Parameter "ABytes" not used IdGlobal.pas(2443,33) Hint: Parameter "AChars" not used IdGlobal.pas(2445,33) Hint: Parameter "ABytes" not used IdGlobal.pas(1748,29) Hint: Parameter "AText" not used IdGlobal.pas(6066,36) Hint: Local variable "ts" does not seem to be initialized IdGlobal.pas(6286,50) Hint: Conversion between ordinals and pointers is not portable IdGlobal.pas(6494,3) Note: Local variable "LVoid" is assigned but never used IdGlobal.pas(6574,42) Hint: Local variable "LErr" does not seem to be initialized IdGlobal.pas(6692,34) Hint: Local variable "LErr" does not seem to be initialized IdGlobal.pas(6848,49) Hint: Local variable "LErr" does not seem to be initialized IdGlobal.pas(7032,59) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors. IdGlobal.pas(1877,33) Hint: Parameter "AThread" not used IdGlobal.pas(1877,93) Hint: Parameter "APolicy" not used IdGlobal.pas(1878,31) Hint: Parameter "AName" not used IdGlobal.pas(1878,106) Hint: Parameter "AThreadID" not used IdGlobal.pas(8407,4) Hint: "formal parameter" not yet supported inside inline procedure/function IdGlobal.pas(8407,4) Hint: Inlining disabled IdGlobal.pas(8502,4) Hint: "formal parameter" not yet supported inside inline procedure/function IdGlobal.pas(8502,4) Hint: Inlining disabled IdGlobal.pas(8511,29) Hint: Function result variable does not seem to be initialized IdGlobal.pas(8816,4) Hint: "formal parameter" not yet supported inside inline procedure/function IdGlobal.pas(8816,4) Hint: Inlining disabled IdGlobal.pas(8847,53) Hint: Local variable "LBytes" of a managed type does not seem to be initialized IdGlobal.pas(8881,43) Hint: Function result variable does not seem to be initialized IdGlobal.pas(8896,21) Hint: Local variable "Lb" does not seem to be initialized IdGlobal.pas(1425,25) Hint: Parameter "VBuffer" not used IdGlobal.pas(1425,44) Hint: Parameter "AOffset" not used IdGlobal.pas(1425,53) Hint: Parameter "ACount" not used IdGlobal.pas(1462,26) Hint: Parameter "Buffer" not used IdGlobal.pas(1462,34) Hint: Parameter "Count" not used IdGlobal.pas(9640,43) Hint: Function result variable of a managed type does not seem to be initialized IdGlobal.pas(10054,4) Hint: "formal parameter" not yet supported inside inline procedure/function IdGlobal.pas(10054,4) Hint: Inlining disabled IdGlobal.pas(551,23) Hint: Unit "Sockets" not used in IdGlobal IdCTypes.pas(18,3) Hint: Unit "ctypes" not used in IdCTypes IdStackUnix.pas(424,38) Hint: Local variable "LH4" of a managed type does not seem to be initialized IdStackUnix.pas(505,82) Hint: Local variable "LIPVersion" does not seem to be initialized IdStackUnix.pas(505,70) Hint: Local variable "LPort" does not seem to be initialized IdStackUnix.pas(505,63) Hint: Local variable "LIP" of a managed type does not seem to be initialized IdStackUnix.pas(710,43) Hint: Local variable "LS" of a managed type does not seem to be initialized IdStackUnix.pas(834,26) Hint: Local variable "LAddrList" does not seem to be initialized IdStackUnix.pas(913,35) Warning: Local variable "LI" of a managed type does not seem to be initialized IdStackUnix.pas(1006,42) Hint: Local variable "LS" of a managed type does not seem to be initialized IdStackUnix.pas(123,62) Hint: Parameter "VBuffer" not used IdStackUnix.pas(124,37) Hint: Parameter "AIP" not used IdStackUnix.pas(124,56) Hint: Parameter "APort" not used IdStackUnix.pas(1290,41) Hint: Local variable "LPReadSet" does not seem to be initialized IdStackUnix.pas(1290,30) Hint: Local variable "LReadSet" does not seem to be initialized IdStackUnix.pas(1291,44) Hint: Local variable "LPWriteSet" does not seem to be initialized IdStackUnix.pas(1291,32) Hint: Local variable "LWriteSet" does not seem to be initialized IdStackUnix.pas(1292,47) Hint: Local variable "LPExceptSet" does not seem to be initialized IdStackUnix.pas(1292,34) Hint: Local variable "LExceptSet" does not seem to be initialized IdStackBSDBase.pas(410,40) Hint: Local variable "LAddress" does not seem to be initialized IdStackBSDBase.pas(462,34) Warning: Local variable "Tmp" does not seem to be initialized IdStackBSDBase.pas(491,26) Warning: Local variable "Tmp" does not seem to be initialized IdStackBSDBase.pas(501,107) Hint: Local variable "LBuf" does not seem to be initialized IdStackBSDBase.pas(604,44) Hint: Local variable "LIP4" does not seem to be initialized IdStackBSDBase.pas(612,44) Hint: Local variable "LIP6" does not seem to be initialized IdStackBSDBase.pas(361,3) Hint: Unit "IdResourceStrings" not used in IdStackBSDBase IdStack.pas(229,27) Hint: Parameter "AReadList" not used IdStack.pas(229,53) Hint: Parameter "AWriteList" not used IdStack.pas(230,6) Hint: Parameter "AExceptList" not used IdStack.pas(230,40) Hint: Parameter "ATimeout" not used IdStack.pas(634,51) Hint: Local variable "LIPVersion" does not seem to be initialized IdStack.pas(642,46) Hint: Local variable "LIPVersion" does not seem to be initialized IdStack.pas(650,48) Hint: Local variable "LIPVersion" does not seem to be initialized IdBaseComponent.pas(150,38) Hint: Parameter "AComponent" not used IdSocketHandle.pas(520,55) Hint: Local variable "LPort" does not seem to be initialized IdSocketHandle.pas(520,48) Hint: Local variable "LIP" of a managed type does not seem to be initialized IdSocketHandle.pas(134,50) Hint: Unit "IdBaseComponent" not used in IdSocketHandle IdBuffer.pas(509,26) Hint: Local variable "LBytes" of a managed type does not seem to be initialized IdBuffer.pas(559,24) Hint: Local variable "LBytes" of a managed type does not seem to be initialized IdIntercept.pas(71,30) Hint: Unit "IdBuffer" not used in IdIntercept IdIOHandler.pas(534,6) Hint: Parameter "AOwner" not used IdIOHandler.pas(484,34) Hint: Parameter "ASender" not used IdIOHandler.pas(1015,41) Hint: Local variable "LBytes" of a managed type does not seem to be initialized IdIOHandler.pas(1547,38) Hint: Local variable "LResult" of a managed type does not seem to be initialized IdIOHandler.pas(553,23) Hint: Parameter "AMSec" not used IdIOHandler.pas(623,39) Hint: Parameter "ADelim" not used IdIOHandler.pas(606,45) Hint: Parameter "AEnableTransferFile" not used IdCustomTransparentProxy.pas(167,36) Warning: Function result does not seem to be set IdCustomTransparentProxy.pas(113,22) Hint: Parameter "AIOHandler" not used IdCustomTransparentProxy.pas(113,54) Hint: Parameter "ATimeOut" not used IdCustomTransparentProxy.pas(111,20) Hint: Parameter "AIOHandler" not used IdCustomTransparentProxy.pas(111,52) Hint: Parameter "AHost" not used IdCustomTransparentProxy.pas(111,73) Hint: Parameter "APort" not used IdCustomTransparentProxy.pas(111,95) Hint: Parameter "AIPVersion" not used IdCustomTransparentProxy.pas(93,26) Hint: Parameter "AValue" not used IdCustomTransparentProxy.pas(102,24) Hint: Parameter "AHandle" not used IdCustomTransparentProxy.pas(101,23) Hint: Parameter "AHandle" not used IdCustomTransparentProxy.pas(101,56) Hint: Parameter "AHost" not used IdCustomTransparentProxy.pas(101,82) Hint: Parameter "APort" not used IdCustomTransparentProxy.pas(101,108) Hint: Parameter "AIPVersion" not used IdCustomTransparentProxy.pas(245,36) Warning: Function result does not seem to be set IdCustomTransparentProxy.pas(103,26) Hint: Parameter "AHandle" not used IdCustomTransparentProxy.pas(103,56) Hint: Parameter "ABuffer" not used IdCustomTransparentProxy.pas(104,11) Hint: Parameter "VPeerIP" not used IdCustomTransparentProxy.pas(104,32) Hint: Parameter "VPeerPort" not used IdCustomTransparentProxy.pas(104,56) Hint: Parameter "VIPVersion" not used IdCustomTransparentProxy.pas(105,8) Hint: Parameter "AMSec" not used IdCustomTransparentProxy.pas(106,25) Hint: Parameter "AHandle" not used IdCustomTransparentProxy.pas(107,13) Hint: Parameter "AHost" not used IdCustomTransparentProxy.pas(107,34) Hint: Parameter "APort" not used IdCustomTransparentProxy.pas(107,56) Hint: Parameter "AIPVersion" not used IdCustomTransparentProxy.pas(108,13) Hint: Parameter "ABuffer" not used IdIPAddress.pas(235,47) Hint: Local variable "LErr" does not seem to be initialized IdIPAddress.pas(262,49) Hint: Local variable "LErr" does not seem to be initialized IdReply.pas(139,39) Hint: Parameter "ACode" not used IdReply.pas(157,38) Hint: Parameter "ALine" not used IdTCPConnection.pas(385,30) Hint: Parameter "ASender" not used IdTCPConnection.pas(386,28) Hint: Parameter "ASender" not used IdTCPConnection.pas(387,25) Hint: Parameter "ASender" not used IdTCPConnection.pas(388,30) Hint: Parameter "aCmd" not used IdTCPConnection.pas(359,3) Hint: Unit "IdIOHandlerStack" not used in IdTCPConnection IdTCPConnection.pas(361,3) Hint: Unit "IdSocketHandle" not used in IdTCPConnection IdTCPConnection.pas(458,3) Hint: Unit "IdAntiFreezeBase" not used in IdTCPConnection IdTCPConnection.pas(458,44) Hint: Unit "IdStackConsts" not used in IdTCPConnection IdIOHandlerStack.pas(214,44) Hint: Unit "IdResourceStrings" not used in IdIOHandlerStack IdIOHandlerStack.pas(215,3) Hint: Unit "IdTCPConnection" not used in IdIOHandlerStack IdSocks.pas(331,33) Hint: Local variable "LResponse" of a managed type does not seem to be initialized IdSocks.pas(223,33) Hint: Parameter "AIOHandler" not used IdSocks.pas(394,62) Hint: Local variable "Lpos" does not seem to be initialized IdSocks.pas(226,111) Hint: Parameter "AIPVersion" not used IdSocks.pas(229,105) Hint: Parameter "AIPVersion" not used IdSocks.pas(597,66) Hint: Local variable "Lpos" does not seem to be initialized IdSocks.pas(642,43) Hint: Local variable "LAddress" does not seem to be initialized IdSocks.pas(228,35) Hint: Parameter "AIPVersion" not used IdSocks.pas(728,39) Hint: Local variable "LAddress" does not seem to be initialized IdSocks.pas(789,110) Hint: Local variable "Lpos" does not seem to be initialized IdSocks.pas(247,24) Hint: Parameter "AHandle" not used IdSocks.pas(241,56) Hint: Parameter "AHost" not used IdSocks.pas(241,82) Hint: Parameter "APort" not used IdSocks.pas(241,108) Hint: Parameter "AIPVersion" not used IdSocks.pas(912,32) Hint: Local variable "LIP6" does not seem to be initialized IdSocks.pas(246,35) Hint: Parameter "AIPVersion" not used IdTask.pas(59,31) Hint: Parameter "AException" not used IdScheduler.pas(81,20) Hint: Unit "IdThread" not used in IdScheduler IdServerIOHandler.pas(67,7) Hint: Parameter "ASocket" not used IdServerIOHandler.pas(68,7) Hint: Parameter "AListenerThread" not used IdServerIOHandler.pas(69,7) Hint: Parameter "AYarn" not used IdServerIOHandler.pas(72,34) Hint: Parameter "AYarn" not used IdServerIOHandler.pas(54,50) Hint: Unit "IdStackConsts" not used in IdServerIOHandler IdServerIOHandlerSocket.pas(97,7) Hint: Parameter "AYarn" not used IdServerIOHandlerSocket.pas(82,58) Hint: Unit "IdStackConsts" not used in IdServerIOHandlerSocket IdServerIOHandlerSocket.pas(82,86) Hint: Unit "IdScheduler" not used in IdServerIOHandlerSocket IdServerIOHandlerStack.pas(70,34) Hint: Parameter "ATheThread" not used IdServerIOHandlerStack.pas(62,3) Hint: Unit "IdSocketHandle" not used in IdServerIOHandlerStack IdServerIOHandlerStack.pas(62,29) Hint: Unit "IdThread" not used in IdServerIOHandlerStack IdServerIOHandlerStack.pas(62,39) Hint: Unit "IdServerIOHandler" not used in IdServerIOHandlerStack IdServerIOHandlerStack.pas(62,58) Hint: Unit "IdStackConsts" not used in IdServerIOHandlerStack IdServerIOHandlerStack.pas(62,86) Hint: Unit "IdScheduler" not used in IdServerIOHandlerStack IdSchedulerOfThreadDefault.pas(70,55) Hint: Unit "IdContext" not used in IdSchedulerOfThreadDefault IdCustomTCPServer.pas(357,40) Hint: Parameter "AIOHandler" not used IdCustomTCPServer.pas(265,25) Hint: Unit "IdSchedulerOfThread" not used in IdCustomTCPServer IdCustomTCPServer.pas(266,43) Hint: Unit "IdStackConsts" not used in IdCustomTCPServer IdCustomTCPServer.pas(432,26) Hint: Unit "IdReplyRFC" not used in IdCustomTCPServer IdSchedulerOfThread.pas(134,16) Hint: Unit "IdBaseComponent" not used in IdSchedulerOfThread IdSchedulerOfThread.pas(175,26) Hint: Unit "IdTCPServer" not used in IdSchedulerOfThread IdThread.pas(240,33) Hint: Parameter "AException" not used IdGlobalProtocols.pas(1314,41) Hint: Function result variable does not seem to be initialized IdGlobalProtocols.pas(1511,57) Hint: Local variable "NumRead" does not seem to be initialized IdGlobalProtocols.pas(1511,32) Hint: Local variable "Buffer" does not seem to be initialized IdGlobalProtocols.pas(1516,52) Hint: Local variable "NumWritten" does not seem to be initialized IdGlobalProtocols.pas(536,52) Hint: Parameter "AExt" not used IdGlobalProtocols.pas(1819,12) Hint: Local variable "LRec" does not seem to be initialized IdGlobalProtocols.pas(1739,3) Note: Local variable "LU" not used IdGlobalProtocols.pas(1941,51) Hint: Local variable "LRec" does not seem to be initialized IdGlobalProtocols.pas(518,29) Hint: Parameter "Value" not used IdGlobalProtocols.pas(2329,19) Warning: Local variable "LNum" of a managed type does not seem to be initialized IdGlobalProtocols.pas(2727,50) Hint: Local variable "Ignored" does not seem to be initialized IdGlobalProtocols.pas(2774,40) Hint: Function result variable does not seem to be initialized IdGlobalProtocols.pas(3891,19) Warning: function result variable of a managed type does not seem to initialized IdGlobalProtocols.pas(4629,69) Hint: Local variable "LOld" of a managed type does not seem to be initialized IdGlobalProtocols.pas(4858,27) Hint: Local variable "TheTms" does not seem to be initialized IdGlobalProtocols.pas(4945,3) Note: Local variable "LHost" not used IdGlobalProtocols.pas(332,3) Hint: Unit "IdBaseComponent" not used in IdGlobalProtocols IdGlobalProtocols.pas(595,3) Hint: Unit "IdIPAddress" not used in IdGlobalProtocols IdGlobalProtocols.pas(620,3) Hint: Unit "IdAssignedNumbers" not used in IdGlobalProtocols IdGlobalProtocols.pas(621,3) Hint: Unit "IdResourceStringsCore" not used in IdGlobalProtocols IdHeaderList.pas(148,3) Hint: Unit "IdException" not used in IdHeaderList IdUriUtils.pas(59,3) Hint: Unit "IdResourceStringsProtocols" not used in IdUriUtils IdCookie.pas(640,34) Warning: Local variable "S" of a managed type does not seem to be initialized IdCookie.pas(476,3) Hint: Local const "cTokenSeparators" is not used IdCookie.pas(206,3) Hint: Unit "IdAssignedNumbers" not used in IdCookie IdCookie.pas(206,22) Hint: Unit "IdResourceStringsProtocols" not used in IdCookie IdCoder.pas(166,3) Hint: Unit "IdStreamVCL" not used in IdCoder IdCoder3to4.pas(278,71) Hint: Mixing signed expressions and longwords gives a 64bit result IdCoder3to4.pas(279,71) Hint: Mixing signed expressions and longwords gives a 64bit result IdCoder3to4.pas(382,60) Hint: Mixing signed expressions and longwords gives a 64bit result IdCoder3to4.pas(383,61) Hint: Mixing signed expressions and longwords gives a 64bit result IdCoder3to4.pas(198,3) Hint: Unit "IdException" not used in IdCoder3to4 IdCoder3to4.pas(198,16) Hint: Unit "IdResourceStrings" not used in IdCoder3to4 IdCoderMIME.pas(131,45) Hint: Local variable "LSrc" of a managed type does not seem to be initialized IdCoderMIME.pas(86,3) Hint: Unit "IdStreamVCL" not used in IdCoderMIME IdAuthentication.pas(84,32) Hint: Parameter "AMethod" not used IdAuthentication.pas(84,41) Hint: Parameter "AUri" not used IdAuthentication.pas(122,35) Hint: Unit "IdResourceStringsProtocols" not used in IdAuthentication IdHTTPHeaderInfo.pas(579,66) Hint: Local variable "LCharSet" of a managed type does not seem to be initialized IdHTTPHeaderInfo.pas(1219,51) Hint: Local variable "LCharSet" of a managed type does not seem to be initialized IdSSL.pas(109,35) Hint: Parameter "ATheThread" not used IdSSL.pas(68,3) Hint: Unit "IdScheduler" not used in IdSSL IdCustomHTTPServer.pas(546,28) Hint: Parameter "ABuffer" not used IdCustomHTTPServer.pas(546,47) Hint: Parameter "AOffset" not used IdCustomHTTPServer.pas(546,56) Hint: Parameter "ACount" not used IdCustomHTTPServer.pas(548,25) Hint: Parameter "ASize" not used IdCustomHTTPServer.pas(1125,99) Hint: Local variable "LContentText" of a managed type does not seem to be initialized IdCustomHTTPServer.pas(1125,85) Hint: Local variable "LResponseText" of a managed type does not seem to be initialized IdCustomHTTPServer.pas(1125,70) Hint: Local variable "LResponseNo" does not seem to be initialized IdCustomHTTPServer.pas(1411,43) Hint: Local variable "LEncoding" of a managed type does not seem to be initialized IdCustomHTTPServer.pas(2281,77) Warning: Implicit string type conversion from "AnsiString" to "UnicodeString" IdCustomHTTPServer.pas(2291,77) Warning: Implicit string type conversion from "AnsiString" to "UnicodeString" unit1.pas(59,28) Hint: Parameter "level" not used unit1.pas(40,46) Hint: Parameter "CloseAction" not used DebugLogU.pas(255,11) Note: Local variable "AValue" is assigned but never used DebugLogU.pas(51,48) Hint: Parameter "AContext" not used DebugLogU.pas(52,47) Hint: Parameter "AContext" not used DebugLogU.pas(54,53) Hint: Parameter "AThread" not used DebugLogU.pas(56,44) Hint: Parameter "ASender" not used DebugLogU.pas(56,68) Hint: Parameter "AStatus" not used DebugLogU.pas(477,58) Hint: Parameter "Level" not used DebugLogU.pas(590,3) Note: Local variable "CurrentTimestamp" is assigned but never used DebugLogU.pas(59,45) Hint: Parameter "AContext" not used DebugLogU.pas(60,7) Hint: Parameter "ARequestInfo" not used DebugLogU.pas(61,44) Hint: Parameter "AContext" not used RE: Can Indy10 be used on a Raspberry Pi? - rlebeau - 10-07-2021 (10-07-2021, 03:28 AM)BartKindt Wrote: While compiling a ItHTTPServer and an IdTCPServer for the Raspberry Pi, with {mode objfpc}, I get hundreds of 'Hints' which indicate to me it is not going to work at all. Raspberry Pi is NOT officially supported by Indy. However, it is basically Linux-based, which Indy does support. (10-07-2021, 03:28 AM)BartKindt Wrote: And indeed, it crashes on the first Thread.Create somewhere. Do you have the cthreads unit in your uses clause? (10-07-2021, 03:28 AM)BartKindt Wrote: This is the list of compiling problems (sorry, lots of it): Some of those "Parameter "..." not used" warnings are true, but many of them are bogus. In fact, most of those hints are benign and can be ignored. ""formal parameter" not yet supported inside inline procedure/function" - I don't know what to make of that. "Local variable/Function result variable"..." of a managed type does not seem to be initialized" - sounds like a compiler bug, since by definition a managed type is "managed" by the compiler and should always be initialized automatically. In any case, you don't seem to be getting any compiler ERRORS, that is what is most important. RE: Can Indy10 be used on a Raspberry Pi? - BartKindt - 10-07-2021 Problem Solved: YES, Indy10 works on the Raspberry Pi, when cthreads is included. The auto-generated Program file contained: {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} But clearly the UseCThreads was not defined, so the cthreads was not either. I did not expect that. Now cthreads is part of the program, it works! |