#1 2023-11-02 09:31:30

vster
Member
Registered: 2023-07-10
Posts: 17

sqlite build fails on aarch64

I used TRestServerDB for mormot2, but compilation encountered “Undefined reference to ` fcntl64 '.”。

Error message:

Error:/home/nvidia/desktop/component/mORMot2-2.1. stable/mORMot2-2.1. stable/static/aarch64 Linux/../../static/aarch64 Linux/sqlite3. o: (. data+0x268): undefined reference to ` fcntl64 '.

My Env:

Machine: nvidia xiavier nx(aarch64-linux)

Operating system:  ubuntu18.04

Glibc version: ldd (Ubuntu GLIBC 2.27-3ubuntu1.5) 2.27

Development tools: freepascal, Lazarus

Mormot version: mORMot2-2.1.stable

I have checked the information and found that fcntl64 works on GLIBC 2.28.

But upgrading GLIBC may affect other programs on the machine.

Is there a way to avoid the occurrence of 'undefined reference to ` fcntl64'?

Or can sqlite3. o be linked to 'fcntl'?


Thank you!

Offline

#2 2023-11-02 09:40:28

vster
Member
Registered: 2023-07-10
Posts: 17

Re: sqlite build fails on aarch64

I am on x86_64 ubuntu 14.04 (GLIBC 2.19) Compilation is normal.

But I need to statically link sqlite3. o on aarch64 Linux.
What should I do to work properly without reporting an error "undefined reference to ` fcntl64 '"

Last edited by vster (2023-11-02 13:19:11)

Offline

#3 2023-11-03 14:54:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: sqlite build fails on aarch64

Try with the binaries from https://synopse.info/files/mormot2static.7z

Currently I have no trouble compiling and running the tests on linux-aarch64 (Mac M1):
https://luti.tranquil.it/get_folder_res … 9saW51eA==

Offline

#4 2023-11-06 00:03:02

PierceNg
Member
From: Singapore
Registered: 2023-01-29
Posts: 9
Website

Re: sqlite build fails on aarch64

Another data point: All mORMot 2.1 tests pass on an aarch64-linux VPS running Ubuntu 22.04.

Software version tested: 2.1.5794 (2023-10-03 06:45:45)

Ubuntu 22.04.3 LTS - Linux 5.15.0-1040-oracle [utf8 5.7GB 50F0010]
    1 x ARM Neoverse-N1 (aarch64)
...
Total assertions failed for all test suits:  0 / 77,402,651

Offline

#5 2023-11-06 14:59:18

vster
Member
Registered: 2023-07-10
Posts: 17

Re: sqlite build fails on aarch64

@ab,  I do trust the same static libraries.
The current solution I have taken is to carefully upgrade Glibc from 2.27 to 2.28, as a result, the problem has disappeared.
Thank you, ab, for contributing such an excellent work.

Offline

#6 2023-11-06 15:02:34

vster
Member
Registered: 2023-07-10
Posts: 17

Re: sqlite build fails on aarch64

@PierceNg, thanks. The version of ubuntu22.04 gblic may be higher than 2.27

Offline

Board footer

Powered by FluxBB