#1 2016-08-05 18:16:55

nomorelogic
Member
Registered: 2014-10-13
Posts: 8

Error: Identifier not found "GetCPUID"

Hi all

I just read bout this NewPascal distribution and I found this project a really cool project.
Good work guys!

So I downloaded and unpacked this special distribution to explore examples.
I first converted ...\newpascalpack\ccr\mORMot\SQLite3\Samples\15 - External DB performance\PerfTest.dpr
to a Lazarus project (now PerfTest.lpr) using Lazarus tools.
Then I build this project but compilation fails with following error:
SynCommons.pas(57651,3) Error: Identifier not found "GetCPUID"

I'm working on Win7, 64bit OS.
Previous procedure is declared within {$ifdef CPU64} but strangely a {$define CPU64} is never executed in Synopse.inc.

Any suggestion?
Thanks
nomorelogic

Last edited by nomorelogic (2016-08-05 18:19:22)

Offline

#2 2016-08-05 19:54:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 9,274
Website

Re: Error: Identifier not found "GetCPUID"

Which version of mORMot did you download?

Offline

#3 2016-08-06 09:15:40

nomorelogic
Member
Registered: 2014-10-13
Posts: 8

Re: Error: Identifier not found "GetCPUID"

downloaded from this link
https://github.com/dathox/newpascalpack … alpack.zip

as found in newpascal.org/

Offline

#4 2016-08-06 10:28:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 9,274
Website

Re: Error: Identifier not found "GetCPUID"

On which target platform do you have the problem?

Offline

#5 2016-08-06 12:25:21

nomorelogic
Member
Registered: 2014-10-13
Posts: 8

Re: Error: Identifier not found "GetCPUID"

Test is done in Virtualbox, image is Win7 64bit.
In project options: target OS, CPU family and processor are set to default.

Offline

#6 2016-08-06 13:15:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 9,274
Website

Re: Error: Identifier not found "GetCPUID"

I just downloaded the file, run "configure.bat" then "run.bat" and load ccr\mORMot\SQLite3\TestSQL3.lpi project.
Compiles and run just fine.

Offline

#7 2016-08-06 15:08:13

nomorelogic
Member
Registered: 2014-10-13
Posts: 8

Re: Error: Identifier not found "GetCPUID"

I tried to compile and run TestSQL3.lpi and I've got a success.
Looking into this source I found "procedure GetCPUID" is included by PUREPASCAL directive.

The project I can't compile is PerfTest.dpr and this a Delphi project converted to Lazarus (PerfTest.lpr).
This time PUREPASCAL is not active and compiler can't find GetCPUID implementation.

So, I think Lazarus needs different compiler directives which are obviously not included in a converted Delphi source.
I'll try to understand more, any suggetion is appreciate smile

Regards
nomorelogic

Offline

#8 2016-08-08 07:00:36

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

I just tried with latest mORMot (fresh download).
Converted Sample 15 dpr with Lazarus to lpr/lpi.
Compile for win32 and win64 without problem !

So, question: how do you convert from dpr to lpr/lpi ?

I use the tool from Lazarus, with ALL options to change files DISABLED !!

Offline

#9 2016-08-08 09:00:51

nomorelogic
Member
Registered: 2014-10-13
Posts: 8

Re: Error: Identifier not found "GetCPUID"

using your suggestions I reconverted this project with followind options:
- unchecked: Others / Add defines simulating Delphi 7
- disabled: "Unit Replacements", "Unknown Properties", "Function Replacements" and "Coordinates Offset"

Rebuilding I've success!

Thanks
nomorelogic

Offline

#10 2016-10-04 09:56:57

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 66

Re: Error: Identifier not found "GetCPUID"

Hi,

I have tried this with the '12- SynDBExplorer' sample and I also get the 'Identifier not found - GetCPUID' error when compiling.
Does anyone have another idea how to solve this?
I am using the Newpascal with the latest mORMot sources.

Thanks,
Wai

Last edited by wai-kit (2016-10-04 09:58:16)

Offline

#11 2016-10-04 10:16:17

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 66

Re: Error: Identifier not found "GetCPUID"

UPDATE: I downloaded the very latest sources of the mORMot and now I get a different compile error:
'"mORMotUILogin.pas(89,12) Fatal: Cannot find PsAPI used by mORMotUILogin."

wai-kit wrote:

Hi,

I have tried this with the '12- SynDBExplorer' sample and I also get the 'Identifier not found - GetCPUID' error when compiling.
Does anyone have another idea how to solve this?
I am using the Newpascal with the latest mORMot sources.

Thanks,
Wai

Offline

#12 2016-10-05 07:39:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 9,274
Website

Re: Error: Identifier not found "GetCPUID"

On which platform are you trying to compile?
Note that the SynDBExplorer is mainly a Delphi VCL app, and I did not make any compatibility tests/changes for Lazarus.

Offline

#13 2016-10-05 11:15:50

wai-kit
Member
From: Amsterdam, the Netherlands
Registered: 2012-11-27
Posts: 66

Re: Error: Identifier not found "GetCPUID"

Aha!
My bad... I am compiling on Windows10.
Thanks Ab.

Offline

#14 2017-02-13 12:09:37

donaldshimoda
Member
From: Argentina
Registered: 2016-12-09
Posts: 25
Website

Re: Error: Identifier not found "GetCPUID"

ab wrote:

I just downloaded the file, run "configure.bat" then "run.bat" and load ccr\mORMot\SQLite3\TestSQL3.lpi project.
Compiles and run just fine.

Im using the repo version and get this error. Cant find the configure.bat or run.bat files, and don't get when will be needed to run this? Every time i change of platform?

