#1 2024-11-28 13:32:32

ThepSamart
Member
Registered: 2022-10-19
Posts: 6

mORMot2 (2.3 stable) fail to create x64 package

Tried to create .bpl runtime for mORMot 2.3 stable, x86 (32 bit) is fined but x64 (64 bit) is failed.
return message is:

[dcc64 Error] mormot.db.raw.sqlite3.static.pas(1324): E2065 Unsatisfied forward or external declaration: 'memchr'

Using Delphi 10.2.3 update 3

I used .dpr from mORMot 2.2 which can built both x86, x64 with successfully.

Any suggession, please

Edit:

Just dig into source code, mormot.db.raw.sqlite3.static.pas has 'memchr' function (just add in 2.3), which also resided in mormot.lib.static.pas with different declaration.

Last edited by ThepSamart (2024-11-28 15:42:29)

Offline

#2 2024-11-28 18:28:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,226
Website

Re: mORMot2 (2.3 stable) fail to create x64 package

Did you try to disable C++ runtime binary in the package?

Offline

#3 2024-11-29 06:54:57

ThepSamart
Member
Registered: 2022-10-19
Posts: 6

Re: mORMot2 (2.3 stable) fail to create x64 package

Yes, in package option > Delphi Compiler > Output - C/C++ > C/C++ Output File Generation is set to "Generate DCU onlys".

I just created gist for my .dpk file.

https://gist.github.com/ThepSamart/4428 … b7390b61ec

This .dpk file was successfully created both x86 / x64 .bpl for mORMot 2.2 but fail for mORMot 2.3 x64 only (success for x86).

What about 'memchr' conflict in 'mormot.db.raw.sqlite3.static.pas' and 'mormot.lib.static.pas'

Offline

#4 2024-11-29 07:34:33

ThepSamart
Member
Registered: 2022-10-19
Posts: 6

Re: mORMot2 (2.3 stable) fail to create x64 package

Sorry, just found the cause of an error!

I used source from Release 64 date Oct 16, which different from latest commit (2.3.8998).

in ''mormot.db.raw.sqlite3.static.pas' a condition {$endif CPU32} was move to exclude 'memchr'.

I successfully created both x86/x64 runtime package for 2.3.8998 (not Release 64 statble date Oct 16). using .dpk file posted in GIST above.

Thank you for your grateful supporting.

Offline

#5 2024-11-29 07:41:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,226
Website

Re: mORMot2 (2.3 stable) fail to create x64 package

It makes sense now.

Offline

#6 2025-02-06 10:35:53

m227
Member
Registered: 2025-02-06
Posts: 1

Re: mORMot2 (2.3 stable) fail to create x64 package

Hi, I had the same problem, however I did not fiddle with files.
I just downloaded sources and static from https://github.com/synopse/mORMot2/releases. And they didn't compile under D12 x64. I manually moved memchr outside Win32 directive (as @ThepSamart wrote) and it compiled.

Offline

#7 Yesterday 11:44:22

FlaviusFX
Member
From: UK
Registered: Yesterday
Posts: 3
Website

Re: mORMot2 (2.3 stable) fail to create x64 package

Hi
I am getting the error [dcc64 Error] mormot.db.raw.sqlite3.static.pas(1303): E2065 Unsatisfied forward or external declaration: 'memchr' when trying to compile mormot2tests

I am running Delphi 12.3
-mORMot 2.3 stable
- I have download associated mORMot 2.3.stable static binaries .7z and extract it into the static sub-folder of local source

When i serach in  mormot.db.raw.sqlite3.static.pas I canot see any reference to mmemchr.

Can someone help please?

Offline

#8 Yesterday 14:18:23

flydev
Member
From: France
Registered: 2020-11-27
Posts: 131
Website

Re: mORMot2 (2.3 stable) fail to create x64 package

@FlaviusFX, I think it's related to the following, I remember it was fixed a few days later after the release, read issues #306 on github.

Last edited by flydev (Yesterday 14:20:15)

Offline

#9 Yesterday 18:26:06

zed
Member
Registered: 2015-02-26
Posts: 114

Re: mORMot2 (2.3 stable) fail to create x64 package

So, it looks like we need the new 2.3.1.stable, or something similar. Or is version 2.4 coming soon?

Offline

#10 Today 08:45:33

FlaviusFX
Member
From: UK
Registered: Yesterday
Posts: 3
Website

Re: mORMot2 (2.3 stable) fail to create x64 package

Thank you all for the quick reply. @flydev

In unit mormot.db.raw.sqlite3.static; I added the memchr function and it can compile.
I hope this will allow me to do some tests and get me started using mORMot2.
I want to recommend mORMot2 to a large organisation, so I hope all evaluations for smoothly. So any help I get would be appreciated.

{$endif CPU32}

function memchr(p: pointer; c: byte; n: PtrInt): PAnsiChar; cdecl;
begin
  result := P;
end;

When i run the tests

WARNING: deprecated SQLite3 engine
------------------------------------

Static SQLite3 library as included within S:\Delphi Github\mormot2\test\mormot2tests.exe is outdated!
Linked version is 3.46.1 whereas the current/expected is 3.44.2.

Please download latest SQLite3 3.44.2 revision from
https://synopse.info/files/mormot2static.7z


1.7. Network protocols:
  - TUriTree: 9,245 assertions passed  2.13ms
     1000 big tree lookups in 209us i.e. 4.5M/s, aver. 209ns
     1000 URI lookups in 41us i.e. 23.2M/s, aver. 41ns
     1000 URI static rewrites in 109us i.e. 8.7M/s, aver. 109ns
     1000 URI parametrized rewrites in 151us i.e. 6.3M/s, aver. 151ns
     1000 URI static execute in 118us i.e. 8M/s, aver. 118ns
     1000 URI parametrized execute in 219us i.e. 4.3M/s, aver. 219ns
!  - DNS and LDAP: 3 / 1,070 FAILED  81.70ms
     time.google.com : 2025-10-09 09:17:54.655Z = 2025-10-09 09:17:54.632Z
  - RTSP over HTTP: 1,900 assertions passed  247.64ms
  - RTSP over HTTP buffered write: 1,900 assertions passed  253.34ms
  - TTunnelLocal: 9,120 assertions passed  228.76ms
  - IP addresses: 53 assertions passed  372us
  - THttpPeerCache: 14,013 assertions passed  241.72ms
     2000 messages in 732us i.e. 2.6M/s, aver. 366ns, 500.2 MB/s
     10000 altered in 274us i.e. 34.8M/s, aver. 27ns, 6.5 GB/s
  Total failed: 3 / 37,301  - Network protocols FAILED  1.05s

Last edited by FlaviusFX (Today 09:31:20)

Offline

#11 Today 09:52:22

zed
Member
Registered: 2015-02-26
Posts: 114

Re: mORMot2 (2.3 stable) fail to create x64 package

@FlaviusFX I think you should use the source from the lts-2.3 branch. It contains backported fixes for bugs that were discovered after the 2.3 stable release.

Offline

#12 Today 14:10:25

FlaviusFX
Member
From: UK
Registered: Yesterday
Posts: 3
Website

Re: mORMot2 (2.3 stable) fail to create x64 package

zed wrote:

@FlaviusFX I think you should use the source from the lts-2.3 branch. It contains backported fixes for bugs that were discovered after the 2.3 stable release.

Thank you very much for this, I got the

Total assertions failed for all test suits:  0 / 172,429,898
! All tests passed successfully.

Offline

Board footer

Powered by FluxBB