#1 2022-04-22 11:46:10

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 176

mormot 2 on Linux-aarch64

I installed today the Ubuntu 22.4 LTS on a raspeberry Pi 4 4GB and cross compiler FPC 3.2.0 for aarch64-linux in my windows machine
Trying to compile an already tested project in Linux-aarch64 I am getting the following errors during linking:

Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32arm64':
Debug: armv8.c:(.text+0x0): multiple definition of `crc32arm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x0): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32carm64':
Debug: armv8.c:(.text+0xe8): multiple definition of `crc32carm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0xe8): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32cby4arm64':
Debug: armv8.c:(.text+0x1d0): multiple definition of `crc32cby4arm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x1d0): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32blockarm64':
Debug: armv8.c:(.text+0x1d8): multiple definition of `crc32blockarm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x1d8): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `crc32blocksarm64':
Debug: armv8.c:(.text+0x218): multiple definition of `crc32blocksarm64'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x218): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesencryptarm128':
Debug: armv8.c:(.text+0x278): multiple definition of `aesencryptarm128'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x278): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesencryptarm192':
Debug: armv8.c:(.text+0x2f0): multiple definition of `aesencryptarm192'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x2f0): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesencryptarm256':
Debug: armv8.c:(.text+0x378): multiple definition of `aesencryptarm256'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x378): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `MakeDecrKeyArm':
Debug: armv8.c:(.text+0x418): multiple definition of `MakeDecrKeyArm'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x418): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesdecryptarm128':
Debug: armv8.c:(.text+0x440): multiple definition of `aesdecryptarm128'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x440): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesdecryptarm192':
Debug: armv8.c:(.text+0x4b8): multiple definition of `aesdecryptarm192'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x4b8): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `aesdecryptarm256':
Debug: armv8.c:(.text+0x540): multiple definition of `aesdecryptarm256'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x540): first defined here
Debug: C:\fpcupdeluxe\fpcupdeluxe\cross\bin\aarch64-linux\aarch64-linux-gnu-ld.exe: C:\Delphi\G\mORMot2\src\crypt\..\..\static\aarch64-linux\armv8.o: in function `gf_mul_h_arm':
Debug: armv8.c:(.text+0x5e0): multiple definition of `gf_mul_h_arm'; C:\Delphi\G\mORMot2\src\core\..\..\static\aarch64-linux\armv8.o:armv8.c:(.text+0x5e0): first defined here

Something stupid I probably done again but I am not sure

Project's options path is set as the following:

c:\Delphi\G\mORMot2\static\$(TargetCPU)-$(TargetOS)

Offline

#2 2022-04-22 12:05:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,170
Website

Re: mormot 2 on Linux-aarch64

Both links clearly points to the very same armv8.o file, but on Windows the paths are compared with no expansion of relative indications.
Sounds like a linking problem in your cross-compiler.
In don't have such issue from Linux x86_64.

Please try with https://github.com/synopse/mORMot2/commit/1911aadb

Offline

#3 2022-04-22 12:17:57

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 176

Re: mormot 2 on Linux-aarch64

It is fixed now @ab, thank you a lot

Offline

Board footer

Powered by FluxBB