Can you please show me what im doing wrong? Cant get this working on linux 386 machine.

Best regards.

Offline

#15 2017-02-14 20:39:58

donaldshimoda
Member
From: Argentina
Registered: 2016-12-09
Posts: 25
Website

Re: Error: Identifier not found "GetCPUID"

donaldshimoda wrote:
ab wrote:

I just downloaded the file, run "configure.bat" then "run.bat" and load ccr\mORMot\SQLite3\TestSQL3.lpi project.
Compiles and run just fine.

Im using the repo version and get this error. Cant find the configure.bat or run.bat files, and don't get when will be needed to run this? Every time i change of platform?

Can you please show me what im doing wrong? Cant get this working on linux 386 machine.

Best regards.


Ok, if i enable PUREPASCAL define i get this error:

GetCPUID missing

If i disable PUREPASCAL define i get this error:

exitcode 256

I really need to know if mormot work or don't with fpc. Im just using JSON libraries right now and can't make that works.

Im stopped here, anybody can please help?

thanks.

Offline

#16 2017-02-14 20:50:19

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

Please give it just a bit more time ...
A huge patch has just been included into the mORMot to make it compatible with FPC trunk and stable.
https://synopse.info/fossil/info/a1fc4dcff1be1d49
Within due time, NewPascal will be updated to include the new FPC RTTI.

At the moment, you can already use the mORMot with latest FPC trunk with 100% of all the features of the mORMot for FPC.
Give it a try.

Offline

#17 2017-02-14 21:14:04

donaldshimoda
Member
From: Argentina
Registered: 2016-12-09
Posts: 25
Website

Re: Error: Identifier not found "GetCPUID"

AOG wrote:

Please give it just a bit more time ...
A huge patch has just been included into the mORMot to make it compatible with FPC trunk and stable.
https://synopse.info/fossil/info/a1fc4dcff1be1d49
Within due time, NewPascal will be updated to include the new FPC RTTI.

At the moment, you can already use the mORMot with latest FPC trunk with 100% of all the features of the mORMot for FPC.
Give it a try.

on linux i386, fpc 3.1.1 trunk , lazarus 1.7 trunk, mormot trunk, must i enable PUREPSACAL or don't?

Offline

#18 2017-02-14 21:31:28

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

No.
Just use the latest vanilla mORMot. It should work. Out-of-the-box. If you follow the docs with respect to static sqlite3.
If not, we have work to do !

Offline

#19 2017-02-14 23:42:59

donaldshimoda
Member
From: Argentina
Registered: 2016-12-09
Posts: 25
Website

Re: Error: Identifier not found "GetCPUID"

AOG wrote:

No.
Just use the latest vanilla mORMot. It should work. Out-of-the-box. If you follow the docs with respect to static sqlite3.
If not, we have work to do !

Actual mormot trunk release commit from today fcffe372e9a2b687b8704326fa119511ec0aaa58 don't compile on fps 32 bits actual trunk , lazarus actual trunk.

exit code 256.

Im testing testSQL3.dpr.

Can you test it please?

Thanks.

Offline

#20 2017-02-15 06:19:44

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

What I did.
Used fcupdeluxe to install a brand new FPC/Lazarus trunk/trunk in a clean directory on Linux Mint 32 bit in a VM.
Download latest mORMot from GitHub.
Download sqlite3 static libs for FPC from http://synopse.info/files/sqlite3fpc.7z and unpacked in the mORMot directory.
Open the TestSQL3.lpi in Lazarus. Select build mode default.
Compile, run, 99,95% success !!

Last edited by AOG (2017-02-15 06:20:36)

Offline

#21 2017-02-16 22:14:40

ttomas
Member
Registered: 2013-03-08
Posts: 15

Re: Error: Identifier not found "GetCPUID"

Current fpcupdeluxe NewPascal/mORMot is broken.
TestSQL3 compile Error:
SynFPCTypInfo.pas(223,27) Error: identifier idents no member "RecInitInfo"
SynFPCTypInfo.pas(226,58) Error: identifier idents no member "RecInitData"

{$ifdef FPC_NEWRTTI}
function GetFPCRecInitData(TypeData: Pointer): Pointer;
begin
  if PTypeData(TypeData)^.RecInitInfo = nil then
    result := TypeData
  else
    result := AlignTypeData(pointer(PTypeData(TypeData)^.RecInitData));
end;
{$endif} 

Offline

#22 2017-02-17 06:54:45

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

@ttomas
Yes, that is true.
But you can use FPC trunk. It has all the features that are needed to run the mORMot.
And NewPascal will be updated one of these days !

Offline

#23 2017-02-17 08:24:42

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

Ha, the worlds sometimes moves faster than expected.
Few moments ago, a new release of NewPascal (1.0.43) has been made available !
Testing right now.

Offline

#24 2017-02-17 09:37:08

hnb
Member
Registered: 2015-06-15
Posts: 246

Re: Error: Identifier not found "GetCPUID"

@AOG Small correction:

NewPascal has 3 parts and each part has independent version:

* FPC compiler for NewPascal (1.0.43)
* Lazarus for NewPascal (1.0.40)
* NewPascal 1.0.42 (NP FPC 1.0.43 + NP Lazarus 1.0.40 + mORMot from ccr with latest binaries for FPC)


best regards,
Maciej Izak

Offline

#25 2017-02-17 09:45:16

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Error: Identifier not found "GetCPUID"

@hnb
Thanks for clearing things up !
Just did a NewPascal/mORMot test : 99.995% ok !! Just 2 (known/pending) failures.
Thanks !

Offline

Board footer

Powered by FluxBB