Version 149 not building on RPI5 (trixie)

6 posts / 0 new
Last post
PB4PT
Version 149 not building on RPI5 (trixie)

pulling version 149 and building it I ran into this build error:

CqrlogImproved/src/./lnet/lib/lcommon.pp(470,13) Error: (5000) Identifier not found "TZInfo"

To fix it I made this change:

diff --git a/src/lnet/lib/lcommon.pp b/src/lnet/lib/lcommon.pp
index 487a127..fd74bf0 100644
--- a/src/lnet/lib/lcommon.pp
+++ b/src/lnet/lib/lcommon.pp
@@ -466,9 +466,11 @@ function TZSeconds: Integer; inline;
begin
{$IF FPC_FULLVERSION > 30202}
Result := unix.TZSeconds;
-{$ELSE}
+{$ELSEIF DECLARED(TZInfo)}
Result := TZInfo.Seconds;
- //if compile fails try to change "TZInfo.Seconds" to "unixutil.Tzseconds"
+{$ELSE}
+ // e.g. Debian's FPC 3.2.2 has no TZInfo; offset lives in UnixUtil
+ Result := UnixUtil.Tzseconds;
{$ENDIF}
end;

oh1kh
Version 149 not building on RPI5 (trixie)

Hi!
Thanks for diff!
lcommon.pp is real problem when there are so many versions of fpc/lazarus
I think I put your diff to CqrlogImproved to see if it finally solves this problem.

--
Saku
OH1KH

n3gb
Same problem

Same error on openSUSE Tumbleweed; tried the devel branch(with latest patch) but now I get this error:

/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(466,1) (3049) procedure/function TZSeconds:LongInt;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(467,5) (2032) Handling switch "$IF"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(469,9) (2032) Handling switch "$ELSEIF"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(471,7) (2032) Handling switch "$ELSE"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(473,10) Warning: (5059) Function result variable does not seem to be initialized
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(472,1) Error: (4037) Typecast has different size (4 -> 8) in assignment
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(474,8) (2032) Handling switch "$ENDIF"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(478,8) (2032) Handling switch "$ENDIF"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(480,9) (2032) Handling switch "$IFNDEF"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(482,1) (3049) procedure/function SetNoDelay(const LongInt;const Boolean):Boolean;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(493,8) (2032) Handling switch "$ENDIF"
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(496,1) (3049) procedure/function StrToHostAddr(const AnsiString):DWord;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(501,1) (3049) procedure/function HostAddrToStr(const LongWord):AnsiString;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(506,1) (3049) procedure/function StrToNetAddr(const AnsiString):DWord;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(511,1) (3049) procedure/function NetAddrToStr(const LongWord):AnsiString;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(516,1) (3049) procedure/function IsIP6Empty(const sockaddr_in6):Boolean;
/home/gwb/OSS/src/CqrlogImproved/src/./lnet/lib/lcommon.pp(527,1) (3049) procedure/function FillAddressInfo(var TLSocketAddress;const Word;const AnsiString;const Word);
lcommon.pp(550) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile Project, Target: /home/gwb/OSS/src/CqrlogImproved/src/cqrlog: stopped with exit code 1
Info: (lazarus) [TCompiler.Compile] end
Error: (lazbuild) Failed compiling of project "/home/gwb/OSS/src/CqrlogImproved/src/cqrlog.lpi"
make: *** [Makefile:91: cqrlog_qt6] Error 2

--
73 n3gb

oh1kh
 Version 149 not building on RPI5 (trixie)

 

Here is the diff added to lcommon.pp in devel branch
It looks like this when opened with lazarus-ide source editor. Depending on laz version it is already grayed fom parts that are not going to be used.
I.E. My version of FPC/Lazarus uses the topmost selection of "IF"-sentences.

There seems to be a bug after last ELSE.
I added diff manually and forgot to remove "+" signs at the start of two lines.

Sorry!

Tested this only with two different versions of fpc/lazarus, both used the upper two IF/ELSE-selctions and so I missed the bug
that showed up only after doing compile with my RPi.

Remove  "+" signs from beginning of lines 472 and 473 and compile works.
Or update your devel branch after I have fied it there.

Thanks for reporting!

--
Saku
OH1KH

n3gb
Thanks

Pulled the devel branch and all is well.

This build even fixed the window placement under Wayland. I don't know if it was Cqrlog, Lazarus, or QT updates that did it, but it looks much better at startup.

oh1kh
Version 149 not building on RPI5 (trixie)

There may be also another problem but you do not notice it if you do not open QSOlist/Filter/SQLConsole.
If program crashes there reporting about "SynGutterMarks" you can try to add the diff to fSQLConsole.lfm
git apply fSQLConsole.lfm_.txt
I attach the file to this message with that name.

This is another problem that arises when source made with latest Lazarus is compiled with older versions of Lazarus.

File: 

--
Saku
OH1KH