[Lazarus] Strange linker messages "undefined reference" when building on RPi4 - CompileLog_2022-04-15.log (0/1)
Bo Berglund
bo.berglund at gmail.com
Sat Apr 15 13:41:57 CEST 2023
I have a project that builds fine on one RPi4 where I have installed Lazarus
2.2.6/Fpc 3.2.2 from sources.
This is a rather old device and I am trying to create a backup build unit to
migrate into
On this I have installed the same versions but using fpcupdeluxe for arm-linux.
On the new unit some test projects work fine but the real target project seems
to have some problems.
I have retrieved the same project from our Subversion server so the project
files are the same versions.
On the original RPi4 I can compile/build/debug just fine.
But when I try compiling or building the project on the newer RPi4 I get the
output below in the messages log (the full log as copied from Lazarus attached).
The problem seems to come from the Synapse package but this is installed via
OnlinePackageManeger on both systems...
What does this mean:
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
And what can I do? Is something missing in the fpcupdeluxe installation?
This has not happened to me before.
Log excerpt follows:
First this happens in the output:
----------------------------------
Note: Duplicate unit "synautil" in "SSRemoteServerLx", orphaned ppu
"/home/pi/projects/SSRemoteServer/source/lib/arm-linux/synautil.ppu"
Note: Duplicate unit "synautil" in "laz_synapse 40.1",
ppu="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/onlinepackagemanager/packages/synapse40.1/lib/arm-linux/synautil.ppu",
source="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/onlinepackagemanager/packages/synapse40.1/synautil.pas"
Note: Duplicate unit "synaser" in "SSRemoteServerLx", orphaned ppu
"/home/pi/projects/SSRemoteServer/source/lib/arm-linux/synaser.ppu"
Note: Duplicate unit "synaser" in "laz_synapse 40.1",
ppu="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/onlinepackagemanager/packages/synapse40.1/lib/arm-linux/synaser.ppu",
source="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/onlinepackagemanager/packages/synapse40.1/synaser.pas"
Note: Duplicate unit "synafpc" in "SSRemoteServerLx", orphaned ppu
"/home/pi/projects/SSRemoteServer/source/lib/arm-linux/synafpc.ppu"
Note: Duplicate unit "synafpc" in "laz_synapse 40.1",
ppu="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/onlinepackagemanager/packages/synapse40.1/lib/arm-linux/synafpc.ppu",
source="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/onlinepackagemanager/packages/synapse40.1/synafpc.pas"
Note: Duplicate unit "fpserialport" in "SSRemoteServerLx", orphaned ppu
"/home/pi/projects/SSRemoteServer/source/lib/arm-linux/fpserialport.ppu"
Note: Duplicate unit "fpserialport" in "fpserialpkg 0.0",
ppu="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/cmplaz/FpSerialPort/lib/arm-linux/fpserialport.ppu",
source="/home/pi/LazFpc/Laz_2.2.6/config_lazarus/cmplaz/FpSerialPort/fpserialport.pas"
Then some hints on unused variables for the units being compiled etc...
Then this:
----------------------------------------
/home/pi/projects/SSRemoteServer/source/SSRemoteServerLx.lpr(32,5) Hint: (5023)
Unit "BaseUnix" not used in SSRemoteServerLx
(9022) Compiling resource
/home/pi/projects/SSRemoteServer/source/lib/arm-linux/SSRemoteServerLx.or
(9015) Linking /home/pi/projects/SSRemoteServer/source/SSRemoteServerLx
/usr/bin/ld: //home/pi/projects/SSRemoteServer/source/lib/arm-linux/synautil.o:
in function `SYNAUTIL_$$_finalize_implicit$':
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_decodetimezone$ansistring$longint$$boolean+0x68):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_decodetimezone$ansistring$longint$$boolean+0x7c):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_decoderfcdatetime$ansistring$$tdatetime+0x1cc):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_dump$ansistring$ansistring+0x60):
undefined reference to `SYSUTILS_$$_FILEEXISTS$RAWBYTESTRING$$BOOLEAN'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_dumpex$ansistring$ansistring+0x60):
undefined reference to `SYSUTILS_$$_FILEEXISTS$RAWBYTESTRING$$BOOLEAN'
This goes on for a while until:
--------------------------------
/home/pi/projects/SSRemoteServer/source/class_SSRemoteClientComm.pas(290,3)
Hint: (5028) Local const "DLE" is not used
/home/pi/projects/SSRemoteServer/source/class_SSRemoteClientComm.pas(283,3)
Hint: (5023) Unit "IniFileFuncs" not used in class_SSRemoteClientComm
/home/pi/projects/SSRemoteServer/source/SSRemoteServerLx.lpr(32,5) Hint: (5023)
Unit "BaseUnix" not used in SSRemoteServerLx
Now the compile is done an link starts
--------------------------------------
(9022) Compiling resource
/home/pi/projects/SSRemoteServer/source/lib/arm-linux/SSRemoteServerLx.or
(9015) Linking /home/pi/projects/SSRemoteServer/source/SSRemoteServerLx
/usr/bin/ld: //home/pi/projects/SSRemoteServer/source/lib/arm-linux/synautil.o:
in function `SYNAUTIL_$$_finalize_implicit$':
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_decodetimezone$ansistring$longint$$boolean+0x68):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_decodetimezone$ansistring$longint$$boolean+0x7c):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_decoderfcdatetime$ansistring$$tdatetime+0x1cc):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_headerstolist$tstrings+0xb0):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
/usr/bin/ld:
/home/pi/projects/SSRemoteServer/source/synautil.pas:(.text.n_synautil_$$_listtoheaders$tstrings+0x98):
undefined reference to `SYSTEM_$$_POS$CHAR$RAWBYTESTRING$$LONGINT'
Until some 40-50 lines later:
-----------------------------
/home/pi/projects/SSRemoteServer/source/SSRemoteServerLx.lpr(239,1) Error:
(9013) Error while linking
/home/pi/projects/SSRemoteServer/source/SSRemoteServerLx.lpr(239,1) Fatal:
(10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /home/pi/LazFpc/Laz_2.2.6/fpc/bin/arm-linux/ppcarm returned an error
exitcode
--
Bo Berglund
Developer in Sweden
More information about the lazarus
mailing list