#1 Re: mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-12-12 11:43:19

Hello , I meet a error , and hope get the help . thanks .
I run fpc.exe , but return Error: (9016) Util x86_64-linux-ld.exe not found, switching to external linking. The x86_64-linux-ld.exe file is in x86_64-linux direction. How can it run ?

I run the command is : C:\e\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\fpc.exe -Tlinux -Px86_64 -MObjFPC -Scghi -Cg -O1 -l -vewnhibq -FiD:\demo\y\code\blackir\mymormot\lib\x86_64-linux\ -FiC:\e\SS2\ziliao\net\mormot2 -FuD:\demo\y\com\mORMot2-sqlite.3.38.1\src\core\ -FuD:\demo\y\com\mORMot2-sqlite.3.38.1\src\crypt\ -FuD:\demo\y\code\blackir\mymormot\jiekou -FUD:\demo\y\code\blackir\mymormot\lib\x86_64-linux\ -FED:\demo\y\code\blackir\mymormot\ -oD:\demo\y\code\blackir\mymormot\blackir_test6 blackir.lpr

output is :
Hint: (11030) Start of reading config file C:\e\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\e\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.2.1-r48511 [2021/02/05] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling blackir.lpr
D:\demo\y\code\blackir\mymormot\blackir.lpr(5,28) Hint: (5023) Unit "uSendMail" not used in blackir
D:\demo\y\code\blackir\mymormot\blackir.lpr(5,39) Hint: (5023) Unit "offlinefile" not used in blackir
D:\demo\y\code\blackir\mymormot\blackir.lpr(5,52) Hint: (5023) Unit "DePrtCoderEx" not used in blackir
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9011) Object .\static\x86_64-linux\sqlite3.o not found, Linking may fail !
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9012) Library libgcc.a not found, Linking may fail !
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9011) Object static\x86_64-linux\sha512-x64sse4.o not found, Linking may fail !
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9011) Object static\x86_64-linux\crc32c64.o not found, Linking may fail !
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9011) Object static\x86_64-linux\ecclin64O2.o not found, Linking may fail !
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9011) Object ..\..\static\x86_64-linux\sha512-x64sse4.o not found, Linking may fail !
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9011) Object ..\..\static\x86_64-linux\crc32c64.o not found, Linking may fail !
(9015) Linking D:\demo\y\code\blackir\mymormot\blackir_test6
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9034) "crti.o" not found, this will probably cause a linking failure
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9034) "crtbeginS.o" not found, this will probably cause a linking failure
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9034) "crtendS.o" not found, this will probably cause a linking failure
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Warning: (9034) "crtn.o" not found, this will probably cause a linking failure
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Error: (9016) Util x86_64-linux-ld.exe not found, switching to external linking
D:\demo\y\code\blackir\mymormot\blackir.lpr(64,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\e\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\ppcrossx64.exe returned an error exitcode

#3 Re: mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-12-11 09:50:10

ab wrote:

Your project is clearly mixing mORMot 1 and mORMot 2 units: SynEcc is mORMot 1, and mormot.crypt.ecc256r1 is mORmot 2.

Fix your project to use only mORMot 2 units.

How can I get  or download the mORMot 2 units ?

#4 Re: mORMot 1 » Multiple Controllers in an MVC Server » 2022-05-13 09:16:37

ab wrote:

This post is about MVC web applications, not regular REST services as you try to implement, if I understand correctly.

Maybe I misunderstood this post. But how should I realize my demand?
And thank you for your reply.

#5 Re: mORMot 1 » Multiple Controllers in an MVC Server » 2022-05-13 07:54:59

I also encountered similar problems. After referring to this post, I still don't know how to solve them. I have some controllers in one application. How do I use different methods?
For example ,  I have a sqlite database , "/user/add" assign to procedure user_add , "/order/create" assign to procedure order_create.
In my code , TSQLHttpServer use to http service  , TSQLRestServerDB use to database process . How can TSQLRestServerDB set to multi path to procedure ? Or any other code support it ?

#6 Re: mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-04-28 09:28:29

I think so.
I'll try modify it.
I'm not sure how to modify it.
Thanks.

#7 Re: mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-04-28 02:48:34

It is not use mormot.crypt.jwt  in the old code .  above error is reported after use mormot.crypt.jwt.

C:\e\SS2\SysDataManager\mymormot_test\lib\x86_64-linux\mormot.crypt.ecc256r1.o: In function `MORMOT.CRYPT.ECC256R1_$$_GETRANDOMNUMBER$THASH256$$LONGINT':
mormot.crypt.ecc256r1.pas:(.text.n_mormot.crypt.ecc256r1_$$_getrandomnumber$thash256$$longint+0x0): multiple definition of `getRandomNumber'
C:\e\SS2\SysDataManager\mymormot_test\lib\x86_64-linux\SynEcc.o:SynEcc.pas:(.text.n_synecc_$$_getrandomnumber$thash256$$longint+0x0): first defined here
C:\e\SS2\SysDataManager\mymormot_test\blackir.lpr(66,1) Error: (9013) Error while linking
C:\e\SS2\SysDataManager\mymormot_test\blackir.lpr(66,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\ppcrossx64.exe returned an error exitcode


Is there any way to remove this multiple definition?

#8 Re: mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-04-27 15:36:16

I had disable any definition . Then , The rest report errors :
C:\e\SS2\SysDataManager\mymormot_test\lib\x86_64-linux\mormot.crypt.ecc256r1.o: In function `MORMOT.CRYPT.ECC256R1_$$_GETRANDOMNUMBER$THASH256$$LONGINT':
mormot.crypt.ecc256r1.pas:(.text.n_mormot.crypt.ecc256r1_$$_getrandomnumber$thash256$$longint+0x0): multiple definition of `getRandomNumber'
C:\e\SS2\SysDataManager\mymormot_test\lib\x86_64-linux\SynEcc.o:SynEcc.pas:(.text.n_synecc_$$_getrandomnumber$thash256$$longint+0x0): first defined here
C:\e\SS2\SysDataManager\mymormot_test\blackir.lpr(66,1) Error: (9013) Error while linking
C:\e\SS2\SysDataManager\mymormot_test\blackir.lpr(66,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\ppcrossx64.exe returned an error exitcode

It is like mormot.crypt.ecc256r1.o and SynEcc.o has same _getrandomnumber.  But I can not modify o file. sad

What can I do ?

#9 Re: mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-04-27 11:24:26

I think I had mixing mORMot with mORMot2(look like  https://synopse.info/forum/viewtopic.php?id=5856).

    The original code is estimated to be mormot, which can be normally compiled to Linux programs.

    And then I added code and used JWT function, which can run in Delphi environment.

Now there is a problem with complie. Error report after adjustment:
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\sha512-x64sse4.o: In function `sha512_sse4':
sha512_sse4.asm:(.text+0x0): multiple definition of `sha512_sse4'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\sha512-x64sse4.o:sha512_sse4.asm:(.text+0x0): first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\crc32c64.o: In function `crc32_iscsi_01':
z:\Temp\crc//crc32_iscsi_01.asm:91: multiple definition of `crc32_iscsi_01'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\crc32c64.o:z:\Temp\crc//crc32_iscsi_01.asm:91: first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\crc32c64.o: In function `crc32_iscsi_01_slver_01030015':
z:\Temp\crc//crc32_iscsi_01.asm:571: multiple definition of `crc32_iscsi_01_slver_01030015'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\crc32c64.o:z:\Temp\crc//crc32_iscsi_01.asm:571: first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\crc32c64.o: In function `crc32_iscsi_01_slver_01030015':
z:\Temp\crc//crc32_iscsi_01.asm:571: multiple definition of `crc32_iscsi_01_slver'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\crc32c64.o:z:\Temp\crc//crc32_iscsi_01.asm:571: first defined here
C:\e\SS2\SysDataManager\mymormot_test\lib\x86_64-linux\mormot.crypt.ecc256r1.o: In function `MORMOT.CRYPT.ECC256R1_$$_GETRANDOMNUMBER$THASH256$$LONGINT':
mormot.crypt.ecc256r1.pas:(.text.n_mormot.crypt.ecc256r1_$$_getrandomnumber$thash256$$longint+0x0): multiple definition of `getRandomNumber'
C:\e\SS2\SysDataManager\mymormot_test\lib\x86_64-linux\SynEcc.o:SynEcc.pas:(.text.n_synecc_$$_getrandomnumber$thash256$$longint+0x0): first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\ecclin64O2.o: In function `ecc_make_key':
/home/user/lib/ecc/ecc.c:1003: multiple definition of `ecc_make_key'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\ecclin64O2.o:/home/user/lib/ecc/ecc.c:1003: first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\ecclin64O2.o: In function `ecdh_shared_secret':
/home/user/lib/ecc/ecc.c:1036: multiple definition of `ecdh_shared_secret'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\ecclin64O2.o:/home/user/lib/ecc/ecc.c:1036: first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\ecclin64O2.o: In function `ecdsa_sign':
/home/user/lib/ecc/ecc.c:1130: multiple definition of `ecdsa_sign'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\ecclin64O2.o:/home/user/lib/ecc/ecc.c:1130: first defined here
C:\lazarus32\ccr\mORMot\static\x86_64-linux\..\..\static\x86_64-linux\ecclin64O2.o: In function `ecdsa_verify':
/home/user/lib/ecc/ecc.c:1177: multiple definition of `ecdsa_verify'
C:\lazarus32\ccr\mORMot\static\x86_64-linux\ecclin64O2.o:/home/user/lib/ecc/ecc.c:1177: first defined here
C:\e\SS2\SysDataManager\mymormot_test\blackir.lpr(66,1) Error: (9013) Error while linking
C:\e\SS2\SysDataManager\mymormot_test\blackir.lpr(66,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\lazarus32\fpcupdeluxe\fpc\bin\i386-win32\ppcrossx64.exe returned an error exitcode

    Whether the code needs to be adjusted to mormot2. Is it upward compatible?

    thanks  .

#10 mORMot 1 » Linux Lazarus mORMot linking error 2 » 2022-04-27 02:13:46

scutlemon
Replies: 11

Dear ,
    I have erorr such as https://synopse.info/forum/viewtopic.php?id=4863 .

    my lpr file as :
uses
{$I SynDprUses.inc}


    I run command :  fpc.exe -Tlinux -Px86_64 -MObjFPC -Scghi -Cg -O1 -l -vewnhibq ........ blackir_test5 blackir.lpr
    reply error : 
        blackir.lpr(64,1) Error: () Error while linking
        blackir.lpr(64,1) Fatal: (10026) There were 1 errors compiling module, stopping


     then I follow the above methods (https://synopse.info/forum/viewtopic.php?id=4863)  and add the following to the LPR file:
uses
  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}

{$I SynDprUses.inc}


    The following error is :
        SynDprUses.inc(4,15) Error: (5002) Duplicate identifier "CTHREADS"
        blackir.lpr(10,42) Error: (5002) Duplicate
        blackir.lpr(10,42) Hint: (5003) Identifier already defined in unit BLACKIR: blackir.lpr at line 5


     I see there error cthreads had in SynDprUses.inc.

     What can I do for it ?
     Thanks a lot.

#11 Re: SyNode » why cannot run the same SQLite on Linux at the same time » 2022-04-19 11:47:06

Thank you for your suggestion.  Our final plan is consistent with what you said.
Thank you very much.
smile

#12 Re: SyNode » why cannot run the same SQLite on Linux at the same time » 2022-04-19 01:30:02

Thank you for your reply. After reading the document, I didn't find "WAL mode", but I saw standard UNIX vfses and saw that the opening method was "UNIX excl" in the source code. I changed it to "UNIX dotfile", and there is no lock database after recompiling and running.

My application has another node JS to run web access SQLite. But I still don't know how big the risk is and whether it is an appropriate plan.
If don't lock the database, which way is safer?
Thanks .

#13 SyNode » why cannot run the same SQLite on Linux at the same time » 2022-04-18 10:38:15

scutlemon
Replies: 4

I use Delphi program to open SQLite database with TSQLRestServerDB. Lockingmode: = lmnormal. The compiler runs on Linux by fpc , such as :  fpc.exe -Tlinux -Px86_64 -MObjFPC -Scghi -Cg -O1 -l -vewnhibq -FiC:\e\SS2\SysDataManager\mymormot\lib\x86_64-linux -FiC:\lazarus32\ccr\mORMot -FiC:\lazarus32\ccr\mORMot\CrossPlatform -FiC:\lazarus32\ccr\mORMot\static\x86_64-linux -FiC:\e\ss\ziliao\synapse40\source\lib -FuC:\lazarus32\ccr\mORMot -FuC:\e\ss\IRSoft\souce\component -FuC:\lazarus32\ccr\mORMot\SQLite3 -FuC:\lazarus32\ccr\mORMot\static\x86_64-linux -FuC:\e\ss\ziliao\synapse40\synalist-code-r209-trunk\synalist-code-r209-trunk -FuC:\e\SS2\SysDataManager\mymormot\jiekou -FuC:\e\SS2\wavpubfunc -FuC:\e\SS2\SysDataManager\mymormot\ -FUC:\e\SS2\SysDataManager\mymormot\lib\x86_64-linux\ -FEC:\e\SS2\SysDataManager\mymormot\ -oC:\e\SS2\SysDataManager\mymormot\blackir blackir.lpr

When the second program is opened, an error is reported: esqlite3exception {"errorcode": 26, "sqlite3errorcode": "secnotadb", "message": "error sqlite_notadb (26) [dbopen] using 3.34.1 with ADB = nil"}.

But it is possible to run on windows.

What is the matter? How should it be solved?

Board footer

Powered by FluxBB