#1 2017-04-30 14:43:34

antispam88
Member
Registered: 2016-08-19
Posts: 14

Can't compile project which works fine in 1.6.4/3.0.2

Hi!

I have a project which compiles with lazarus 1.6.4 / fpc 3.0.2 without problems.
But with newpascal 1.7 / fpc 3.1.1 (got it today via fpcupdeluxe-i386-win32.exe) I'm getting following messages:

Warning: Recompiling unit1, checksum changed for unit2
unit3.pas(9,3) Fatal: Cannot find unit1 used by unit3, incompatible ppu=C:\projects\project1\bin\lib\i386-win32\unit1.ppu, multiple packages: package1, package2, package3, package4, package5, package6, package7, package8, package9

Do I have to rearrange the uses section?


Best regards,
antispam88


PS: Win10Pro/64
And I'm getting same error with fpcupdeluxe-x86_64-win64

Offline

#2 2017-04-30 14:58:02

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

Re: Can't compile project which works fine in 1.6.4/3.0.2

Sounds like something tied to your project....

Did you at least REBUILD the project (not only compile) for the target?

Offline

#3 2017-04-30 15:13:35

antispam88
Member
Registered: 2016-08-19
Posts: 14

Re: Can't compile project which works fine in 1.6.4/3.0.2

I used "Clean up and Build"

Offline

#4 2017-05-02 11:17:14

antispam88
Member
Registered: 2016-08-19
Posts: 14

Re: Can't compile project which works fine in 1.6.4/3.0.2

After "Clean up and Build" breaks changing unit3 (e.g. inserting a blank) and "Build" "solves" the error (I'm getting a binary).
Do you need further information to reconstruct the error?

Another problem I have with 1.7 / 3.1.1 is that the compiler doesn't know the assembler commands "PUSHFD" and "POPFD":

function test: integer; assembler;
{$ASSMODE intel}
asm
         PUSH    EBX

         //detect CPUID support
         PUSHFD
         MOV     EAX, [ESP]
         XOR     dword ptr [ESP], EFLAGS_ID_BIT
         POPFD
         ...
end;

test.pas(206,10) Error: Unrecognized opcode PUSHFD
test.pas(209,10) Error: Unrecognized opcode POPFD

Best regards,
Christian

Last edited by antispam88 (2017-05-06 12:54:17)

Offline

#5 2017-05-13 13:56:17

antispam88
Member
Registered: 2016-08-19
Posts: 14

Re: Can't compile project which works fine in 1.6.4/3.0.2

Does anyone have some new info about these problems?

Best regards,
antispam88

Offline

#6 2017-05-13 14:15:36

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

Re: Can't compile project which works fine in 1.6.4/3.0.2

I guess you are trying to compile 32-bit x86 code on a 64-bit x64 target, in which pushfd/popfd don't exist any more.

Anyway, this is an issue in your code, not in ours...

Offline

#7 2017-05-13 14:43:36

antispam88
Member
Registered: 2016-08-19
Posts: 14

Re: Can't compile project which works fine in 1.6.4/3.0.2

Thank you for the hint.
Ok, I wanted to have one's cake and eat it - mormot and 64 bit.
With the 32 bit version the problem with the assembler is gone.
But the problem with the checksum is still there. Do you have an idea what is wrong?

Offline

#8 2017-05-14 07:55:52

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

Re: Can't compile project which works fine in 1.6.4/3.0.2

Have a look at this (Lazarus) message thread. Perhaps it can help.

http://lists.lazarus-ide.org/pipermail/ … 31206.html

Offline

#9 2017-05-14 09:15:40

antispam88
Member
Registered: 2016-08-19
Posts: 14

Re: Can't compile project which works fine in 1.6.4/3.0.2

AOG wrote:

Have a look at this (Lazarus) message thread. Perhaps it can help.

http://lists.lazarus-ide.org/pipermail/ … 31206.html

But this thread is about a code change.
In my case I tested the running code (1.6.4/3.0.2) only with newpascal (1.7/3.1.1) ...

Offline

Board footer

Powered by FluxBB